Skip to content

Check CPU AVX-512 support before selecting ONNX GPU backends#303

Open
peteonrails wants to merge 1 commit intomainfrom
fix/onnx-avx512-backend-selection
Open

Check CPU AVX-512 support before selecting ONNX GPU backends#303
peteonrails wants to merge 1 commit intomainfrom
fix/onnx-avx512-backend-selection

Conversation

@peteonrails
Copy link
Copy Markdown
Owner

Summary

  • ONNX backend selector now checks /proc/cpuinfo for avx512f before recommending CUDA or ROCm binaries, which bundle ONNX Runtime with AVX-512 instructions
  • On CPUs without AVX-512 (e.g., Zen 3), falls back to onnx-avx2 instead of selecting a binary that will SIGILL
  • Adds a warning in voxtype setup onnx status output when GPU is detected but CPU lacks AVX-512
  • Improves error message in voxtype setup gpu --enable to explain the limitation and suggest alternatives
  • Removes "experimental" labeling from Parakeet across code output and documentation

Context

Reported by a user on Omarchy with a Ryzen 7 5700X3D (Zen 3, AVX2 only) and Radeon RX 6800. Running voxtype setup onnx --enable auto-selected the ROCm binary, which crashed with SIGILL due to 89K AVX-512 instructions in the bundled ONNX Runtime. The user had no path to working ONNX because the selector kept picking ROCm.

Test plan

  • On an AVX2-only system with AMD GPU: voxtype setup onnx --enable should select onnx-avx2, not onnx-rocm
  • On an AVX-512 system with AMD GPU: voxtype setup onnx --enable should still select onnx-rocm
  • voxtype setup onnx status output shows AVX-512 note when GPU detected but CPU lacks AVX-512
  • voxtype setup gpu --enable in ONNX mode on AVX2-only CPU shows helpful error with alternatives
  • Parakeet labels no longer show "(EXPERIMENTAL)" in show-config, setup check, setup model --list

The ONNX CUDA and ROCm binaries bundle prebuilt ONNX Runtime which
contains AVX-512 instructions. On CPUs without AVX-512 (e.g., Zen 3),
these binaries crash with SIGILL. The backend selector now checks
/proc/cpuinfo for avx512f before recommending GPU backends, falling
back to onnx-avx2 instead.

Also removes "experimental" labeling from Parakeet across code and
docs -- it's been stable and integrated into the setup system since
v0.5.0.

Closes #290
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant