fix: Skip llama_cpp tests on CPUs without AVX2 support #3646
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fatal Python error: Illegal instructionBackground
The llama_cpp tests have been regularly failing in CI with:
This happens because
llama_cppuses AVX2 CPU instructions that aren't available on all GitHub Actions runners. Since runners are heterogeneous, the tests are flaky - they pass on some runners and crash on others.Example failure: https://github.com/pydantic/pydantic-ai/actions/runs/19935894476
Solution
Add a check for AVX2 support on Linux by reading
/proc/cpuinfo. If AVX2 is not available, the tests are skipped gracefully rather than crashing.Test plan
🤖 Generated with Claude Code