forked from intel/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SYCL][Driver] Move offload mismatch warning into SYCLActionBuilder (i…
…ntel#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 intel#6636 and intel#7300
- Loading branch information
Showing
6 changed files
with
119 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters