Skip to content

Conversation

@mdtoguchi
Copy link
Contributor

When passing -fsycl-targets to specify targets to offload to, the user can pass multiple targets. When those targets are meant to set various associated architectures, those architectures should only be set for a singular given toolchain/target.

Specifying a setting like -fsycl-targets=nvptx64,spir64_gen was setting the wrong device architecture for the spir64_gen compilation. The associated boundarch for nvptx64 (in this case sm_50) was being pushed to the spir64_gen target, causing the wrong device value to be used for the AOT compilation.

Fix this issue by fixing the logic in which we were assigning the bound architecture to a given triple. The logic was not taking into account non-spir64_gen targets, assigning the wrong arch when spir64_gen was encountered after the nvptx64 target.

When passing -fsycl-targets to specify targets to offload to, the user
can pass multiple targets.  When those targets are meant to set various
associated architectures, those architectures should only be set for a
singular given toolchain/target.

Specifying a setting like -fsycl-targets=nvptx64,spir64_gen was setting
the wrong device architecture for the spir64_gen compilation.  The
associated boundarch for nvptx64 (in this case sm_50) was being pushed
to the spir64_gen target, causing the wrong device value to be used for
the AOT compilation.

Fix this issue by fixing the logic in which we were assigning the bound
architecture to a given triple.  The logic was not taking into account
non-spir64_gen targets, assigning the wrong arch when spir64_gen was
encountered after the nvptx64 target.
@mdtoguchi
Copy link
Contributor Author

CI failures are known and were introduced here: #15407 (comment)

@mdtoguchi
Copy link
Contributor Author

@intel/llvm-gatekeepers , this should be ready for merge, failures are not caused by this PR as noted in #15501 (comment)

@mdtoguchi
Copy link
Contributor Author

@intel/llvm-gatekeepers, reran testing and all is clean now, please consider for merge.

@steffenlarsen steffenlarsen merged commit 255a774 into intel:sycl Oct 2, 2024
22 of 24 checks passed
@mdtoguchi mdtoguchi deleted the bad-arch-setting branch October 7, 2024 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants