Skip to content

Conversation

@zvookin
Copy link
Member

@zvookin zvookin commented Sep 17, 2025

Attempts to fix automatic target resolution setting SVE/SVE2 flags without a vector length as reported in issue #8529 .

Someone will need to test this on hardware that supports (at least) SVE. E.g. an AWS Graviton 3 or 4 system. I will not be able to do that personally in less than two weeks or so.

@zvookin
Copy link
Member Author

zvookin commented Sep 17, 2025

Note that the strangeness with only using __aarch64__ is trying to prevent compiling GCC/clang asm syntax on a random compiler that doesn't support it. I'm not real happy with the multiple preprocessor defines being used in the preexisting code, but also don't want to change existing behavior for this. The conditional compilation structure in Target.cpp is ripe for cleanup as well.

@zvookin
Copy link
Member Author

zvookin commented Sep 19, 2025

So far as I can tell, none of the build failures have anything to do with this PR.

@alexreinking
Copy link
Member

This seems fine, but I don't have a good way to test it. Also, it seems that it won't fix the issue in #8529 because that looks to be caused by a false-positive detection of SVE2 support... somewhere? Either in an old Linux kernel (Ubuntu 20.04 LTS is affected, but 24.04 LTS is not) or VMWare Fusion's CPU emulation.

@stevesuzuki-arm
Copy link
Contributor

I've confirmed this change fixes the issue on Graviton 4. I'd like this to be merged sooner rather than later because it should happen other Neoverse based cloud CPUs such as Grace, Axion, Cobalt, etc.

@zvookin
Copy link
Member Author

zvookin commented Nov 17, 2025

If Steve has verified this, it should get merged. I got as far as building on AWS and verifying it works on a couple setups but didn't get as far as spooling up a Graviton 4 instance. That said, it's a pretty trivial change, apparently it works, and it prevents the host CPU detection code from producing a target specification that is guaranteed to fail.

Per the rest of that issue, it's clearly a bug in other software, which appears to have since been fixed. That issue can be closed when this is merged.

@zvookin zvookin merged commit cd378f7 into main Nov 18, 2025
19 checks passed
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.

4 participants