Skip to content

Commit

Permalink
Add AArch64 SVE2 Vector Length Agnostic builders
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
DavidSpickett committed Nov 20, 2024
1 parent 742a46a commit 682c0c8
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions buildbot/osuosl/master/config/builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,55 @@
"-DMLIR_RUN_ARM_SVE_TESTS=True",
"-DLLVM_LIT_ARGS='-v'"])},

# Note that this is SVE2 as opposed to SVE.
{'name' : "clang-aarch64-sve2-vla",
'tags' : ["clang"],
'workernames' : ["linaro-g4-01", "linaro-g4-02"],
'builddir': "clang-aarch64-sve2-vla",
'factory' : ClangBuilder.getClangCMakeBuildFactory(
clean=False,
checkout_flang=True,
runTestSuite=True,
env={
'NO_STOP_MESSAGE':'1', # For Fortran test-suite
},
testsuite_flags=[
'--cppflags', '-mcpu=neoverse-v2 -mllvm -scalable-vectorization=preferred -mllvm -treat-scalable-fixed-error-as-warning=false -O3',
'--threads=32', '--build-threads=32'],
extra_cmake_args=[
"-DCMAKE_C_FLAGS='-mcpu=neoverse-v2'",
"-DCMAKE_CXX_FLAGS='-mcpu=neoverse-v2'",
"-DLLVM_ENABLE_LLD=True",
"-DMLIR_INCLUDE_INTEGRATION_TESTS=True",
"-DMLIR_RUN_ARM_SVE_TESTS=True",
"-DLLVM_LIT_ARGS='-v'"])},

# AArch64 Clang+LLVM+RT+LLD check-all + flang + test-suite 2-stage with SVE2
# (not just SVE) Vector Length Agnostic codegen.
{'name' : "clang-aarch64-sve2-vla-2stage",
'tags' : ["clang"],
'workernames' : ["linaro-g4-01", "linaro-g4-02"],
'builddir': "clang-aarch64-sve2-vla-2stage",
'factory' : ClangBuilder.getClangCMakeBuildFactory(
clean=True,
checkout_flang=True,
useTwoStage=True,
testStage1=False,
runTestSuite=True,
env={
'NO_STOP_MESSAGE':'1', # For Fortran test-suite
},
testsuite_flags=[
'--cppflags', '-mcpu=neoverse-v2 -mllvm -scalable-vectorization=preferred -mllvm -treat-scalable-fixed-error-as-warning=false -O3',
'--threads=32', '--build-threads=32'],
extra_cmake_args=[
"-DCMAKE_C_FLAGS='-mcpu=neoverse-v2 -mllvm -scalable-vectorization=preferred -mllvm -treat-scalable-fixed-error-as-warning=false'",
"-DCMAKE_CXX_FLAGS='-mcpu=neoverse-v2 -mllvm -scalable-vectorization=preferred -mllvm -treat-scalable-fixed-error-as-warning=false'",
"-DLLVM_ENABLE_LLD=True",
"-DMLIR_INCLUDE_INTEGRATION_TESTS=True",
"-DMLIR_RUN_ARM_SVE_TESTS=True",
"-DLLVM_LIT_ARGS='-v'"])},

{'name' : "clang-arm64-windows-msvc-2stage",
'tags' : ["clang"],
'workernames' : ["linaro-armv8-windows-msvc-02"],
Expand Down

0 comments on commit 682c0c8

Please sign in to comment.