Skip to content

Commit 063ec2d

Browse files
Add AArch64 SVE2 Vector Length Agnostic builders (#317)
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.
1 parent 6ee9b98 commit 063ec2d

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

buildbot/osuosl/master/config/builders.py

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,9 @@
464464
"-DMLIR_RUN_ARM_SME_TESTS=True",
465465
"-DARM_EMULATOR_EXECUTABLE=qemu-aarch64"])},
466466

467+
# All SVE (as opposed to SVE2) builders are using optimisation flags
468+
# for Graviton 3 "balanced" from
469+
# https://github.com/aws/aws-graviton-getting-started/blob/main/c-c++.md.
467470

468471
# AArch64 Clang+LLVM+RT+LLD check-all + flang + test-suite +
469472
# mlir-integration-tests w/SVE-Vector-Length-Agnostic Note that in this and
@@ -566,6 +569,56 @@
566569
"-DMLIR_RUN_ARM_SVE_TESTS=True",
567570
"-DLLVM_LIT_ARGS='-v'"])},
568571

572+
# All SVE2 builders are using optimisation flags for Graviton 4 "performance" from
573+
# https://github.com/aws/aws-graviton-getting-started/blob/main/c-c++.md
574+
# (using balanced would not enable the SVE2 extension).
575+
576+
{'name' : "clang-aarch64-sve2-vla",
577+
'tags' : ["clang"],
578+
'workernames' : ["linaro-g4-01", "linaro-g4-02"],
579+
'builddir': "clang-aarch64-sve2-vla",
580+
'factory' : ClangBuilder.getClangCMakeBuildFactory(
581+
clean=False,
582+
checkout_flang=True,
583+
runTestSuite=True,
584+
env={
585+
'NO_STOP_MESSAGE':'1', # For Fortran test-suite
586+
},
587+
testsuite_flags=[
588+
'--cppflags', '-mcpu=neoverse-v2 -mllvm -scalable-vectorization=preferred -mllvm -treat-scalable-fixed-error-as-warning=false -O3',
589+
'--threads=48', '--build-threads=48'],
590+
extra_cmake_args=[
591+
"-DCMAKE_C_FLAGS='-mcpu=neoverse-v2'",
592+
"-DCMAKE_CXX_FLAGS='-mcpu=neoverse-v2'",
593+
"-DLLVM_ENABLE_LLD=True",
594+
"-DMLIR_INCLUDE_INTEGRATION_TESTS=True",
595+
"-DMLIR_RUN_ARM_SVE_TESTS=True"])},
596+
597+
# AArch64 Clang+LLVM+RT+LLD check-all + flang + test-suite 2-stage with SVE2
598+
# (not just SVE) Vector Length Agnostic codegen.
599+
{'name' : "clang-aarch64-sve2-vla-2stage",
600+
'tags' : ["clang"],
601+
'workernames' : ["linaro-g4-01", "linaro-g4-02"],
602+
'builddir': "clang-aarch64-sve2-vla-2stage",
603+
'factory' : ClangBuilder.getClangCMakeBuildFactory(
604+
clean=True,
605+
checkout_flang=True,
606+
useTwoStage=True,
607+
testStage1=False,
608+
runTestSuite=True,
609+
env={
610+
'NO_STOP_MESSAGE':'1', # For Fortran test-suite
611+
},
612+
testsuite_flags=[
613+
'--cppflags', '-mcpu=neoverse-v2 -mllvm -scalable-vectorization=preferred -mllvm -treat-scalable-fixed-error-as-warning=false -O3',
614+
'--threads=48', '--build-threads=48'],
615+
extra_cmake_args=[
616+
"-DCMAKE_C_FLAGS='-mcpu=neoverse-v2 -mllvm -scalable-vectorization=preferred -mllvm -treat-scalable-fixed-error-as-warning=false'",
617+
"-DCMAKE_CXX_FLAGS='-mcpu=neoverse-v2 -mllvm -scalable-vectorization=preferred -mllvm -treat-scalable-fixed-error-as-warning=false'",
618+
"-DLLVM_ENABLE_LLD=True",
619+
"-DMLIR_INCLUDE_INTEGRATION_TESTS=True",
620+
"-DMLIR_RUN_ARM_SVE_TESTS=True"])},
621+
569622
{'name' : "clang-arm64-windows-msvc-2stage",
570623
'tags' : ["clang"],
571624
'workernames' : ["linaro-armv8-windows-msvc-02"],

0 commit comments

Comments
 (0)