TST: fix POWER VSX feature mapping#30801
Conversation
|
Alas, this still seems wonky on my Power9 machine. Applying this patch to and |
|
Hmm |
i have made a new commit |
Update features map and load_flags method for POWER architecture detection.
|
|
FWIW, applying e9376e8 (and the other two commits in this PR) makes the tests pass on my machine. |
|
seberg
left a comment
There was a problem hiding this comment.
LGTM, @abslock128w thanks and also thanks @nwf for testing! Feels a bit funky to run that /bin/true, but as it is a test that seems solid enough.
@abslock128w can you do a quick follow-up to strip trailing whitespace? The linter is unhappy (otherwise one of us will probably just do that soon and merge).
hey there thanks for the feedback!! |
|
|
@abslock128w one thing I still wonder about this PR: Did you also test this, or just based on @nwf testing for whether this actually works? |
i mean its based on nwf's testing |
|
It sounds like you have a POWER10 machine, and perhaps others, to test on? That'd be good to do, since I have only a POWER9 machine. :) |
|
|
@abslock128w Ping. A new 2.4 release is coming up, it would nice to have this fix in it. |
Hey there Charles, |
i have tested out the tests pass on my machine too! |
|
Thanks @abslock128w @nwf . |
TST: fix POWER VSX feature mapping (#30801)
** Problem**
On POWER systems, the CPU feature tests check for a literal "VSX" flag in AT_HWCAP. However, Linux never reports a "VSX" auxv flag. VSX is a baseline capability implied by POWER ISA ≥ 2.06, so the test-side detection incorrectly reports VSX as unavailable, causing false failures on POWER (e.g. Power10,power9).
turns out theres another issue too - on some POWER systems AT_HWCAP shows up in hex format like 0xdc0065c2 instead of the string format with actual flag names. the existing load_flags_auxv() only works with string format so it just fails when its hex.
This PR
Changes
1.fixed the features_map with correct ISA levels
2.rewrote load_flags() to check AT_PLATFORM and infer ISA levels from that
3.added _get_platform() helper to get the platform string
Note
test-only change, no runtime behavior modified. should work on both POWER9 and POWER10 now.
Fixes gh-30529