Skip to content

Commit

Permalink
[SYCL][NATIVECPU] Support reqd_work_group_size on Native CPU (#13175)
Browse files Browse the repository at this point in the history
Adds support for the `reqd_work_group_size` attribute on Native CPU. The
change in the driver is required in order to have the metadata node
available in the runtime.
UR PR: oneapi-src/unified-runtime#1477
  • Loading branch information
PietroGhg committed May 15, 2024
1 parent ebdae02 commit 3fdfbfe
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/Clang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10595,7 +10595,7 @@ getTripleBasedSYCLPostLinkOpts(const ToolChain &TC, const JobAction &JA,
if (!(Triple.isAMDGCN()))
addArgs(PostLinkArgs, TCArgs, {"-emit-param-info"});
// Enable PI program metadata
if (Triple.isNVPTX() || Triple.isAMDGCN())
if (Triple.isNVPTX() || Triple.isAMDGCN() || isSYCLNativeCPU(TC))
addArgs(PostLinkArgs, TCArgs, {"-emit-program-metadata"});
if (OutputType != types::TY_LLVM_BC) {
assert(OutputType == types::TY_Tempfiletable);
Expand Down
1 change: 1 addition & 0 deletions clang/test/Driver/sycl-native-cpu-fsycl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
//CHECK_INVO:{{.*}}clang{{.*}}-fsycl-is-device{{.*}}"-fsycl-is-native-cpu" "-D" "__SYCL_NATIVE_CPU__"
//CHECK_INVO:{{.*}}clang{{.*}}"-fsycl-is-host"{{.*}}
//CHECK_INVO:{{.*}}clang{{.*}}"-x" "ir"
//CHECK_INVO:{{.*}}sycl-post-link{{.*}}"-emit-program-metadata"
//CHECK_INVO-NOT:{{.*}}sycl-post-link{{.*}}-emit-only-kernels-as-entry-points

// checks that the device and host triple is correct in the generated actions when it is set explicitly
Expand Down
8 changes: 7 additions & 1 deletion sycl/plugins/unified_runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,13 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT)

fetch_adapter_source(native_cpu
${UNIFIED_RUNTIME_REPO}
${UNIFIED_RUNTIME_TAG}
# commit 50452b75f0d1d7434f5beb4febd642af59a994ff
# Merge: 78b8e3e3 fa084d0a
# Author: Kenneth Benzie (Benie) <k.benzie@codeplay.com>
# Date: Wed May 15 10:37:42 2024 +0100
# Merge pull request #1477 from PietroGhg/pietro/reqd_work_group_size
# [NATIVECPU] Support reqd_work_group_size on Native CPU
50452b75f0d1d7434f5beb4febd642af59a994ff
)

if(SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO)
Expand Down

0 comments on commit 3fdfbfe

Please sign in to comment.