Windows AMD Driver Shim • PyTorch 2.3 • llama.cpp
CUDA-to-ROCm Bridge Dispatch Inspector
Inspect and verify NVIDIA CUDA DLL translation shims routing into AMD Windows MIOpen, rocBLAS, and hipSOLVER runtimes. Audit convolution gradients, kernel offload buffers, and catch silent numerical drift before hardware deployment.
Mapped Exports
74 / 268
cuDNN v8 DLL Shim
Max Relative L1 Diff
4.12e-7
vs CPU PyTorch
Memory Footprint
1.42 GB
VRAM + Compute Buf
Dispatch Status
PASS
Zero Nan / Correct
Active Dispatch Stream: PyTorch 2.3 Conv2d
AMD RX 9060 XT (RDNA 4)
PyTorch Host
F.conv2d fwd/bwd
→
nvcuda.dll / cuDNN
cudnnConvolution*
→
Bridge Shim
Layout NCHW → MIOpen
→
ROCm / MIOpen
miopenConvolution*
| CUDA API Entry | AMD ROCm Translation Target | Subsystem | Status | Measured Drift | Notes & Traps |
|---|
Strict Integrity Policy: Any operation returning unverified or corrupt numerical tensors (e.g. PyTorch SDPA without flash-attention GEMM parity) is trapped immediately as
UNSUPPORTED instead of silently returning garbage tensors to downstream loss functions.
CPU PyTorch Reference Slice [0..7]
--
AMD ROCm Bridge Output Slice [0..7]
--
Epsilon tolerance: 1e-4 | Max absolute error: 0.00000038 | Gradient check: PASSED
cuDNN v8 to MIOpen Translation Architecture
Native Windows AMD ROCm support relies on dynamic translation of standard NVIDIA cuDNN/CUDA exports. Rather than compiling source code with HIP-Clang, Windows binaries dynamically load cudnn64_8.dll and nvcuda.dll.
- Descriptor Transposition: Maps
cudnnTensorDescriptor_ttomiopenTensorDescriptor_twith explicit memory stride alignment. - Forward & Backward Gradients: Computes input gradients via
miopenConvolutionBackwardDataand weight filters viamiopenConvolutionBackwardWeights. - Algorithm Workspace Search: Allocates temporary device buffers for MIOpen GEMM/Winograd convolution algorithms.
Silent Corruption vs. Unsupported Trapping
A common hazard in GPU translation layers is silent corruption—where kernels report success (return code 0) but produce corrupted or zero-filled output tensors.
- PyTorch SDPA Bug: Scaled Dot-Product Attention often returns uninitialized tensors without throwing exceptions. This bridge shims it to
UNSUPPORTEDto force fallback. - CUDA Graph Warmup: Emulates
cudaGraphLaunchand node capture by recording stream dependencies into native ROCm HIP graph representations. - llama.cpp Offloading: Bypasses proprietary PTX 8.4 metadata by intercepting
cuLaunchKernelExand passing pre-compiled RDNA HIP binaries.