llvm icon indicating copy to clipboard operation
llvm copied to clipboard

[SYCL] Fix image selection for AOT on intel_cpu_{spr, gnr}

Open jzc opened this issue 1 year ago • 0 comments

When AOT compiling for cpu, the generic spir64_x86_64 target is used with -fsycl-targets. In https://github.com/intel/llvm/pull/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, AOT/double.cpp, AOT/half.cpp).

jzc avatar Aug 27 '24 20:08 jzc