Skip to content

huggingface amp_bf16 inference accuracy openai/whisper-tiny got fail_accuracy #3290

@mengfei25

Description

@mengfei25

🐛 Describe the bug

[2026-04-09 08:53:42] loading model: 0it [00:05, ?it/s]
[2026-04-09 08:53:42] xpu  eval  openai/whisper-tiny
[2026-04-09 08:53:48] E0409 08:53:48.041000 176105 torch/_dynamo/utils.py:3365] dtype mismatch torch.float16, torch.bfloat16
[2026-04-09 08:53:48] fail_accuracy

Reproducer

docker run -it -e TZ=Aisa/Shanghai --device=/dev/mem --device=/dev/dri --group-add video --privileged --shm-size=8g intelgpu/ubuntu-24.04-rolling:26.05 bash
uv venv myvenv --python 3.10 --clear
source myvenv/bin/activate
uv pip install pip numpy 'setuptools<81' wheel

uv pip install torch torchvision torchaudio torchao --index-url https://download.pytorch.org/whl/nightly/xpu
uv pip install pip pandas psutil scipy requests
uv pip install -U numpy==1.26.4
uv pip install transformers==4.55.2 accelerate

git clone https://github.com/pytorch/pytorch -b nighlty --single-branch --depth 1
cd pytorch

python benchmarks/dynamo/huggingface.py --accuracy --amp -d xpu --amp-dtype bfloat16 --inference --only openai/whisper-tiny --cold-start-latency --backend=inductor --disable-cudagraphs -n 10

Versions

torch 2.12.0.dev20260408+xpu
Intel(R) Arc(TM) Pro B60 Graphics
6.17.0-14-generic
intel-opencl-icd 26.05.37020.3-124.04ppa2

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions