Build libtorchaudio GPU extensions on ROCm via HIPIFY (torchvision-style) - #17
Build libtorchaudio GPU extensions on ROCm via HIPIFY (torchvision-style)#17ethanwee1 wants to merge 1 commit into
Conversation
|
TheRock test build (Windows gfx110X-all) via ROCm/pytorch#3382: |
…io#16) Revert the temporary HIPIFY-based pin (ROCm/audio#17) back to the compat-shim port commit that passed TheRock Windows validation (28529085509). The HIPIFY setup.py approach still leaves CUDA headers unconverted; the cuda_compat.h port in ROCm/audio#16 is the validated path. The Windows cross-drive HIPIFY fix remains in torch/utils/cpp_extension.py (this PR); it is unrelated to the audio-side port strategy.
Update ethanwee1/audio ew/rocm-24803-hipify-gpu-ext to 0c7509ef with: - realpath-based hipify (Windows B:/C: alias) - reverted USE_ROCM header guard widening - -DUSE_CUDA on hipcc for GPU units only
|
HIPIFY v2 pushed (
ROCm/pytorch#3382 pin updated to this commit. |
|
HIPIFY v3 ( Test build (Windows gfx110X-all) via ROCm/pytorch#3382: https://github.com/ROCm/TheRock/actions/runs/28953516514 |
|
✅ SUCCESS — HIPIFY v3 build passed (Windows gfx110X-all): Produced |
There was a problem hiding this comment.
CUDAExtension does hipify under the hood. I'd like to see if we can use that hipify invocation in a way that will address the issues raised by this PR (the right header_include_dir for eg.). If torchaudio source needs an update instead, that's a viable path too, esp. since it'd be updates in our own fork.
Also, if hipify needs an update to handle the Windows issue with B:/C: drive, that's a legitimate path forward too.
In essence, I would prefer not to invoke hipify manually in torchaudio setup file, as that's not the developer example we want to set.
|
Thanks @jithunnair-amd — reworked to drop the manual
Context on why not just the built-in hipify: The Windows B:/C: This source-only version is byte-identical to the tree that previously built + passed GPU tests on gfx110X (784 torchaudio unit tests passed; rnnt/forced_align/cuda_ctc smoke). Pin in ROCm/pytorch#3382 updated to |
…header + guards) Addresses review feedback (jithunnair-amd) to not invoke hipify manually in the torchaudio setup file. Instead this ports libtorchaudio to ROCm via fork source updates only, relying on the built-in CUDAExtension hipify for the .cu source bodies: - cuda_compat.h maps the CUDA runtime symbols used in headers to their HIP equivalents under USE_ROCM. - Widen the rnnt/forced_align GPU #ifdef USE_CUDA guards, macros.h, and Options::stream_ to also cover USE_ROCM. - Route cub through hipcub under USE_ROCM. The Windows B:/C: subst cross-drive HIPIFY fix lives in ROCm/pytorch#3382 (torch/utils/cpp_extension.py).
9808bfc to
a0da46b
Compare
Point related_commits at the source-only HIP port (ROCm/audio#17) on release/2.11.0.1. Uses ethanwee1/audio fork until #17 merges; then flip origin to https://github.com/ROCm/audio. Companion: ROCm/audio#17, ROCm/pytorch cpp_extension fix (separate PR). ROCM-24803
|
Rebased onto TheRock validation build on combined branch Run: https://github.com/ROCm/TheRock/actions/runs/31709842398 Companion PRs:
cc @jithunnair-amd @pablo-garay for review |
|
Build failure analysis for run 31709842398: Not a PyTorch/torchaudio code issue. The build died in Install requirements before checkout/build started: The Redispatch using Pablo's ninja-tolerant workflow branch (same fix as users/garayp/win-ninja-tolerant) + the ROCm version from the July passing build: New run: https://github.com/ROCm/TheRock/actions/runs/31711078734
|
https://amd-hub.atlassian.net/browse/ROCM-24803
Summary
Rebased onto
release/2.11.0.1(b83203e8). Source-only ROCm GPU port — no manualhipify()insetup.py(addresses @jithunnair-amd review).Uses built-in
CUDAExtensionhipify for.cubodies; headers made HIP-safe viacuda_compat.h+USE_ROCMguard widening + hipcub routing.Companion PRs
CUDAExtensionrealpath fixrelated_commitspin (post-merge: flip origin toROCm/audio)Prior validation
Validation (this rebase)
TheRock Windows build on
ew/rocm-24803-validationafter rebase toa0da46b3.