Skip to content

Implement ROCm version check (installed vs torch) - #15

Open
rraminen wants to merge 3 commits into
ROCm:mainfrom
rraminen:implement_TORCH_HIP_VERSION
Open

rraminen wants to merge 3 commits into
ROCm:mainfrom
rraminen:implement_TORCH_HIP_VERSION

Conversation

@rraminen

@rraminen rraminen commented May 13, 2026

Copy link
Copy Markdown

Summary

  • On ROCm, cuda_version() now reports the installed ROCm version from rocm-core/rocm_version.h (ROCM_VERSION_MAJOR * 100 + ROCM_VERSION_MINOR), instead of TORCH_HIP_VERSION.
  • _check_cuda_version() compares that value to torch.version.rocm (major.minor) and raises a clear error if PyTorch and TorchAudio were built for different ROCm versions, mirroring the existing CUDA check.
  • Removed unused -DTORCH_HIP_VERSION compile flags from tools/setup_helpers/extension.py.

@rraminen
rraminen marked this pull request as ready for review May 19, 2026 18:15
Comment thread src/libtorchaudio/utils.cpp Outdated
Comment thread src/torchaudio/_extension/utils.py Outdated
Comment thread src/libtorchaudio/utils.cpp
Comment thread tools/setup_helpers/extension.py
@jithunnair-amd jithunnair-amd changed the title Implement HIP build version using TORCH_HIP_VERSION Implement ROCm version check (installed vs torch) Aug 20, 2026
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.

2 participants