Skip to content

Commit 36fb61c

Browse files
authored
[SYCL] Enable loading cl_intel_devicelib_assert fallback spv (#12009)
Previously, we disabled cl_intel_devicelib_assert fallback spv in #6176 to bypass a Clang FE issue which existed in legacy compiler. Now, the legacy compiler is out of date, we don't need this workaround any more, so enable loading cl_intel_devicelib_assert fallback spv again. This PR also updates some comments in sycl-post-link. Signed-off-by: jinge90 <[email protected]>
1 parent 852a5fe commit 36fb61c

File tree

2 files changed

+10
-20
lines changed

2 files changed

+10
-20
lines changed

llvm/tools/sycl-post-link/SYCLDeviceLibReqMask.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -657,16 +657,16 @@ SYCLDeviceLibFuncMap SDLMap = {
657657
// is an unsigned int32. getDeviceLibBit checks which fallback device library
658658
// is required for FuncName and returns the corresponding bit. The corresponding
659659
// mask for each fallback device library is:
660-
// fallback-cassert: 0x1
661-
// fallback-cmath: 0x2
662-
// fallback-cmath-fp64: 0x4
663-
// fallback-complex: 0x8
664-
// fallback-complex-fp64: 0x10
665-
// fallback-cstring: 0x20
666-
// fallback-imf: 0x40
667-
// fallback-imf-fp64: 0x80
668-
// fallback-imf-bf16: 0x100
669-
// fallback-bfloat16: 0x200
660+
// cl_intel_devicelib_assert: 0x1
661+
// cl_intel_devicelib_math: 0x2
662+
// cl_intel_devicelib_math_fp64: 0x4
663+
// cl_intel_devicelib_complex: 0x8
664+
// cl_intel_devicelib_complex_fp64: 0x10
665+
// cl_intel_devicelib_cstring : 0x20
666+
// cl_intel_devicelib_imf: 0x40
667+
// cl_intel_devicelib_imf_fp64: 0x80
668+
// cl_intel_devicelib_imf_bf16: 0x100
669+
// cl_intel_devicelib_bfloat16: 0x200
670670
uint32_t getDeviceLibBits(const std::string &FuncName) {
671671
auto DeviceLibFuncIter = SDLMap.find(FuncName);
672672
return ((DeviceLibFuncIter == SDLMap.end())

sycl/source/detail/program_manager/program_manager.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,16 +1278,6 @@ ProgramManager::ProgramPtr ProgramManager::build(
12781278
<< ")\n";
12791279
}
12801280

1281-
// TODO: old sycl compiler always marks cassert fallback device library as
1282-
// "required", this will lead to compatibilty issue when we enable online
1283-
// link in SYCL runtime. If users compile their code with old compiler and run
1284-
// their executable with latest SYCL runtime, cassert fallback spv file will
1285-
// always be loaded which is not expected, cassert device library development
1286-
// is still in progress, the unexpected loading may lead to runtime problem.
1287-
// So, we clear bit 0 in device library require mask to avoid loading cassert
1288-
// fallback device library and will revert this when cassert development is
1289-
// done.
1290-
DeviceLibReqMask &= 0xFFFFFFFE;
12911281
bool LinkDeviceLibs = (DeviceLibReqMask != 0);
12921282

12931283
// TODO: this is a temporary workaround for GPU tests for ESIMD compiler.

0 commit comments

Comments
 (0)