Skip to content

Commit 17ee3e2

Browse files
[SYCL][NATIVECPU] Add device library and initial subgroup support (#13979)
This PR implements SYCL NativeCPU runtime functions as C++ functions in a new native_cpu device library instead of materializing them by LLVM passes. This library also contains native_cpu implementations for many SYCL builtins, including for subgroup support. The PR will make at least the following e2e tests pass: ``` SubGroup/barrier.cpp SubGroup/broadcast.cpp SubGroup/broadcast_fp64.cpp SubGroup/common.cpp SubGroup/generic-shuffle.cpp SubGroup/shuffle_fp64.cpp SubGroup/sub_group_as.cpp SubGroup/sub_group_as_vec.cpp SubGroup/sub_group_by_value_semantics.cpp SubGroup/sub_groups_sycl2020.cpp ``` Other tests are currently skipped as the NativeCPU UR adapter does not yet report the new capabilities, which will be updated in a subsequent PR. --------- Co-authored-by: pietro.ghiglio <[email protected]>
1 parent 00b9b6d commit 17ee3e2

File tree

15 files changed

+651
-418
lines changed

15 files changed

+651
-418
lines changed

clang/lib/Driver/Driver.cpp

Lines changed: 54 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -5528,18 +5528,17 @@ class OffloadingActionBuilder final {
55285528
// device libraries are only needed when current toolchain is using
55295529
// AOT compilation.
55305530
bool SYCLDeviceLibLinked = false;
5531-
if (IsSPIR || IsNVPTX) {
5531+
Action *NativeCPULib = nullptr;
5532+
if (IsSPIR || IsNVPTX || IsSYCLNativeCPU) {
55325533
bool UseJitLink =
55335534
IsSPIR &&
55345535
Args.hasFlag(options::OPT_fsycl_device_lib_jit_link,
55355536
options::OPT_fno_sycl_device_lib_jit_link, false);
55365537
bool UseAOTLink = IsSPIR && (IsSpirvAOT || !UseJitLink);
55375538
SYCLDeviceLibLinked = addSYCLDeviceLibs(
55385539
TC, SYCLDeviceLibs, UseAOTLink,
5539-
C.getDefaultToolChain().getTriple().isWindowsMSVCEnvironment());
5540-
}
5541-
if (IsSYCLNativeCPU) {
5542-
SYCLDeviceLibLinked |= addSYCLNativeCPULibs(TC, SYCLDeviceLibs);
5540+
C.getDefaultToolChain().getTriple().isWindowsMSVCEnvironment(),
5541+
IsSYCLNativeCPU, NativeCPULib);
55435542
}
55445543
JobAction *LinkSYCLLibs =
55455544
C.MakeAction<LinkJobAction>(SYCLDeviceLibs, types::TY_LLVM_BC);
@@ -5622,6 +5621,15 @@ class OffloadingActionBuilder final {
56225621
};
56235622
Action *PostLinkAction = createPostLinkAction();
56245623
if (IsSYCLNativeCPU) {
5624+
if (NativeCPULib) {
5625+
// The native cpu device lib is linked without --only-needed
5626+
// as it contains builtins not referenced in source code but
5627+
// needed by the native cpu backend.
5628+
clang::driver::ActionList AllLibs = {FullDeviceLinkAction,
5629+
NativeCPULib};
5630+
FullDeviceLinkAction =
5631+
C.MakeAction<LinkJobAction>(AllLibs, types::TY_LLVM_BC);
5632+
}
56255633
// for SYCL Native CPU, we just take the linked device
56265634
// modules, lower them to an object file , and link it to the host
56275635
// object file.
@@ -5806,60 +5814,9 @@ class OffloadingActionBuilder final {
58065814
}
58075815
}
58085816

5809-
bool addSYCLNativeCPULibs(const ToolChain *TC,
5810-
ActionList &DeviceLinkObjects) {
5811-
std::string LibSpirvFile;
5812-
if (Args.hasArg(options::OPT_fsycl_libspirv_path_EQ)) {
5813-
auto ProvidedPath =
5814-
Args.getLastArgValue(options::OPT_fsycl_libspirv_path_EQ).str();
5815-
if (llvm::sys::fs::exists(ProvidedPath))
5816-
LibSpirvFile = ProvidedPath;
5817-
} else {
5818-
SmallVector<StringRef, 8> LibraryPaths;
5819-
5820-
// Expected path w/out install.
5821-
SmallString<256> WithoutInstallPath(C.getDriver().ResourceDir);
5822-
llvm::sys::path::append(WithoutInstallPath, Twine("../../clc"));
5823-
LibraryPaths.emplace_back(WithoutInstallPath.c_str());
5824-
5825-
// Expected path w/ install.
5826-
SmallString<256> WithInstallPath(C.getDriver().ResourceDir);
5827-
llvm::sys::path::append(WithInstallPath, Twine("../../../share/clc"));
5828-
LibraryPaths.emplace_back(WithInstallPath.c_str());
5829-
5830-
// Select libclc variant based on target triple.
5831-
// On Windows long is 32 bits, so we have to select the right remangled
5832-
// libclc version.
5833-
std::string LibSpirvTargetName =
5834-
(TC->getAuxTriple()->isOSWindows())
5835-
? "remangled-l32-signed_char.libspirv-"
5836-
: "remangled-l64-signed_char.libspirv-";
5837-
LibSpirvTargetName.append(TC->getTripleString() + ".bc");
5838-
5839-
for (StringRef LibraryPath : LibraryPaths) {
5840-
SmallString<128> LibSpirvTargetFile(LibraryPath);
5841-
llvm::sys::path::append(LibSpirvTargetFile, LibSpirvTargetName);
5842-
if (llvm::sys::fs::exists(LibSpirvTargetFile) ||
5843-
Args.hasArg(options::OPT__HASH_HASH_HASH)) {
5844-
LibSpirvFile = std::string(LibSpirvTargetFile.str());
5845-
break;
5846-
}
5847-
}
5848-
}
5849-
5850-
if (!LibSpirvFile.empty()) {
5851-
Arg *LibClcInputArg = MakeInputArg(Args, C.getDriver().getOpts(),
5852-
Args.MakeArgString(LibSpirvFile));
5853-
auto *SYCLLibClcInputAction =
5854-
C.MakeAction<InputAction>(*LibClcInputArg, types::TY_LLVM_BC);
5855-
DeviceLinkObjects.push_back(SYCLLibClcInputAction);
5856-
return true;
5857-
}
5858-
return false;
5859-
}
5860-
58615817
bool addSYCLDeviceLibs(const ToolChain *TC, ActionList &DeviceLinkObjects,
5862-
bool isSpirvAOT, bool isMSVCEnv) {
5818+
bool isSpirvAOT, bool isMSVCEnv, bool isNativeCPU,
5819+
Action *&NativeCPULib) {
58635820
int NumOfDeviceLibLinked = 0;
58645821
SmallVector<SmallString<128>, 4> LibLocCandidates;
58655822
SYCLInstallation.getSYCLDeviceLibPath(LibLocCandidates);
@@ -5876,6 +5833,14 @@ class OffloadingActionBuilder final {
58765833
SmallString<128> LibName(LLCandidate);
58775834
llvm::sys::path::append(LibName, DeviceLib);
58785835
if (llvm::sys::fs::exists(LibName)) {
5836+
5837+
// NativeCPU currently only needs libsycl-nativecpu_utils and
5838+
// libclc, so temporarily skip other device libs in invocation.
5839+
// Todo: remove once NativeCPU tests the other libraries.
5840+
if (isNativeCPU &&
5841+
!LibName.str().contains("libsycl-nativecpu_utils"))
5842+
continue;
5843+
58795844
++NumOfDeviceLibLinked;
58805845
Arg *InputArg = MakeInputArg(Args, C.getDriver().getOpts(),
58815846
Args.MakeArgString(LibName));
@@ -5909,14 +5874,24 @@ class OffloadingActionBuilder final {
59095874
}
59105875
if (!LibLocSelected)
59115876
LibLocSelected = !LibLocSelected;
5877+
5878+
// The device link stage may remove symbols not referenced in the
5879+
// source code. Since libsycl-nativecpu_utils contains such symbols
5880+
// which are later needed by the NativeCPU backend passes we link
5881+
// that library separately afterwards without --only-needed.
5882+
if (isNativeCPU) {
5883+
assert(!NativeCPULib);
5884+
NativeCPULib = DeviceLinkObjects.back();
5885+
DeviceLinkObjects.pop_back();
5886+
}
59125887
}
59135888
}
59145889
}
59155890

59165891
// For NVPTX backend we need to also link libclc and CUDA libdevice
59175892
// at the same stage that we link all of the unbundled SYCL libdevice
59185893
// objects together.
5919-
if (TC->getTriple().isNVPTX() && NumOfDeviceLibLinked) {
5894+
if ((TC->getTriple().isNVPTX() || isNativeCPU) && NumOfDeviceLibLinked) {
59205895
std::string LibSpirvFile;
59215896
if (Args.hasArg(options::OPT_fsycl_libspirv_path_EQ)) {
59225897
auto ProvidedPath =
@@ -5936,13 +5911,18 @@ class OffloadingActionBuilder final {
59365911
llvm::sys::path::append(WithInstallPath, Twine("../../../share/clc"));
59375912
LibraryPaths.emplace_back(WithInstallPath.c_str());
59385913

5914+
// TODO: check if the isNVPTX() path can also use
5915+
// TC->getTripleString() so that the conditional could be removed
5916+
const std::string TrStr =
5917+
isNativeCPU ? TC->getTripleString() : "nvptx64-nvidia-cuda";
5918+
59395919
// Select remangled libclc variant
5940-
std::string LibSpirvTargetName =
5941-
(TC->getAuxTriple()->isOSWindows())
5942-
? "remangled-l32-signed_char.libspirv-nvptx64-nvidia-cuda."
5943-
"bc"
5944-
: "remangled-l64-signed_char.libspirv-nvptx64-nvidia-cuda."
5945-
"bc";
5920+
StringRef LibSpirvTargetNamePref =
5921+
TC->getAuxTriple()->isOSWindows()
5922+
? "remangled-l32-signed_char.libspirv-"
5923+
: "remangled-l64-signed_char.libspirv-";
5924+
llvm::Twine LibSpirvTargetNameTemp = LibSpirvTargetNamePref + TrStr;
5925+
llvm::Twine LibSpirvTargetName = LibSpirvTargetNameTemp + ".bc";
59465926

59475927
for (StringRef LibraryPath : LibraryPaths) {
59485928
SmallString<128> LibSpirvTargetFile(LibraryPath);
@@ -5954,7 +5934,6 @@ class OffloadingActionBuilder final {
59545934
}
59555935
}
59565936
}
5957-
59585937
if (!LibSpirvFile.empty()) {
59595938
Arg *LibClcInputArg = MakeInputArg(Args, C.getDriver().getOpts(),
59605939
Args.MakeArgString(LibSpirvFile));
@@ -5963,6 +5942,11 @@ class OffloadingActionBuilder final {
59635942
DeviceLinkObjects.push_back(SYCLLibClcInputAction);
59645943
}
59655944

5945+
if (isNativeCPU) {
5946+
// return here to not generate cuda actions
5947+
return NumOfDeviceLibLinked != 0;
5948+
}
5949+
59665950
const toolchains::CudaToolChain *CudaTC =
59675951
static_cast<const toolchains::CudaToolChain *>(TC);
59685952
for (const auto &LinkInputEnum : enumerate(DeviceLinkerInputs)) {
@@ -9238,7 +9222,10 @@ InputInfoList Driver::BuildJobsForActionNoCache(
92389222
Action::OffloadKind DependentOffloadKind;
92399223
if (UI.DependentOffloadKind == Action::OFK_SYCL &&
92409224
TargetDeviceOffloadKind == Action::OFK_None &&
9241-
!(isSYCLNativeCPU(Args) && isSYCLNativeCPU(C.getDefaultToolChain().getTriple(), TC->getTriple())))
9225+
!(isSYCLNativeCPU(Args) &&
9226+
isSYCLNativeCPU(C.getDefaultToolChain().getTriple(),
9227+
TC->getTriple()) &&
9228+
UA->getDependentActionsInfo().size() > 1))
92429229
DependentOffloadKind = Action::OFK_Host;
92439230
else
92449231
DependentOffloadKind = UI.DependentOffloadKind;

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5623,10 +5623,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
56235623
// Let the FE know we are doing a SYCL offload compilation, but we are
56245624
// doing the host pass.
56255625
CmdArgs.push_back("-fsycl-is-host");
5626-
if (IsSYCLNativeCPU) {
5627-
CmdArgs.push_back("-D");
5628-
CmdArgs.push_back("__SYCL_NATIVE_CPU__");
5629-
}
56305626

56315627
if (!D.IsCLMode()) {
56325628
// SYCL library is guaranteed to work correctly only with dynamic

clang/lib/Driver/ToolChains/SYCL.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,15 @@ SYCL::getDeviceLibraries(const Compilation &C, const llvm::Triple &TargetTriple,
290290
const SYCLDeviceLibsList SYCLDeviceSanitizerLibs = {
291291
{"libsycl-sanitizer", "internal"}};
292292
#endif
293+
294+
const SYCLDeviceLibsList SYCLNativeCpuDeviceLibs = {
295+
{"libsycl-nativecpu_utils", "internal"}};
296+
297+
const bool isNativeCPU =
298+
(driver::isSYCLNativeCPU(Args) &&
299+
driver::isSYCLNativeCPU(C.getDefaultToolChain().getTriple(),
300+
TargetTriple));
301+
293302
bool IsWindowsMSVCEnv =
294303
C.getDefaultToolChain().getTriple().isWindowsMSVCEnvironment();
295304
bool IsNewOffload = C.getDriver().getUseNewOffloadingDriver();
@@ -368,6 +377,10 @@ SYCL::getDeviceLibraries(const Compilation &C, const llvm::Triple &TargetTriple,
368377
addLibraries(SYCLDeviceSanitizerLibs);
369378
}
370379
#endif
380+
381+
if (isNativeCPU)
382+
addLibraries(SYCLNativeCpuDeviceLibs);
383+
371384
return LibraryList;
372385
}
373386

clang/test/Driver/sycl-native-cpu-fsycl.cpp

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//UNSUPPORTED: (system-windows && !native_cpu)
12
//RUN: %clang -fsycl -fsycl-targets=native_cpu -fsycl-libspirv-path=%S/Inputs/SYCL/libspirv.bc -ccc-print-phases %s 2>&1 | FileCheck %s --check-prefix=CHECK_ACTIONS
23
//RUN: %clang -fsycl -fsycl-targets=native_cpu -fsycl-libspirv-path=%S/Inputs/SYCL/libspirv.bc -ccc-print-bindings %s 2>&1 | FileCheck %s --check-prefix=CHECK_BINDINGS
34
//RUN: %clang -fsycl -fsycl-targets=native_cpu -fsycl-libspirv-path=%S/Inputs/SYCL/libspirv.bc -### %s 2>&1 | FileCheck %s --check-prefix=CHECK_INVO
@@ -19,24 +20,29 @@
1920
//CHECK_ACTIONS: +- 7: compiler, {6}, ir, (host-sycl)
2021
//CHECK_ACTIONS: +- 8: backend, {7}, assembler, (host-sycl)
2122
//CHECK_ACTIONS: +- 9: assembler, {8}, object, (host-sycl)
22-
23-
//CHECK_ACTIONS:| +- 10: linker, {5}, ir, (device-sycl)
24-
//CHECK_ACTIONS:| |- 11: input, "{{.*}}libspirv{{.*}}", ir, (device-sycl)
25-
//CHECK_ACTIONS:| +- 12: linker, {10, 11}, ir, (device-sycl)
26-
//CHECK_ACTIONS:| +- 13: backend, {12}, assembler, (device-sycl)
27-
//CHECK_ACTIONS:| +- 14: assembler, {13}, object, (device-sycl)
28-
//CHECK_ACTIONS:|- 15: offload, "device-sycl ({{.*}})" {14}, object
29-
//CHECK_ACTIONS:| +- 16: sycl-post-link, {12}, tempfiletable, (device-sycl)
30-
//CHECK_ACTIONS:| +- 17: clang-offload-wrapper, {16}, object, (device-sycl)
31-
//CHECK_ACTIONS:|- 18: offload, "device-sycl ({{.*}})" {17}, object
32-
//CHECK_ACTIONS:19: linker, {9, 15, 18}, image, (host-sycl)
23+
//CHECK_ACTIONS: +- 10: linker, {5}, ir, (device-sycl)
24+
//CHECK_ACTIONS: |- [[SPIRVLIB:.*]]: input, "{{.*}}libspirv{{.*}}", ir, (device-sycl)
25+
//different libraries may be linked on different platforms, so just check the common stages
26+
//CHECK_ACTIONS: +- [[LINKALL:.*]]: linker, {10, [[SPIRVLIB]]}, ir, (device-sycl)
27+
//CHECK_ACTIONS: |- [[NCPUINP:.*]]: input, "{{.*}}nativecpu{{.*}}", ir, (device-sycl)
28+
//CHECK_ACTIONS: +- [[NCPULINK:.*]]: linker, {[[LINKALL]], [[NCPUINP]]}, ir, (device-sycl)
29+
//this is where we compile the device code to a shared lib, and we link the host shared lib and the device shared lib
30+
//CHECK_ACTIONS:| +- [[VAL81:.*]]: backend, {[[NCPULINK]]}, assembler, (device-sycl)
31+
//CHECK_ACTIONS:| +- [[VAL82:.*]]: assembler, {[[VAL81]]}, object, (device-sycl)
32+
//CHECK_ACTIONS:|- [[VAL822:.*]]: offload, "device-sycl ({{.*}})" {[[VAL82]]}, object
33+
//call sycl-post-link and clang-offload-wrapper
34+
//CHECK_ACTIONS:| +- [[VAL83:.*]]: sycl-post-link, {[[LINKALL]]}, tempfiletable, (device-sycl)
35+
//CHECK_ACTIONS:| +- [[VAL84:.*]]: clang-offload-wrapper, {[[VAL83]]}, object, (device-sycl)
36+
//CHECK_ACTIONS:|- [[VAL85:.*]]: offload, "device-sycl ({{.*}})" {[[VAL84]]}, object
37+
//CHECK_ACTIONS:[[VAL86:.*]]: linker, {9, [[VAL822]], [[VAL85]]}, image, (host-sycl)
3338

3439
//CHECK_BINDINGS:# "{{.*}}" - "clang", inputs: ["{{.*}}sycl-native-cpu-fsycl.cpp"], output: "[[KERNELIR:.*]].bc"
3540
//CHECK_BINDINGS:# "{{.*}}" - "Append Footer to source", inputs: ["{{.*}}sycl-native-cpu-fsycl.cpp"], output: "[[SRCWFOOTER:.*]].cpp"
3641
//CHECK_BINDINGS:# "{{.*}}" - "clang", inputs: ["[[SRCWFOOTER]].cpp", "[[KERNELIR]].bc"], output: "[[HOSTOBJ:.*]].o"
3742
//CHECK_BINDINGS:# "{{.*}}" - "SYCL::Linker", inputs: ["[[KERNELIR]].bc"], output: "[[KERNELLINK:.*]].bc"
3843
//CHECK_BINDINGS:# "{{.*}}" - "SYCL::Linker", inputs: ["[[KERNELLINK]].bc", "{{.*}}.bc"], output: "[[KERNELLINKWLIB:.*]].bc"
39-
//CHECK_BINDINGS:# "{{.*}}" - "clang", inputs: ["[[KERNELLINKWLIB]].bc"], output: "[[KERNELOBJ:.*]].o"
44+
//CHECK_BINDINGS:# "{{.*}}" - "SYCL::Linker", inputs: ["[[KERNELLINKWLIB]].bc", "[[UNBUNDLEDNCPU:.*]].bc"], output: "[[KERNELLINKWLIB12:.*]].bc"
45+
//CHECK_BINDINGS:# "{{.*}}" - "clang", inputs: ["[[KERNELLINKWLIB12]].bc"], output: "[[KERNELOBJ:.*]].o"
4046
//CHECK_BINDINGS:# "{{.*}}" - "SYCL post link", inputs: ["[[KERNELLINKWLIB]].bc"], output: "[[TABLEFILE:.*]].table"
4147
//CHECK_BINDINGS:# "{{.*}}" - "offload wrapper", inputs: ["[[TABLEFILE]].table"], output: "[[WRAPPEROBJ:.*]].o"
4248
//CHECK_BINDINGS:# "{{.*}}" - "{{.*}}::Linker", inputs: ["[[HOSTOBJ]].o", "[[KERNELOBJ]].o", "[[WRAPPEROBJ]].o"], output: "a.{{.*}}"
@@ -49,8 +55,8 @@
4955

5056
// checks that the device and host triple is correct in the generated actions when it is set explicitly
5157
//CHECK_ACTIONS-AARCH64: +- 6: offload, "host-sycl (aarch64-unknown-linux-gnu)" {2}, "device-sycl (aarch64-unknown-linux-gnu)" {5}, c++-cpp-output
52-
//CHECK_ACTIONS-AARCH64:|- 15: offload, "device-sycl (aarch64-unknown-linux-gnu)" {14}, object
53-
//CHECK_ACTIONS-AARCH64:|- 18: offload, "device-sycl (aarch64-unknown-linux-gnu)" {17}, object
58+
//CHECK_ACTIONS-AARCH64:|- 17: offload, "device-sycl (aarch64-unknown-linux-gnu)" {16}, object
59+
//CHECK_ACTIONS-AARCH64:|- 20: offload, "device-sycl (aarch64-unknown-linux-gnu)" {19}, object
5460

5561
// checks that bindings are correct when linking together multiple TUs on native cpu
5662
//CHECK_BINDINGS_MULTI_TU:# "{{.*}}" - "offload bundler", inputs: ["{{.*}}.o"], outputs: ["[[FILE1HOST:.*]].o", "[[FILE1DEV:.*]].o"]
@@ -59,8 +65,7 @@
5965
//CHECK_BINDINGS_MULTI_TU:# "{{.*}}" - "Convert SPIR-V to LLVM-IR if needed", inputs: ["[[FILE2DEV]].o"], output: "[[FILE2SPV:.*]].bc"
6066
//CHECK_BINDINGS_MULTI_TU:# "{{.*}}" - "SYCL::Linker", inputs: ["[[FILE1SPV]].bc", "[[FILE2SPV]].bc"], output: "[[LINK1:.*]].bc"
6167
//CHECK_BINDINGS_MULTI_TU:# "{{.*}}" - "SYCL::Linker", inputs: ["[[LINK1]].bc", "{{.*}}.bc"], output: "[[LINK2:.*]].bc"
62-
//CHECK_BINDINGS_MULTI_TU:# "{{.*}}" - "clang", inputs: ["[[LINK2]].bc"], output: "[[KERNELO:.*]].o"
68+
//CHECK_BINDINGS_MULTI_TU:# "{{.*}}" - "clang", inputs: ["{{.*}}.bc"], output: "[[KERNELO:.*]].o"
6369
//CHECK_BINDINGS_MULTI_TU:# "{{.*}}" - "SYCL post link", inputs: ["[[LINK2]].bc"], output: "[[POSTL:.*]].table"
6470
//CHECK_BINDINGS_MULTI_TU:# "{{.*}}" - "offload wrapper", inputs: ["[[POSTL]].table"], output: "[[WRAP:.*]].o"
6571
//CHECK_BINDINGS_MULTI_TU:# "{{.*}}" - "{{.*}}::Linker", inputs: ["[[FILE1HOST]].o", "[[FILE2HOST]].o", "[[KERNELO]].o", "[[WRAP]].o"], output: "{{.*}}"
66-

libdevice/cmake/modules/SYCLLibdevice.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,16 @@ if (NOT MSVC)
167167
sycl-compiler)
168168
endif()
169169

170+
if("native_cpu" IN_LIST SYCL_ENABLE_PLUGINS)
171+
if (NOT DEFINED NATIVE_CPU_DIR)
172+
message( FATAL_ERROR "Undefined UR variable NATIVE_CPU_DIR. The name may have changed." )
173+
endif()
174+
# Include NativeCPU UR adapter path to enable finding header file with state struct.
175+
# libsycl-nativecpu_utils is only needed as BC file by NativeCPU.
176+
# Todo: add versions for other targets (for cross-compilation)
177+
add_devicelib_bc(libsycl-nativecpu_utils SRC nativecpu_utils.cpp DEP ${itt_obj_deps} EXTRA_ARGS -I ${NATIVE_CPU_DIR} -fsycl-targets=native_cpu)
178+
endif()
179+
170180
add_devicelib(libsycl-itt-stubs SRC itt_stubs.cpp DEP ${itt_obj_deps})
171181
add_devicelib(libsycl-itt-compiler-wrappers SRC itt_compiler_wrappers.cpp DEP ${itt_obj_deps})
172182
add_devicelib(libsycl-itt-user-wrappers SRC itt_user_wrappers.cpp DEP ${itt_obj_deps})

0 commit comments

Comments
 (0)