Skip to content

Fix [[nodiscard]] cudaDeviceEnablePeerAccess warning in gloo#498

Merged
meta-codesync[bot] merged 1 commit intopytorch:mainfrom
gyllstromk:export-D96004741
Mar 11, 2026
Merged

Fix [[nodiscard]] cudaDeviceEnablePeerAccess warning in gloo#498
meta-codesync[bot] merged 1 commit intopytorch:mainfrom
gyllstromk:export-D96004741

Conversation

@gyllstromk
Copy link
Copy Markdown
Contributor

Summary:
ROCm 7.0+ HIP headers annotate cudaDeviceEnablePeerAccess with
[[nodiscard]]. Add (void) cast to suppress the warning. The cast is a
no-op on CUDA and older ROCm.

ghstack-source-id: 0

Reviewed By: bbeckca

Differential Revision: D96004741

Summary:
ROCm 7.0+ HIP headers annotate cudaDeviceEnablePeerAccess with
[[nodiscard]]. Add (void) cast to suppress the warning. The cast is a
no-op on CUDA and older ROCm.

ghstack-source-id: 0

Reviewed By: bbeckca

Differential Revision: D96004741
@meta-cla meta-cla bot added the CLA Signed label Mar 11, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Mar 11, 2026

@gyllstromk has exported this pull request. If you are a Meta employee, you can view the originating Diff in D96004741.

@anvishwa-amd
Copy link
Copy Markdown

I had a PR to this earlier using different approach. Linking it here so we can compare and pick the best solution - https://github.com/pytorch/gloo/pull/493

@meta-codesync meta-codesync bot merged commit 2ba34a6 into pytorch:main Mar 11, 2026
15 of 16 checks passed
@kapilsh
Copy link
Copy Markdown

kapilsh commented Mar 16, 2026

I had a PR to this earlier using different approach. Linking it here so we can compare and pick the best solution - #493

@anvishwa-amd do you mind rebasing your PR on latest main? This PR already landed but we can take a look and try to merge.

@anvishwa-amd
Copy link
Copy Markdown

anvishwa-amd commented Mar 16, 2026

@anvishwa-amd do you mind rebasing your PR on latest main? This PR already landed but we can take a look and try to merge.

I've rebased my PR, Please have a look, Thank you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants