fix(build): an RX_MARCH choice is not reported as a CPU without AVX2 #2223
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!2223
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/rx-march-message"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
With
RX_MARCH=znver2(Steam Deck, Zen 2: AVX2, FMA and more),nx2/build.pyprintedbuild: this CPU has no AVX2: the game is built for znver2 (a little slower). The message assumed any level other thanx86-64-v3was the CPU check's fallback.Change
this CPU has no AVX2is now printed only whenhost_march()chose the level. An explicitRX_MARCHother thanx86-64-v3is reported asbuild: the game is built for <march> (RX_MARCH). Flags are unchanged.Testing
tests/test_cpu_target.pygains a test that runs the actual selection block frombuild.pywith mockedRX_MARCHandhost_march()values. It fails on main (znver2reported as "no AVX2") and passes on Windows and Linux.Looks good. The message now says "no AVX2" only when
host_march()made the choice, and an explicitRX_MARCHis reported as such. The flags are untouched. The empty-stringRX_MARCHcase behaves the same as before (falls through tohost_march()), and the test's four cases cover both branches, including the silent ones. All CI checks are green and the PR is mergeable.Note on #2383 (single-precision FMA/FRECPS/FRSQRTS fused on x86-64-v3): it only touches the comment above this block in
nx2/build.py, so the two don't conflict. The interaction is that an explicitRX_MARCHnow gets a truthful message, which matters more once the fast path depends on the level. AnRX_MARCH=znver2build has FMA but is not x86-64-v3, so #2383 should key on the feature (__FMA__) rather than on the stringx86-64-v3. That is for #2383, not this PR.Nit: the test slices
build.pyby text andexecs it. That is fine here and matches how other tests in the repo work, but it will need updating if the block is reshaped.github-sync referenced this pull request2026-11-12 06:22:54 +00:00