Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SYCL] Fix image selection for AOT on intel_cpu_{spr, gnr} (#15208)
When AOT compiling for cpu, the generic `spir64_x86_64` target is used with `-fsycl-targets`. #14909, functionality was added to select device images based on their `compile_target` property in the image. The selection mechanism had to consider CPU as a special case due to not having explicit targets. However, the mechanism only considered `x86_64` and not `intel_cpu_spr` or `intel_cpu_gnr`; therefore on a `intel_cpu_spr` or `intel_cpu_gnr` device, trying to launch a program compiled with `-fsycl-targets=spir64_x86_64`, device image selection would fail to find an image (and thus fail to launch any kernels). This PR updates the logic to include `intel_cpu_spr` and `intel_cpu_gnr`. Note: for tests, this functionality is checked by any test that AOT compiled for CPU and launches a kernel (includes [AOT/cpu.cpp](https://github.com/intel/llvm/blob/sycl/sycl/test-e2e/AOT/cpu.cpp), [AOT/double.cpp](https://github.com/intel/llvm/blob/sycl/sycl/test-e2e/AOT/double.cpp), [AOT/half.cpp](https://github.com/intel/llvm/blob/sycl/sycl/test-e2e/AOT/half.cpp)).
- Loading branch information