Skip to content

Conversation

@DavidSpickett
Copy link
Contributor

These generate code that uses the SVE2 extension, as opposed to our existing builders that only use SVE. Therefore they will run on our Graviton 4 workers only, which are Neoverse v2 cores with SVE and SVE2.

The optimisation guide:
https://github.com/aws/aws-graviton-getting-started/blob/main/c-c++.md

Suggests -mcpu=neoverse-v2 for best performance, but here I'm using it just so we get the SVE2 feature enabled. If we used the balanced -mcpu=neoverse-512tvb, we wouldn't get SVE2 without fiddly extra flags.

$ ~/clang+llvm-18.1.8-aarch64-linux-gnu/bin/clang /tmp/test.c -o /dev/null -mcpu=neoverse-v2 -###
<...> "-target-feature" "+sve" "-target-feature" "+sve2-bitperm" "-target-feature" "+sve2" <...>

I have not added vector length settings as these builders will generate scalable ("length agnostic" - LA) code.

Otherwise, the builders have identical setups to the existing SVE VLA builders.

@DavidSpickett
Copy link
Contributor Author

The first 2 commits of this are #311. Please review only the last commit here.

@maxim-kuvyrkov please confirm that this is exactly what was requested.

@DavidSpickett
Copy link
Contributor Author

I've also confirmed that at least right now, these configurations are green. They will be silent to begin with anyway, so that we can work out any capacity issues.

Copy link
Contributor

@gkistanova gkistanova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Contributor

@maxim-kuvyrkov maxim-kuvyrkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the parallelism comment -- looks great. Thanks!

@omjavaid
Copy link
Contributor

This looks good to me overall. just one minor nit inline.

These generate code that uses the SVE2 extension, as opposed
to our existing builders that only use SVE. Therefore they will
run on our Graviton 4 workers only, which are Neoverse v2 cores
with SVE and SVE2.

The optimisation guide:
https://github.com/aws/aws-graviton-getting-started/blob/main/c-c++.md

Suggests -mcpu=neoverse-v2 for best performance, but here I'm using
it just so we get the SVE2 feature enabled. If we used the balanced
-mcpu=neoverse-512tvb, we wouldn't get SVE2 without fiddly extra flags.

```
$ ~/clang+llvm-18.1.8-aarch64-linux-gnu/bin/clang /tmp/test.c -o /dev/null -mcpu=neoverse-v2 -###
<...> "-target-feature" "+sve" "-target-feature" "+sve2-bitperm" "-target-feature" "+sve2" <...>
```

I have not added vector length settings as these builders will
generate scalable ("length agnostic" - LA) code.

Otherwise, the builders have identical setups to the existing SVE
VLA builders.
@DavidSpickett
Copy link
Contributor Author

CI failure is due to an unrelated change, merging.

@DavidSpickett DavidSpickett merged commit 063ec2d into llvm:main Nov 29, 2024
1 of 2 checks passed
@DavidSpickett DavidSpickett deleted the sve2-builders branch November 29, 2024 11:18
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.

5 participants