llvm
8c635098 - [SYCL] Don't load all fallback spirv when launching from SPIRV file (#11734)

Commit
2 years ago
[SYCL] Don't load all fallback spirv when launching from SPIRV file (#11734) Currently, sycl-post-link tool scans user's device image to detect any undefined function call to items in fallback spirv devicelibs and create a property in final executable to tell which fallback devicelibs are really needed. SYCL runtime will load required fallback spirv libs according to this property. However, if "SYCL_USE_KERNEL_SPIRV" is used, the kernel is launched from spv file and sycl-post-link tool is not involved to scan and generate the property. Previously, we just load and link all fallback spv files and underlying runtime will remove them when they don't need those code. However, we received a lot of complains about seeing a lot of unnecessary code from underlying runtime. So, this PR is to avoid loading this unnecessary code. If anyone uses clang++ driver to generate spv file, this file won't depend on any functions from fallback spv since device code has to be linked with wrapper .obj to involve any functions from fallback spv.
Author
Parents
Loading