llvm
4ea26bb8 - [SYCL][SYCLBIN] Surface native AOT images for object-state bundle load (#22196)

Commit
128 days ago
[SYCL][SYCLBIN] Surface native AOT images for object-state bundle load (#22196) SYCLBINBinaries::getBestCompatibleImages only consulted native AOT binaries when the caller asked for bundle_state::executable. For bundle_state::object (or input) it consulted only the JIT image list. An AOT-only SYCLBIN produced via -fsyclbin=object with an AOT target (e.g. -fsycl-targets=spir64_gen) carries native binaries and zero JIT binaries, so the selector returned an empty list and get_kernel_bundle<bundle_state::object>(ctx, file) yielded an empty kernel_bundle. Any subsequent sycl::link of that bundle then threw "No exported symbol \"X\" found in linked images" because the AOT image's exported-symbol metadata never reached the link graph. ProgramManager::getBinImageState already classifies an AOT image with imported symbols as bundle_state::object (link still pending); the selector and the state-classifier disagreed. Fall back to the native image when no compatible JIT image is available and accept it iff its intrinsic state, as classified by getBinImageState, matches the requested bundle_state. JIT-preferred behavior for object-state requests is preserved for SYCLBINs that carry both representations, since urProgramLinkExp downstream still requires SPIR-V.
Author
Parents
Loading