Skip to content

Take the ROCm SDK version for _rocm_init.py from the build environment - #5

Merged
cyyever merged 2 commits into
trimfrom
rocm-init-installed-sdk
Oct 23, 2026
Merged

cyyever merged 2 commits into
trimfrom
rocm-init-installed-sdk

Conversation

@cyyever

@cyyever cyyever commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

Draft until reviewed.

Agent details (AI-generated)

When PYTORCH_ROCM_SDK_VERSION is unset, dependencies.py falls back to the rocm package installed in the build environment, but CMake only generated _rocm_init.py from the variable. CMake now uses the same fallback, so the dependency pin and the preload always agree. With this in place the breadkernel ROCm manifest can install the SDK's rocm package into the build venv instead of passing the version through.

Tested: the CMake block was run with and without the variable (check_version = installed rocm / the variable).

🤖 Generated with Claude Code

cyyever and others added 2 commits October 23, 2026 05:15
tools/metadata/dependencies.py pins rocm[libraries] to PYTORCH_ROCM_SDK_VERSION,
or to the rocm package installed in the build environment when the variable
is unset, but torch/CMakeLists.txt only generated _rocm_init.py from the
variable. A build that installs the SDK's rocm package instead of exporting
the version got the dependency but no preload. Fall back to the installed
rocm package in CMake too, so both read the same version.

Test Plan:

```
cmake -P t.cmake                            # check_version='<installed rocm>'
PYTORCH_ROCM_SDK_VERSION=9.9.9 cmake -P t.cmake   # check_version='9.9.9'
```

Authored with an AI assistant (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rocm[libraries] leaves out rocm-sdk-device-gfx1201, which carries the GPU
code objects for rocBLAS, MIOpen and the other kpack-split libraries;
without it their kernels fail with hipErrorInvalidKernelFile.

Authored with an AI assistant (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cyyever
cyyever marked this pull request as ready for review October 23, 2026 05:20
@cyyever
cyyever merged commit 07115f2 into trim Oct 23, 2026
15 checks passed
@cyyever
cyyever deleted the rocm-init-installed-sdk branch October 23, 2026 05:20
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