New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SVE] Add support for the SVE target. #180

Merged
merged 1 commit into from Mar 14, 2018

Conversation

Projects
None yet
2 participants
@fpetrogalli-arm
Collaborator

fpetrogalli-arm commented Mar 13, 2018

This commit adds support for the AArch64 Scalable Vector Extension
(SVE) [1]. The vector functions are provided to target Vector Length
Agnostic (VLA) execution [2].

To build SLEEF with SVE support, a compiler that support the SVE Arm C
Language Extensions (ACLE) [2] must be used.

At the time of publishing this patch, the only compiler with SVE ACLE
support is Arm Compiler for HPC [3].

The Cmake configuration expectes Arm Instruction Emulator (ArmIE) [4]
to execute the tests on native AArch64 hardware without SVE support.

The SVE target is build without taking advantage of the native masking
capabilities of SVE. This will be targeted in a upcoming release of
SLEEF, together with the AVX512F native masking capabilities [5].

Additional changes introduced in this patch are:

  1. The mkrename* script have been modified to support VLA names in the
    functions. In particular, 'x' is used to represent the vector
    length of the SVE symbols.

  2. '__sizeless_struct' is a prototype language extension only
    implemented by Arm Compiler For HPC [3] to allow the declaration of
    SVE tuple types as described in section 3.4 of Arm C Language
    Extensions for SVE [2].

  3. A new 'iutsve' executable is generated to test the SVE functions.

[1] https://developer.arm.com/products/software-development-tools/hpc/sve
[2] https://developer.arm.com/docs/100987/0000
[3] https://developer.arm.com/products/software-development-tools/hpc/arm-compiler-for-hpc
[4] https://developer.arm.com/products/software-development-tools/hpc/arm-instruction-emulator
[5] #142

[SVE] Add support for the SVE target.
This commit adds support for the AArch64 Scalable Vector Extension
(SVE) [1]. The vector functions are provided to target Vector Length
Agnostic (VLA) execution [2].

To build SLEEF with SVE support, a compiler that support the SVE Arm C
Language Extensions (ACLE) [2] must be used.

At the time of publishing this patch, the only compiler with SVE ACLE
support is Arm Compiler for HPC [3].

The Cmake configuration expectes Arm Instruction Emulator (ArmIE) [4]
to execute the tests on native AArch64 hardware without SVE support.

The SVE target is build without taking advantage of the native masking
capabilities of SVE. This will be targeted in a upcoming release of
SLEEF, together with the AVX512F native masking capabilities [5].

Additional changes introduced in this patch are:

1. The mkrename* script have been modified to support VLA names in the
   functions. In particular, 'x' is used to represent the vector
   length of the SVE symbols.

2. '__sizeless_struct' is a prototype language extension only
   implemented by Arm Compiler For HPC [3] to allow the declaration of
   SVE tuple types as described in section 3.4 of Arm C Language
   Extensions for SVE [2].

3. A new 'iutsve' executable is generated to test the SVE functions.

[1] https://developer.arm.com/products/software-development-tools/hpc/sve
[2] https://developer.arm.com/docs/100987/0000
[3] https://developer.arm.com/products/software-development-tools/hpc/arm-compiler-for-hpc
[4] https://developer.arm.com/products/software-development-tools/hpc/arm-instruction-emulator
[5] #142

@fpetrogalli-arm fpetrogalli-arm requested a review from shibatch Mar 13, 2018

@shibatch

Looks good to me.
I confirmed that the test passes with SVE on my environment.
We need to think of a way to enable testing on a CI environment, though.

@fpetrogalli-arm

This comment has been minimized.

Collaborator

fpetrogalli-arm commented Mar 14, 2018

Did you use armclang and armie?

@shibatch

This comment has been minimized.

Owner

shibatch commented Mar 14, 2018

yes

@fpetrogalli-arm

This comment has been minimized.

Collaborator

fpetrogalli-arm commented Mar 14, 2018

Might be a good idea to report the ctest output here (just the run test/test passed).

@shibatch

This comment has been minimized.

Owner

shibatch commented Mar 14, 2018

Here you are.

[uduki]~/work/sleef3/sleef-enable-sve/build-aarch64$ ctest -j 4
Test project /import/namihei.naist.jp/home/n-sibata/work/sleef3/sleef-enable-sve/build-aarch64
      Start  1: iut
      Start  2: iutadvsimd
      Start  3: iutsve
      Start  4: gnuabi_compatibility_ADVSIMD
 1/18 Test  #4: gnuabi_compatibility_ADVSIMD ......   Passed    0.04 sec
      Start  5: gnuabi_compatibility_SVE
 2/18 Test  #5: gnuabi_compatibility_SVE ..........   Passed    0.01 sec
      Start  6: gnuabi_compatibility_SVE_masked
 3/18 Test  #6: gnuabi_compatibility_SVE_masked ...   Passed    0.01 sec
      Start  7: naivetestdp_1
 4/18 Test  #7: naivetestdp_1 .....................   Passed    0.04 sec
      Start  8: naivetestdp_2
 5/18 Test  #8: naivetestdp_2 .....................   Passed    0.02 sec
      Start  9: naivetestdp_3
 6/18 Test  #9: naivetestdp_3 .....................   Passed    0.03 sec
      Start 10: naivetestdp_4
 7/18 Test #10: naivetestdp_4 .....................   Passed    0.03 sec
      Start 11: naivetestdp_5
 8/18 Test #11: naivetestdp_5 .....................   Passed    0.04 sec
      Start 12: naivetestdp_10
 9/18 Test #12: naivetestdp_10 ....................   Passed    2.81 sec
      Start 13: naivetestsp_1
10/18 Test #13: naivetestsp_1 .....................   Passed    0.02 sec
      Start 14: naivetestsp_2
11/18 Test #14: naivetestsp_2 .....................   Passed    0.41 sec
      Start 15: naivetestsp_3
12/18 Test #15: naivetestsp_3 .....................   Passed    0.03 sec
      Start 16: naivetestsp_4
13/18 Test #16: naivetestsp_4 .....................   Passed    0.02 sec
      Start 17: naivetestsp_5
14/18 Test #17: naivetestsp_5 .....................   Passed    0.04 sec
      Start 18: naivetestsp_10
15/18 Test #18: naivetestsp_10 ....................   Passed    2.85 sec
16/18 Test  #1: iut ...............................   Passed  334.39 sec
17/18 Test  #2: iutadvsimd ........................   Passed  352.21 sec
18/18 Test  #3: iutsve ............................   Passed  672.23 sec

100% tests passed, 0 tests failed out of 18

Total Test time (real) = 672.43 sec
[uduki]~/work/sleef3/sleef-enable-sve/build-aarch64$
@fpetrogalli-arm

This comment has been minimized.

Collaborator

fpetrogalli-arm commented Mar 14, 2018

Thanks. What system are you using?

@fpetrogalli-arm fpetrogalli-arm merged commit e4217b4 into master Mar 14, 2018

4 checks passed

continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@shibatch

This comment has been minimized.

Owner

shibatch commented Mar 14, 2018

This one is Firefly-RK3399.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment