#1326·whisperX

[SOLVED] GPU Diarization on NVIDIA Blackwell (SM_121) - nvrtc architecture error

Author: MekopaCreated Jan 25, 2026Updated Sep 24, 2026

Problem

WhisperX fails on NVIDIA Blackwell GPUs (SM_121 - DGX Spark, GB10, GB200) with:

RuntimeError: nvrtc: error: invalid value for --gpu-architecture (-arch)

Affected Hardware:

  • NVIDIA DGX Spark (GB10)
  • Blackwell architecture (SM_121)
  • Any GPU with compute capability 12.1

What Works:

  • ✅ Step 1: Whisper transcription (GPU)
  • ✅ Step 2: Wav2Vec2 alignment (GPU)
  • ❌ Step 3: Pyannote diarization (crashes)

Fallback: Forcing CPU diarization works but is extremely slow (~2+ hours for 24 min audio vs 60 seconds on GPU).

Root Cause

The NVRTC compiler in current PyTorch/torchaudio doesn't recognize sm_121 (Blackwell) yet. The crash happens in torchaudio/compliance/kaldi.py when computing .abs() on complex FFT results, which triggers the Jiterator runtime compiler.

Python-level monkeypatching fails because Jiterator queries hardware architecture directly from C++.

Solution

I've created a patched Docker image that fixes this:

Docker Image: mekopa/whisperx-blackwell:latest

GitHub: https://github.com/Mekopa/whisperx-blackwell

Quick Start:

bash
docker pull mekopa/whisperx-blackwell:latest

docker run -d --gpus all -p 8003:8003 \
  -e HF_TOKEN="your_token" \
  mekopa/whisperx-blackwell:latest

Technical Details

The fix applies two patches during Docker build:

  1. Architecture Spoof: Force PyTorch's get_device_capability() to return (9, 0) (Hopper) instead of (12, 1) (Blackwell). SM_90 code runs natively on SM_121 due to binary compatibility.

  2. Jiterator Bypass: Patch torchaudio to compute complex absolute value manually instead of using the fused kernel:

python
# Instead of: spectrum = torch.fft.rfft(strided_input).abs()
fft_result = torch.fft.rfft(strided_input)
spectrum = torch.sqrt(fft_result.real**2 + fft_result.imag**2)

Performance

Metric CPU Fallback GPU (Patched)
24 min audio ~2 hours 62 seconds
Speedup - ~115x

When This Will Be Obsolete

This patch will become unnecessary when:

  • PyTorch/NVRTC adds official SM_121 support
  • Torchaudio updates its complex number operations

Until then, this is the only known way to run GPU speaker diarization on Blackwell.

Tested Configuration

  • Hardware: NVIDIA DGX Spark (ARM64, GB10)
  • PyTorch: 2.6.0 (NVIDIA container 25.01)
  • WhisperX: 3.3.1
  • Pyannote.audio: 3.3.2
  • CUDA: 13.0

Hope this helps others with Blackwell hardware!