Skip to content

Commit 4889441

Browse files
authored
[SYCL] Disable cassert fallback SPV loading (#6176)
Currently, sycl-post-link tool will analyze user's device image and record which device libraries are actually required by user, sycl runtime will read the info and load the required fallback spv file. However, old compiler would always mark "cassert" fallback spv as required, this was to bypass a FE issue. So, if anyone uses old compiler + new SYCL runtime with online link enabled, unnecessary cassert fallback spv loading will be observed. This PR will ignore "cassert" fallback spv in sycl runtime, ignoring it is OK for now since "cassert" fallback has not been fully implemented. This PR depends on #6167 Signed-off-by: jinge90 <[email protected]>
1 parent cf8b41d commit 4889441

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

sycl/source/detail/program_manager/program_manager.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -992,6 +992,16 @@ ProgramManager::build(ProgramPtr Program, const ContextImplPtr Context,
992992
<< ")\n";
993993
}
994994

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

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

0 commit comments

Comments
 (0)