Skip to content
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

[SYCL][Driver][HIP] Do not define __CUDA_ARCH__ for HIP-AMD targets #15443

Merged
merged 13 commits into from
Oct 17, 2024

Conversation

GeorgeWeb
Copy link
Contributor

@GeorgeWeb GeorgeWeb commented Sep 19, 2024

Fixes #15544

@GeorgeWeb
Copy link
Contributor Author

Requires #15521 to get merged to rebase on those changes for the sycl-cuda-arch-macro.cpp clang Driver test.

@GeorgeWeb GeorgeWeb force-pushed the georgi/hip-undef-cuda-arch branch from 95a29e6 to 7062717 Compare October 3, 2024 10:08
@GeorgeWeb GeorgeWeb marked this pull request as ready for review October 3, 2024 10:09
@GeorgeWeb GeorgeWeb requested review from a team as code owners October 3, 2024 10:09
@GeorgeWeb GeorgeWeb marked this pull request as draft October 3, 2024 11:23
@GeorgeWeb GeorgeWeb force-pushed the georgi/hip-undef-cuda-arch branch from 6c5e501 to bf72790 Compare October 4, 2024 10:56
@GeorgeWeb GeorgeWeb marked this pull request as ready for review October 4, 2024 11:20
@@ -309,7 +309,6 @@ void AMDGPUTargetInfo::getTargetDefines(const LangOptions &Opts,
Twine("\"") + Twine(CanonName) + Twine("\""));
Builder.defineMacro("__amdgcn_target_id__",
Twine("\"") + Twine(*getTargetID()) + Twine("\""));
Builder.defineMacro("__CUDA_ARCH__", "0");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

NOTE:
This was previously added to avoid setting it to a non-zero value but is not needed anymore after the changes in this PR completely disable the definition of the macro for SYCL offload. Additionally, the upstream llvm-project doesn't have this line https://github.com/llvm/llvm-project/blob/main/clang/lib/Basic/Targets/AMDGPU.cpp#L311.

Copy link
Contributor

@elizabethandrews elizabethandrews left a comment

Choose a reason for hiding this comment

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

FE LGTM

@GeorgeWeb
Copy link
Contributor Author

GeorgeWeb commented Oct 8, 2024

The check-clang failure in sycl-device-traits-macros-amdgcn is from rebase on latest and is fixed in this PR #15633.

Update: Merged latest sycl branch that includes the above fix so all is passing now.

@GeorgeWeb
Copy link
Contributor Author

@intel/llvm-gatekeepers This should be good merge now. Thanks!

@sarnex
Copy link
Contributor

sarnex commented Oct 14, 2024

@GeorgeWeb The AMD runner is not doing too hot so we won't have E2E HIP testing for a bit (I'm working on it ASAP), are you confident this is sufficiently tested in compile-time tests? Thanks

@GeorgeWeb
Copy link
Contributor Author

GeorgeWeb commented Oct 14, 2024

@GeorgeWeb The AMD runner is not doing too hot so we won't have E2E HIP testing for a bit (I'm working on it ASAP), are you confident this is sufficiently tested in compile-time tests? Thanks

Good reminder. I forgot that was the reason I didn't ping for merging on Friday. I've run local testing last week but I'd rather it pass the precommit here. It's not a patch of high importance at the moment.

@sarnex
Copy link
Contributor

sarnex commented Oct 14, 2024

@GeorgeWeb We don't have plans do to HIP testing in precommit for a while because the runner is in such bad shape, but we will have it in post commit when I can fix the runner. If you tested locally and are confident it should work I'm happy to merge the patch and wait and see, just wanted to check your confidence level.

@sarnex
Copy link
Contributor

sarnex commented Oct 17, 2024

I fixed the HIP AMD runner so I'll merge this now

@sarnex sarnex merged commit 65e642e into intel:sycl Oct 17, 2024
12 checks passed
stephenswat added a commit to stephenswat/traccc that referenced this pull request Jan 24, 2025
This commit updates NVIDIA CCCL to version 2.7.0 and starts following
the official repository rather than my fork.

In order to make this work, I had to incorporate a temporary workaround
for intel/llvm#15544 until we start using a
release with intel/llvm#15443.

Closes acts-project#660.
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.

__CUDA_ARCH__ is defined when compiling AOT for HIP
4 participants