Skip to content

[SYCL] Enable loading cl_intel_devicelib_assert fallback spv #12009

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 10 additions & 10 deletions llvm/tools/sycl-post-link/SYCLDeviceLibReqMask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -657,16 +657,16 @@ SYCLDeviceLibFuncMap SDLMap = {
// is an unsigned int32. getDeviceLibBit checks which fallback device library
// is required for FuncName and returns the corresponding bit. The corresponding
// mask for each fallback device library is:
// fallback-cassert: 0x1
// fallback-cmath: 0x2
// fallback-cmath-fp64: 0x4
// fallback-complex: 0x8
// fallback-complex-fp64: 0x10
// fallback-cstring: 0x20
// fallback-imf: 0x40
// fallback-imf-fp64: 0x80
// fallback-imf-bf16: 0x100
// fallback-bfloat16: 0x200
// cl_intel_devicelib_assert: 0x1
// cl_intel_devicelib_math: 0x2
// cl_intel_devicelib_math_fp64: 0x4
// cl_intel_devicelib_complex: 0x8
// cl_intel_devicelib_complex_fp64: 0x10
// cl_intel_devicelib_cstring : 0x20
// cl_intel_devicelib_imf: 0x40
// cl_intel_devicelib_imf_fp64: 0x80
// cl_intel_devicelib_imf_bf16: 0x100
// cl_intel_devicelib_bfloat16: 0x200
uint32_t getDeviceLibBits(const std::string &FuncName) {
auto DeviceLibFuncIter = SDLMap.find(FuncName);
return ((DeviceLibFuncIter == SDLMap.end())
Expand Down
10 changes: 0 additions & 10 deletions sycl/source/detail/program_manager/program_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1278,16 +1278,6 @@ ProgramManager::ProgramPtr ProgramManager::build(
<< ")\n";
}

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

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