Skip to content

Fix cuDNN bindings and export HIP compiler compatibility flags - #18

Merged
cyyever merged 1 commit into
trimfrom
fix/trim-cudnn-hip-export
Nov 1, 2026
Merged

cyyever merged 1 commit into
trimfrom
fix/trim-cudnn-hip-export

Conversation

@cyyever

@cyyever cyyever commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

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, before enable_language(HIP), so downstream Torch consumers inherit them.

Validation: spin lint (CLANGFORMAT, NEWLINE, SPACES, TABS) and git diff --check passed. 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.

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
cyyever marked this pull request as ready for review November 1, 2026 00:22
@cyyever
cyyever merged commit aad80a6 into trim Nov 1, 2026
51 checks passed
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.
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.

1 participant