Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SYCL][Graph] Implementation of whole graph update #365

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ca784f5
[SYCL] Augment sycl-ls.test to increase code coverage. (#13165)
uditagarwal97 Mar 27, 2024
caa6df8
[SYCL][ESIMD][E2E] Remove setenv call from lsc_usm_atomic_cachehint.c…
sarnex Mar 27, 2024
13ea567
[SYCL][ESIMD][E2E] Re-enable fp_call_from_func.cpp (#13180)
sarnex Mar 27, 2024
d7bdb68
[SYCL][GRAPH] Fix minor Coverity performance issue (#13179)
uditagarwal97 Mar 27, 2024
db6a05d
[SYCL][E2E] Switch some of bindless_images/* tests to use <sycl/detai…
aelovikov-intel Mar 27, 2024
1e894d1
[CI][OSSF] Add default permissions to work flows (#13173)
stdale-intel Mar 28, 2024
8847c11
[SYCL][NATIVECPU][libclc]Mark opencl_c_generic_address_space as unsup…
PietroGhg Mar 28, 2024
f64a32a
[UR] Refactor Device Initialisation (#12762)
hdelan Mar 28, 2024
f894d08
[SYCL] Adjust GCC workaround and its scope (#13144)
frasercrmck Mar 28, 2024
f2ac688
[SYCL][libclc] Fix missing build dependencies (#13145)
frasercrmck Mar 28, 2024
a1c1e04
[SYCL] Fix error handling in non-blocking pipe operations (#13166)
sergey-semenov Mar 28, 2024
bf93fbd
[CI] Fix bad OSSF recomendations (#13187)
stdale-intel Mar 28, 2024
0c0b586
[XPTI][INFRA] Sample E2E data collection timing test for XPTI (#13045)
tovinkere Mar 28, 2024
f6e73e8
[SYCL] persistent cache fix - directory creation and reporting improv…
cperkinsintel Mar 28, 2024
2469975
[ESIMD][NFC][DOC] Add 'restrictions' section to gather/scatter() doc …
v-klochkov Mar 28, 2024
7d77f84
[SYCL][ESIMD] Remove no-fast-math-option from test (#13167)
fineg74 Mar 28, 2024
8867d44
[spir-v][clang] Allow spirv32/spirv64 as target triples for sycl offl…
asudarsa Mar 29, 2024
ba5feec
[SYCL][NATIVECPU] Update OCK tag (#13188)
PietroGhg Mar 29, 2024
ac4808a
[SYCL][SCLA] Check allocated types are trivial (#13105)
victor-eds Mar 29, 2024
d4045be
[ESIMD][NFC][DOC] Add 'restriction' section to atomic_update() doc (#…
v-klochkov Mar 29, 2024
b9aa33e
[SYCL] Implement get_backend_info() (#12906)
HPS-1 Mar 29, 2024
b48e342
[SYCL][Bindless][E2E] fix unsampled images test failure (#13007)
cppchedy Mar 29, 2024
8913285
[SYCL][Joint Matrix] Add a new overload for joint_matrix_apply to be …
dkhaldi Mar 29, 2024
92945f4
[SYCL][NFC] Rename variable (#13208)
againull Mar 29, 2024
d6e4a42
[SYCL][NFC] Apply clang-format to bitreverse test (#13095)
LU-JOHN Mar 29, 2024
2f03ef8
[CI] Add IGC dev as new dependency (#13184)
jsji Mar 29, 2024
9bfb172
[SYCL][Doc] Correct range-rounding link (#13139)
DDEle Mar 30, 2024
cefbadd
[SYCL][L0] Update SYCL_PI_LEVEL_ZERO_USM_ALLOCATOR description (#12088)
igchor Mar 30, 2024
6e98293
[SYCL][Graph] Implementation of whole graph update
fabiomestre Mar 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/sycl-aws.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Start/Stop AWS instance

permissions: read-all

on:
workflow_call:
inputs:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/sycl-containers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ on:
- 'devops/scripts/install_build_tools.sh'
- '.github/workflows/sycl-containers.yaml'

permissions: read-all

jobs:
base_image_ubuntu2204:
if: github.repository == 'intel/llvm'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/sycl-detect-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
description: Matched filters
value: ${{ jobs.need_check.outputs.filters }}

permissions: read-all

jobs:
need_check:
name: Decide which tests could be affected by the changes
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/sycl-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ on:
- 'clang/docs/**'
- 'sycl/doc/**'

permissions: read-all

jobs:
build:
permissions:
contents: write # for Git to git push
runs-on: ubuntu-latest
if: github.repository == 'intel/llvm'
steps:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/sycl-linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ on:
options:
- 3

permissions: read-all

jobs:
build:
name: Build + LIT
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/sycl-linux-matrix-e2e-on-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
Format: '{"VAR1":"VAL1","VAR2":"VAL2",...}'
default: '{"LIT_FILTER":""}'

permissions: read-all

jobs:
linux_e2e_on_nightly:
name: E2E on Nightly
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/sycl-linux-precommit-aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ on:
types:
- completed

permissions:
contents: read

jobs:
create-check:
runs-on: [Linux, build]
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/sycl-linux-precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions: read-all

jobs:
detect_changes:
uses: ./.github/workflows/sycl-detect-changes.yml
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/sycl-linux-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ on:
- false
- true

permissions:
contents: read

jobs:
run:
name: ${{ inputs.name }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/sycl-macos-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ on:
required: false
default: ""

permissions: read-all

jobs:
build:
name: Build
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/sycl-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
schedule:
- cron: '0 3 * * *'

permissions: read-all

jobs:
ubuntu2204_build:
if: github.repository == 'intel/llvm'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/sycl-post-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ on:
- ./devops/actions/cleanup
- ./devops/actions/cached_checkout

permissions: read-all

jobs:
build-lin:
name: Linux (Self build + shared libraries + no-assertions)
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/sycl-stale-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ on:
schedule:
- cron: '30 1 * * *'

permissions: read-all

jobs:
close-issues:
permissions:
issues: write # for actions/stale to close stale issues
pull-requests: write # for actions/stale to close stale PRs
runs-on: ubuntu-20.04
steps:
- uses: actions/stale@v9
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/sycl-sync-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ name: main branch sync
on:
workflow_dispatch:

permissions: read-all

jobs:
sync:
permissions:
contents: write # for Git to git push
runs-on: ubuntu-20.04
if: github.repository == 'intel/llvm'
steps:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/sycl-update-gpu-driver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ on:
- cron: '0 3 * * 2'
workflow_dispatch:

permissions: read-all

jobs:
update_driver_linux:
permissions:
contents: write # for Git to git push
runs-on: ubuntu-20.04
if: github.repository == 'intel/llvm'
steps:
Expand All @@ -26,5 +30,6 @@ jobs:
git checkout -B $BRANCH
git add -u
git commit -m "[GHA] Uplift Linux GPU RT version to $NEW_DRIVER_VERSION" || exit 0 # exit if commit is empty
git show
git push https://$GITHUB_TOKEN@github.com/${{ github.repository }} ${BRANCH}
gh pr create --head $BRANCH --title "[GHA] Uplift Linux GPU RT version to $NEW_DRIVER_VERSION" --body "Scheduled drivers uplift"
1 change: 1 addition & 0 deletions .github/workflows/sycl-windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ on:
type: choice
options:
- 3
permissions: read-all

jobs:
build:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/sycl-windows-precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ on:
- 'devops/containers/**'
- 'devops/actions/build_container/**'

permissions:
contents: read
permissions: read-all

concurrency:
# Cancel a currently running workflow from the same PR, branch or tag.
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/sycl-windows-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ on:
type: string
default: '{}'
required: False

permissions: read-all

jobs:
run:
name: ${{ inputs.name }}
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/Basic/DiagnosticSemaKinds.td
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def err_intel_sycl_alloca_wrong_arg
"'sycl::kernel_handler &'. Got %0">;
def err_intel_sycl_alloca_wrong_type
: Error<"__builtin_intel_sycl_alloca can only return 'sycl::private_ptr' "
"to a cv-unqualified object type. Got %0">;
"to a cv-unqualified trivial type. Got %0">;
def err_intel_sycl_alloca_wrong_size
: Error<"__builtin_intel_sycl_alloca must be passed a specialization "
"constant of integral value type as a template argument. Got %1 (%0)">;
Expand Down
4 changes: 2 additions & 2 deletions clang/lib/CodeGen/BackendUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1138,10 +1138,10 @@ void EmitAssemblyHelper::RunOptimizationPipeline(

// Add SPIRITTAnnotations pass to the pass manager if
// -fsycl-instrument-device-code option was passed. This option can be
// used only with spir triple.
// used only with spir or spirv triple.
if (CodeGenOpts.SPIRITTAnnotations) {
assert(
TargetTriple.isSPIR() &&
TargetTriple.isSPIROrSPIRV() &&
"ITT annotations can only be added to a module with spir target");
MPM.addPass(SPIRITTAnnotationsPass());
}
Expand Down
33 changes: 18 additions & 15 deletions clang/lib/Driver/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -806,10 +806,10 @@ static bool isValidSYCLTriple(llvm::Triple T) {
return true;

// Check for invalid SYCL device triple values.
// Non-SPIR arch.
if (!T.isSPIR())
// Non-SPIR/SPIRV arch.
if (!T.isSPIROrSPIRV())
return false;
// SPIR arch, but has invalid SubArch for AOT.
// SPIR/SPIRV arch, but has invalid SubArch for AOT.
StringRef A(T.getArchName());
if (T.getSubArch() == llvm::Triple::NoSubArch &&
((T.getArch() == llvm::Triple::spir && !A.equals("spir")) ||
Expand All @@ -833,7 +833,7 @@ static bool addSYCLDefaultTriple(Compilation &C,
return false;
for (const auto &SYCLTriple : SYCLTriples) {
if (SYCLTriple.getSubArch() == llvm::Triple::NoSubArch &&
SYCLTriple.isSPIR())
SYCLTriple.isSPIROrSPIRV())
return false;
// If we encounter a known non-spir* target, do not add the default triple.
if (SYCLTriple.isNVPTX() || SYCLTriple.isAMDGCN())
Expand Down Expand Up @@ -2392,8 +2392,9 @@ void Driver::PrintHelp(bool ShowHidden) const {
}

llvm::Triple Driver::MakeSYCLDeviceTriple(StringRef TargetArch) const {
SmallVector<StringRef, 5> SYCLAlias = {"spir", "spir64", "spir64_fpga",
"spir64_x86_64", "spir64_gen"};
SmallVector<StringRef, 5> SYCLAlias = {
"spir", "spir64", "spir64_fpga", "spir64_x86_64",
"spir64_gen", "spirv32", "spirv64"};
if (std::find(SYCLAlias.begin(), SYCLAlias.end(), TargetArch) !=
SYCLAlias.end()) {
llvm::Triple TT;
Expand Down Expand Up @@ -3699,7 +3700,7 @@ bool Driver::checkForSYCLDefaultDevice(Compilation &C,
if (const Arg *A = Args.getLastArg(options::OPT_fsycl_targets_EQ)) {
for (const char *Val : A->getValues()) {
llvm::Triple TT(C.getDriver().MakeSYCLDeviceTriple(Val));
if (TT.isSPIR() && TT.getSubArch() == llvm::Triple::NoSubArch)
if ((TT.isSPIROrSPIRV()) && TT.getSubArch() == llvm::Triple::NoSubArch)
// Default triple found
return false;
}
Expand Down Expand Up @@ -4177,7 +4178,7 @@ class OffloadingActionBuilder final {
// supported GPUs. sm_20 code should work correctly, if
// suboptimally, on all newer GPUs.
if (GpuArchList.empty()) {
if (ToolChains.front()->getTriple().isSPIRV())
if (ToolChains.front()->getTriple().isSPIROrSPIRV())
GpuArchList.push_back(CudaArch::Generic);
else
GpuArchList.push_back(DefaultCudaArch);
Expand Down Expand Up @@ -4449,7 +4450,7 @@ class OffloadingActionBuilder final {
// compiler phases, including backend and assemble phases.
ActionList AL;
Action *BackendAction = nullptr;
if (ToolChains.front()->getTriple().isSPIRV()) {
if (ToolChains.front()->getTriple().isSPIROrSPIRV()) {
// Emit LLVM bitcode for SPIR-V targets. SPIR-V device tool chain
// (HIPSPVToolChain) runs post-link LLVM IR passes.
types::ID Output = Args.hasArg(options::OPT_S)
Expand Down Expand Up @@ -4770,7 +4771,7 @@ class OffloadingActionBuilder final {
DA->registerDependentActionInfo(
ToolChains[I], /*BoundArch=*/StringRef(), Action::OFK_OpenMP);

if (!ToolChains[I]->getTriple().isSPIR()) {
if (!ToolChains[I]->getTriple().isSPIROrSPIRV()) {
// Create object from the deps bitcode.
auto *BA = C.MakeAction<BackendJobAction>(DA, types::TY_PP_Asm);
auto *AA = C.MakeAction<AssembleJobAction>(BA, types::TY_Object);
Expand Down Expand Up @@ -5311,7 +5312,7 @@ class OffloadingActionBuilder final {
auto TargetTriple = TC->getTriple();
auto IsNVPTX = TargetTriple.isNVPTX();
auto IsAMDGCN = TargetTriple.isAMDGCN();
auto IsSPIR = TargetTriple.isSPIR();
auto IsSPIR = TargetTriple.isSPIROrSPIRV();
bool IsSpirvAOT = TargetTriple.isSPIRAOT();
const bool IsSYCLNativeCPU =
TC->getAuxTriple() &&
Expand Down Expand Up @@ -6167,7 +6168,7 @@ class OffloadingActionBuilder final {
// If any section found is an 'image' based object that was created
// with the intention of not requiring the matching SYCL target, do
// not emit the diagnostic.
if (SyclTarget.TC->getTriple().isSPIR()) {
if (SyclTarget.TC->getTriple().isSPIROrSPIRV()) {
bool SectionFound = false;
for (auto Section : UniqueSections) {
if (SectionFound)
Expand Down Expand Up @@ -6749,7 +6750,7 @@ class OffloadingActionBuilder final {
++TI) {
HasFPGATarget |= TI->second->getTriple().getSubArch() ==
llvm::Triple::SPIRSubArch_fpga;
HasSPIRTarget |= TI->second->getTriple().isSPIR();
HasSPIRTarget |= TI->second->getTriple().isSPIROrSPIRV();
}
bool isArchive = !(HostAction->getType() == types::TY_Object &&
isObjectFile(InputArg->getAsString(Args)));
Expand Down Expand Up @@ -9035,8 +9036,8 @@ InputInfoList Driver::BuildJobsForActionNoCache(
} else if (types::isFPGA(JA->getType())) {
std::string Ext(types::getTypeTempSuffix(JA->getType()));
types::ID TI = types::TY_Object;
if (EffectiveTriple.isSPIR()) {
if (!UI.DependentToolChain->getTriple().isSPIR())
if (EffectiveTriple.isSPIROrSPIRV()) {
if (!UI.DependentToolChain->getTriple().isSPIROrSPIRV())
continue;
// Output file from unbundle is FPGA device. Name the file
// accordingly.
Expand Down Expand Up @@ -10120,6 +10121,8 @@ const ToolChain &Driver::getOffloadingDeviceToolChain(
switch (Target.getArch()) {
case llvm::Triple::spir:
case llvm::Triple::spir64:
case llvm::Triple::spirv32:
case llvm::Triple::spirv64:
TC = std::make_unique<toolchains::SYCLToolChain>(*this, Target, HostTC,
Args);
break;
Expand Down
4 changes: 2 additions & 2 deletions clang/lib/Driver/OffloadBundler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -614,11 +614,11 @@ class ObjectFileHandler final : public FileHandler {
// input is a bitcode for spir target we need to remove module-level
// inline asm from it, if there is one, and recreate the buffer with new
// contents.
// TODO: remove this workaround once spir target gets asm parser.
// TODO: remove this workaround once spir/spirv target gets asm parser.
if (isBitcode((const unsigned char *)Buf->getBufferStart(),
(const unsigned char *)Buf->getBufferEnd()))
if (getTargetTriple(BundlerConfig.TargetNames[I], BundlerConfig)
.isSPIR()) {
.isSPIROrSPIRV()) {
SMDiagnostic Err;
std::unique_ptr<Module> Mod = parseIR(*Buf, Err, Context);
if (!Mod)
Expand Down
5 changes: 3 additions & 2 deletions clang/lib/Driver/SanitizerArgs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1139,8 +1139,9 @@ void SanitizerArgs::addArgs(const ToolChain &TC, const llvm::opt::ArgList &Args,
return;
GPUSanitize = true;
}
// SPIR sanitizer support is experimental and will pass a fixed set of flags
if (TC.getTriple().isSPIR()) {
// SPIR/SPIRV sanitizer support is experimental and will pass a fixed set of
// flags
if (TC.getTriple().isSPIROrSPIRV()) {
if (Sanitizers.has(SanitizerKind::Address)) {
CmdArgs.push_back("-fsanitize=address");
CmdArgs.push_back("-fsanitize-address-use-after-return=never");
Expand Down
4 changes: 2 additions & 2 deletions clang/lib/Driver/ToolChain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1537,8 +1537,8 @@ llvm::opt::DerivedArgList *ToolChain::TranslateOffloadTargetArgs(
DAL->append(A);
continue;
}
// SPIR-V special case for -mlong-double
if (getTriple().isSPIR() &&
// SPIR/SPIR-V special case for -mlong-double
if (getTriple().isSPIROrSPIRV() &&
A->getOption().matches(options::OPT_LongDouble_Group)) {
DAL->append(A);
continue;
Expand Down
Loading
Loading