Description
After upgrading from CTranslate2 4.7.0 to 4.8.0, Whisper word-timestamp alignment (WhisperModel.align(), called by faster-whisper's add_word_timestamps → find_alignment) crashes on a Tesla T4 (sm_75) with:
RuntimeError: parallel_for failed: cudaErrorInvalidDevice: invalid device ordinal
Plain transcription (encode/generate) is unaffected — only the alignment path fails. Pinning back to 4.7.0 resolves it completely, with no other change. I suspect the Thrust 1.12.0 → CCCL 2.7.0 swap in 4.8.0 (the only GPU-infra change in that release per the changelog), since parallel_for is the failing Thrust primitive and align() is the op that uses it.
Environment
- CTranslate2:
4.8.0 (broken) vs 4.7.0 (works) — single-variable change
- faster-whisper:
1.2.0 (constraint ctranslate2>=4.0,<5, so it floats to 4.8.0)
- GPU: NVIDIA Tesla T4 (compute capability 7.5), single GPU, no MIG, default
device_index=0
- Base image:
nvidia/cuda:12.4.1-cudnn-runtime-ubuntu22.04, Python 3.11
- Model:
large-v3, compute_type="float16", device="cuda"
Reproduction
from faster_whisper import WhisperModel
model = WhisperModel("large-v3", device="cuda", compute_type="float16")
# ~30s speech clip; word_timestamps triggers WhisperModel.align()
segments, _ = model.transcribe("audio.wav", word_timestamps=True, vad_filter=False)
for s in segments: # crash occurs while consuming the generator
print(s.words)
Traceback
File ".../faster_whisper/transcribe.py", line 1253, in generate_segments
self.add_word_timestamps(...)
File ".../faster_whisper/transcribe.py", line 1564, in add_word_timestamps
alignments = self.find_alignment(...)
File ".../faster_whisper/transcribe.py", line 1683, in find_alignment
results = self.model.align(...)
RuntimeError: parallel_for failed: cudaErrorInvalidDevice: invalid device ordinal
Workaround
Pin ctranslate2==4.7.0.
Notes
Reproduced deterministically across container restarts and model sizes (medium, large-v3). Likely related to but distinct from #2063 (also a 4.8.0 regression, but CPU-thread oversubscription on macOS).
Description
After upgrading from CTranslate2
4.7.0to4.8.0, Whisper word-timestamp alignment (WhisperModel.align(), called by faster-whisper'sadd_word_timestamps→find_alignment) crashes on a Tesla T4 (sm_75) with:Plain transcription (encode/generate) is unaffected — only the alignment path fails. Pinning back to
4.7.0resolves it completely, with no other change. I suspect the Thrust 1.12.0 → CCCL 2.7.0 swap in4.8.0(the only GPU-infra change in that release per the changelog), sinceparallel_foris the failing Thrust primitive andalign()is the op that uses it.Environment
4.8.0(broken) vs4.7.0(works) — single-variable change1.2.0(constraintctranslate2>=4.0,<5, so it floats to4.8.0)device_index=0nvidia/cuda:12.4.1-cudnn-runtime-ubuntu22.04, Python 3.11large-v3,compute_type="float16",device="cuda"Reproduction
Traceback
Workaround
Pin
ctranslate2==4.7.0.Notes
Reproduced deterministically across container restarts and model sizes (
medium,large-v3). Likely related to but distinct from #2063 (also a4.8.0regression, but CPU-thread oversubscription on macOS).