Skip to content

[SYCL][CUDA] Enable multiple CUDA arch in the same SYCL build. #2087

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from

Conversation

Naghasan
Copy link
Contributor

The patch refactored the SYCL offloading to account for bound arch as well as toolchains.
Compilation target are represented as a pair of a toolchain (one toolchain per target triple) and a bound arch (which encodes the target arch).

The LTO step is now performed per toolchain/bound arch pair and
the produced binary are then bundled per toolchain.

The patch also makes the bundler/unbundler use the bound arch when SYCL offloading if enabled.

Signed-off-by: Victor Lomuller [email protected]
Co-authored-by: Alexander Johnston [email protected]

The patch refactored the SYCL offloading to account for bound arch as well as toolchains.
Compilation target are represented as a pair of a toolchain (one toolchain per target triple) and a bound arch (which encodes the target arch).

The LTO step is now performed per toolchain/bound arch pair and
the produced binary are then bundled per toolchain.

The patch also makes the bundler/unbundler use the bound arch when SYCL offloading if enabled.

Signed-off-by: Victor Lomuller <[email protected]>
Co-authored-by: Alexander Johnston <[email protected]>
@Naghasan Naghasan force-pushed the victor/cuda-multi-arch branch from 451bbd3 to fe2b7e5 Compare July 10, 2020 11:36
@Ruyk Ruyk added the cuda CUDA back-end label Jul 10, 2020
@Ruyk Ruyk requested a review from bader July 10, 2020 11:41
Naghasan and others added 2 commits July 13, 2020 15:39
@bader bader requested a review from AGindinson July 16, 2020 16:33
@bader
Copy link
Contributor

bader commented Jul 22, 2020

@mdtoguchi, @AGindinson, please, take a look at this change.

auto &LI = LinkInputEnum.value();
const ToolChain *TC = SYCLTargetInfoList[LinkInputEnum.index()].TC;
const char *BoundArch =
SYCLTargetInfoList[LinkInputEnum.index()].BoundArch;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This for loop is pretty big, would it be better to assign BoundArch closer to where it is used for clarity? I guess you could look at it either way due to the fact that LinkInputEnum would be lost at the BoundArch use.

Comment on lines +4164 to +4165
// Note: this odd, but the test assert that a integration header
// is build no matter what. If only fsycl-add-targets is provided,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Note: this odd, but the test assert that a integration header
// is build no matter what. If only fsycl-add-targets is provided,
// Note: this is odd, but the test asserts that an integration header
// is built no matter what. If only fsycl-add-targets is provided,

@github-actions github-actions bot added the Stale label Feb 18, 2022
@github-actions github-actions bot closed this Mar 21, 2022
jsji pushed a commit that referenced this pull request Aug 11, 2023
Workaround unsupported freeze insn by:

replacing uses of freeze's result with freeze's source or a random (but compilation reproducible) constant if freeze's source is undef/poison
deleting freeze insn.
Long term solution is to add a freeze instruction extension in SPIR-V. Issue is tracked in (#1140)

Signed-off-by: Lu, John <[email protected]>

Original commit:
KhronosGroup/SPIRV-LLVM-Translator@ed25856
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda CUDA back-end Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants