Repository navigation
Fix cuDNN bindings and export HIP compiler compatibility flags - #18
Merged
Merged
Conversation
A trim integration replaced CUDA cuDNN constants and RNN enums with HIP/MIOpen names, making CUDA builds fail. Restore the cuDNN names and retain a separate MIOpen enum branch for ROCm. The HIP/libstdc++ compatibility flags were added only by Dependencies.cmake. Exported Torch consumers call LoadHIP.cmake directly, so their C++26 HIP compiler probes failed on placement operator delete declarations. Move the existing flags into LoadHIP.cmake before enable_language(HIP), preserving their use in PyTorch and downstream extensions. Test Plan ``` .venv/bin/spin lint -a -- --take CLANGFORMAT,NEWLINE,SPACES,TABS -- torch/csrc/cuda/shared/cudnn.cpp cmake/Dependencies.cmake cmake/public/LoadHIP.cmake git diff --check ``` A real HIP/C++26 extension configured, compiled and linked using the patched installed Torch CMake package and ROCm Clang 24. CUDA compilation passed the original cuDNN error. Complete wheel builds and GPU workloads remain pending. Prepared with an AI assistant.
cyyever
marked this pull request as ready for review
November 1, 2026 00:22
cyyever
added a commit
that referenced
this pull request
Nov 2, 2026
A trim integration replaced CUDA cuDNN constants and RNN enums with HIP/MIOpen names, making CUDA builds fail. Restore the cuDNN names and retain a separate MIOpen enum branch for ROCm. The HIP/libstdc++ compatibility flags were added only by Dependencies.cmake. Exported Torch consumers call LoadHIP.cmake directly, so their C++26 HIP compiler probes failed on placement operator delete declarations. Move the existing flags into LoadHIP.cmake before enable_language(HIP), preserving their use in PyTorch and downstream extensions. Test Plan ``` .venv/bin/spin lint -a -- --take CLANGFORMAT,NEWLINE,SPACES,TABS -- torch/csrc/cuda/shared/cudnn.cpp cmake/Dependencies.cmake cmake/public/LoadHIP.cmake git diff --check ``` A real HIP/C++26 extension configured, compiled and linked using the patched installed Torch CMake package and ROCm Clang 24. CUDA compilation passed the original cuDNN error. Complete wheel builds and GPU workloads remain pending. Prepared with an AI assistant.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CUDA wheel builds fail because the cuDNN binding uses HIP/MIOpen symbols. ROCm extension builds fail during HIP compiler detection because the libstdc++ compatibility flags are applied only inside PyTorch's own build.
Restore CUDA cuDNN symbols while retaining separate MIOpen enum bindings. Move the existing HIP compatibility flags into the exported
LoadHIP.cmake, beforeenable_language(HIP), so downstream Torch consumers inherit them.Validation:
spin lint(CLANGFORMAT, NEWLINE, SPACES, TABS) andgit diff --checkpassed. A real HIP/C++26 extension configured, compiled, and linked using the patched installed Torch CMake package and ROCm Clang 24. CUDA compilation passed the original cuDNN failure. Complete wheels and GPU workload validation remain pending.Agent details
Prepared with an OpenAI coding assistant at the repository owner's request.