Skip to content
Submit incident
AII-1001-89681
ConfirmedA court, a regulator or the organization itself has stated the core facts, or the record cites a court or regulator source.

PyTorch ctc_loss floating point exception on CUDA with empty tensors

PyTorch's ctc_loss function caused a floating point exception and core dump when called with empty tensors on CUDA devices, whereas the same call on CPU raised a proper error. A fix was applied to add input validation.

8 April 2025 Β· PyTorch Β· Reliability and hallucination
8 April 2025
AII-1001-896812 sources ↓
Quick facts
Organization
PyTorch (subject)
Category
Reliability and hallucination
Source
github.com
Date
8 April 2025
Drafted by
Raidu Incident Detection

What happened

Calling torch.nn.functional.ctc_loss with empty tensors on CUDA devices caused a floating point exception that crashed the program, while the CPU implementation properly raised a RuntimeError instead.

Reported impact

The unhandled exception resulted in a core dump, causing denial of service when the function was invoked with adversarial empty tensor inputs on CUDA.

Index analysis

A pull request added validation to check that the log_probs tensor is not empty before processing, applying consistent error handling between CPU and CUDA implementations.

Classification

Organization
PyTorch (subject)
Category
Reliability and hallucination
Harm status
Actual harm
Intent
Unintentional
Timing
Unknown
AI systems
PyTorch

Sources and evidence

This record was researched and written by the Index, based on the following original reporting.

github.com
https://github.com/pytorch/pytorch/issues/150835
github.com
PyTorch ctc_loss floating point exception on CUDA with empty tensors