Introduction
The information here is provided to support the participants of the Arm SVE Hackathon at the Supercomputing Conference 2018.
ARM’s developer website includes documentation, tutorials, support resources and more.
Over the next few months we will be adding more developer resources and documentation for all the products and technologies that ARM provides.
CloseSorry, your browser is not supported. We recommend upgrading your browser. We have done our best to make all the documentation and resources available on old versions of Internet Explorer, but vector image support and the layout may not be optimal. Technical documentation is available as a PDF Download.
The information here is provided to support the participants of the Arm SVE Hackathon at the Supercomputing Conference 2018.
You'll need the following materials for this hackathon:
This supplement describes the Scalable Vector Extension to the ARMv8-A architecture profile. This is an EAC release.
This documentation package contains 3 folders:
In a number of places, the PDF file contains links to files in one of the other folders. These links are formatted with blue text and underlining in order to make them clearly identifiable. Clicking on a link in the PDF file will open the corresponding HTML file, which will render in your default browser.
To browse the HTML files for the instructions directly, navigate to the folder SVE-xml/xhtml and open the file index.html.
Note: Do not alter the directory structure, because this will break the links between the PDF file and associated XML/HTML content.
This document is a beta version of the ARM C language extensions (ACLE) for the ARM Scalable Vector Extension (SVE). The language extensions have two main purposes: to provide a set of types and accessors for SVE vectors and predicates, and to provide a function interface for all relevant SVE instructions.
In this example we show how to add two C arrays with the SVE Arm C language Extension (ACLE) intrinsics, using the Vector Length Agnostic (VLA) programming model. Step-by-step instructions on how to build the code with an SVE compiler and run the executable with Arm Instruction Emulator (ArmIE) are shown after the code.
#include <stdlib.h> #include <stdio.h> #include <arm_sve.h> // Scalar version. void add_arrays(double * restrict dst, double *src, double c, const int N) { for (int i = 0; i < N; i++) dst[i] = src[i] + c; } // Vector version void vla_add_arrays(double * restrict dst, double *src, double c, const int N) { int64_t i = 0; svbool_t pg = svwhilelt_b64(i, (int64_t)N); while (svptest_any(svptrue_b64(), pg)) { svfloat64_t vsrc = svld1(pg, src + i); svfloat64_t vdst = svadd_x(pg, vsrc, c); svst1(pg, dst + i, vdst); i += svcntd(); pg = svwhilelt_b64(i, (int64_t)N); } } int main(void) { double src[100]; double c; double dst_serial[100], dst_vla[100]; for (int i = 0; i < 100; ++i) { src[i] = (double) i / ((double) i + 1); } c = src[rand() % 100]; add_arrays(dst_serial, src, c, 100); vla_add_arrays(dst_vla, src, c, 100); for (int i = 0; i < 100; ++i) { printf("%f %f\n", dst_serial[i], dst_vla[i]); } return 0; }
module load Generic-AArch64/RHEL/7/suites/arm-compiler-for-hpc/19.0
module load Generic-AArch64/RHEL/7/gcc/8.2.0
module avail
. You may need to configure the MODULEPATH
environment variable to include the installation directory:export MODULEPATH=$MODULEPATH:/opt/arm/modulefiles/
module load Generic-AArch64/SUSE/12/suites/arm-instruction-emulator/18.4
{armclang|gcc} -O2 -march=armv8-a+sve -o program example.c
armie -msve-vector-bits=1024 ./program
This hackathon is graciously supported by hardware and software from Arm's partners. Instructors will provide login information for each of the systems on the day of the event.
Partner | Project | Address | Hardware |
---|---|---|---|
Atos and BSC | MontBlanc-3 prototypeDibona | http://montblanc-project.eu/prototypes | Cavium ThunderX2 cluster with 3000 cores |
Cray and University of Bristol | GW4 Isambard | http://gw4.ac.uk/isambard/ | |
HPE and Oak Ridge National Lab | Wombat test system | https://www.olcf.ornl.gov/2018/08/07/olcf-welcomes-wombat-test-system/ | 448 Cavium ThunderX2 cores |
For a more detailed description of SVE, why it is useful for HPC, or to see some example code, see the following additional resources on SVE:
Important Information for the Arm website. This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.