You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SYCL][Driver] Move offload mismatch warning into SYCLActionBuilder (#7434)
The SYCLActionBuilder handles the parsing of the arguments to determine
the SYCL triples and architectures being used, so doing the check there
means we can just re-use that rather than having to parse the triples
and target arguments again.
This fixes the issue where for CUDA and HIP where the check failed to
take into account the offload architecture and would just compare the
section name that has the triple and the offload architecture against
just the triple which would always fail even when the triples and
offload architectures were otherwise matching.
The new binaries for the test where generated from a `dummy.cpp` C++
file containing just `void foo() {}`, and:
```
clang++ -fsycl -fsycl-targets=nvptx64-nvidia-cuda dummy.cpp -c -o objnvptx64-sm_50.o
llvm-ar cr libnvptx64-sm_50.a objnvptx64-sm_50.o
clang++ -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx908 dummy.cpp -c -o objamdgcn-gfx908.o -fno-sycl-libspirv
llvm-ar cr libamdgcn-gfx908.a objamdgcn-gfx908.o
```
This patch solves the incorrect warning issues reported in
#6636 and
#7300
// SPIR64_GEN_DIAG: linked binaries do not contain expected 'spir64_gen' target; found targets: 'spir64-unknown-unknown{{.*}}, spir64-unknown-unknown{{.*}}' [-Wsycl-target]
11
+
// SPIR64_GEN_DIAG: linked binaries do not contain expected 'spir64_gen-unknown-unknown' target; found targets: 'spir64-unknown-unknown{{.*}}, spir64-unknown-unknown{{.*}}' [-Wsycl-target]
// NVPTX64_DIAG: linked binaries do not contain expected 'nvptx64-nvidia-cuda-sm_60' target; found targets: 'nvptx64-nvidia-cuda-sm_50' [-Wsycl-target]
0 commit comments