🐛 Describe the bug
Describe the bug
torch._grouped_mm crashes with a fatal access violation (Exception Code 0xC0000005) on Windows with an AMD Radeon RX 9060 XT (gfx1200 / RDNA 4) using ROCm 7.2.1 PyTorch wheels. The process terminates immediately with no catchable Python exception — try/except cannot catch it.
Basic torch.mm on CUDA works fine. Only _grouped_mm crashes.
Minimal reproducible example
import torch
# This works fine
x = torch.randn(4, 4, device='cuda')
y = torch.randn(4, 4, device='cuda')
z = torch.mm(x, y)
print('basic cuda mm OK:', z.shape)
# This crashes the entire Python process (0xC0000005)
result = torch._grouped_mm(x.unsqueeze(0), y.unsqueeze(0))
print('grouped_mm OK') # never reached
Error output
basic cuda mm OK
Exception Code: 0xC0000005
#0 0x00007fffc9250000 (torch_hip.dll+0x0)
#1 at::cuda::_grouped_mm(...) (torch_hip.dll+0x270c4a9)
#2 at::cuda::_fused_adagrad_(...) (torch_hip.dll+0x288e711)
#3 at::_ops::_grouped_mm::redispatch(...) (torch_cpu.dll+0x1309a8f)
#4 torch::autograd::impl::JitDecompRegisterer::JitDecompRegisterer(...) (torch_cpu.dll+0x3b9518b)
#5 at::_ops::_grouped_mm::call(...) (torch_cpu.dll+0x1308a32)
System information
Expected behavior
torch._grouped_mm should either work correctly on gfx1200 Windows, or raise a catchable Python exception instead of fatally crashing the process.
Additional context
torch.mm, torch.cuda.is_available(), and basic tensor operations all work correctly on this GPU
- The crash is not catchable with
try/except - it terminates the entire Python process
- This also causes
import unsloth to crash, since Unsloth calls _grouped_mm during module initialization
- hipInfo correctly detects the GPU and reports gfx1200 architecture
- Training of CNN and ViT models works correctly using standard PyTorch operations
Versions
PyTorch version: 2.9.1+rocm7.2.1
Is debug build: False
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: 7.2.53211-158bd99533
OS: Microsoft Windows 11 Pro (10.0.26200 64-bit)
GCC version: Could not collect
Clang version: 21.0.0git (git@github.com:Compute-Mirrors/llvm-project 5dcc622b51ecd499912c1062ce2b0ecda60d8e93)
CMake version: Could not collect
Libc version: N/A
Python version: 3.12.2 (tags/v3.12.2:6abddd9, Feb 6 2024, 21:26:36) [MSC v.1937 64 bit (AMD64)] (64-bit runtime)
Python platform: Windows-11-10.0.26200-SP0
Is CUDA available: True
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to:
GPU models and configuration: AMD Radeon RX 9060 XT (gfx1200)
Nvidia driver version: Could not collect
cuDNN version: Could not collect
Is XPU available: False
HIP runtime version: 7.2.53211
MIOpen runtime version: 3.5.1
Is XNNPACK available: True
CPU:
Name: Intel(R) Core(TM) i5-9400F CPU @ 2.90GHz
Manufacturer: GenuineIntel
Family: 205
Architecture: 9
ProcessorType: 3
DeviceID: CPU0
CurrentClockSpeed: 2904
MaxClockSpeed: 2904
L2CacheSize: 1536
L2CacheSpeed: None
Revision: None
Versions of relevant libraries:
[pip3] numpy==2.4.6
[pip3] torch==2.9.1+rocm7.2.1
[pip3] torchao==0.17.0
[pip3] torchaudio==2.9.1+rocm7.2.1
[pip3] torchvision==0.24.1+rocm7.2.1
[pip3] triton-windows==3.7.0.post26
[conda] Could not collect
🐛 Describe the bug
Describe the bug
torch._grouped_mmcrashes with a fatal access violation (Exception Code0xC0000005) on Windows with an AMD Radeon RX 9060 XT (gfx1200 / RDNA 4) using ROCm 7.2.1 PyTorch wheels. The process terminates immediately with no catchable Python exception —try/exceptcannot catch it.Basic
torch.mmon CUDA works fine. Only_grouped_mmcrashes.Minimal reproducible example
Error output
System information
Expected behavior
torch._grouped_mmshould either work correctly on gfx1200 Windows, or raise a catchable Python exception instead of fatally crashing the process.Additional context
torch.mm,torch.cuda.is_available(), and basic tensor operations all work correctly on this GPUtry/except- it terminates the entire Python processimport unslothto crash, since Unsloth calls_grouped_mmduring module initializationVersions
PyTorch version: 2.9.1+rocm7.2.1
Is debug build: False
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: 7.2.53211-158bd99533
OS: Microsoft Windows 11 Pro (10.0.26200 64-bit)
GCC version: Could not collect
Clang version: 21.0.0git (git@github.com:Compute-Mirrors/llvm-project 5dcc622b51ecd499912c1062ce2b0ecda60d8e93)
CMake version: Could not collect
Libc version: N/A
Python version: 3.12.2 (tags/v3.12.2:6abddd9, Feb 6 2024, 21:26:36) [MSC v.1937 64 bit (AMD64)] (64-bit runtime)
Python platform: Windows-11-10.0.26200-SP0
Is CUDA available: True
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to:
GPU models and configuration: AMD Radeon RX 9060 XT (gfx1200)
Nvidia driver version: Could not collect
cuDNN version: Could not collect
Is XPU available: False
HIP runtime version: 7.2.53211
MIOpen runtime version: 3.5.1
Is XNNPACK available: True
CPU:
Name: Intel(R) Core(TM) i5-9400F CPU @ 2.90GHz
Manufacturer: GenuineIntel
Family: 205
Architecture: 9
ProcessorType: 3
DeviceID: CPU0
CurrentClockSpeed: 2904
MaxClockSpeed: 2904
L2CacheSize: 1536
L2CacheSpeed: None
Revision: None
Versions of relevant libraries:
[pip3] numpy==2.4.6
[pip3] torch==2.9.1+rocm7.2.1
[pip3] torchao==0.17.0
[pip3] torchaudio==2.9.1+rocm7.2.1
[pip3] torchvision==0.24.1+rocm7.2.1
[pip3] triton-windows==3.7.0.post26
[conda] Could not collect