Skip to content

Commit

Permalink
Merge pull request #550 from ArmDeveloperEcosystem/main
Browse files Browse the repository at this point in the history
Merge to production
  • Loading branch information
pareenaverma committed Oct 26, 2023
2 parents f056fb7 + d6b300d commit 08af9e6
Show file tree
Hide file tree
Showing 56 changed files with 545 additions and 109 deletions.
13 changes: 13 additions & 0 deletions .wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1615,3 +1615,16 @@ drcachesim
dynamorio
mispredicted
lookaside
devel
glibc
procps
PACBTI
gatord
awscli
dns
Borycki
Dawid
rg
pds
WebApp
AllowAnyCustom
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed content/install-guides/_images/windows-sys-env.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 40 additions & 19 deletions content/install-guides/armpl.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ additional_search_terms:
minutes_to_complete: 10

### Link to official documentation
official_docs: https://developer.arm.com/downloads/-/arm-performance-libraries#documentation

official_docs: https://developer.arm.com/documentation/101004/latest
author_primary: Pareena Verma

### PAGE SETUP
Expand All @@ -29,78 +28,91 @@ layout: installtoolsall # DO NOT MODIFY. Always true for tool install ar

The [Arm Performance Libraries](https://developer.arm.com/downloads/-/arm-performance-libraries#documentation) provide developers with optimized math libraries for high performance computing applications on Arm Neoverse based hardware.

These libraries include highly optimized functions for BLAS, LAPACK, FFT, sparse linear algebra, libamath and libastring.
These libraries are free to use and do not require a license. They can be installed either standalone or with your installation of [Arm Compiler for Linux](/install-guides/acfl). This install guide covers the standalone installation.
These libraries include highly optimized functions for BLAS, LAPACK, FFT, sparse linear algebra, libamath and libastring.
These libraries are free to use and do not require a license. They can be installed either standalone or with your installation of [Arm Compiler for Linux](/install-guides/acfl). This install guide covers the standalone installation.

Arm Performance Libraries are available for use on [Windows 11 on Arm](#windows), [macOS](#macos) (Apple Silicon), and [Linux](#linux) (AArch64) hosts.

Below are the official documentation references:

- Reference Guide:  [Arm Performance Libraries Reference Guide](https://developer.arm.com/documentation/101004/latest)
- Windows:     [Get started with Arm Performance Libraries (Windows version)](https://developer.arm.com/documentation/109361/2310/?lang=en)
- MacOS:        [Get started with Arm Performance Libraries (macOS version)](https://developer.arm.com/documentation/109362/2310/?lang=en)
- Linux:         [Get started with Arm Performance Libraries (stand-alone Linux version)](https://developer.arm.com/documentation/102620/2310/?lang=en)

## Windows {#windows}

On your Windows 11 Arm machine, go to the [Arm Performance Libraries download page](https://developer.arm.com/downloads/-/arm-performance-libraries). Click on the Download Windows section. You will be prompted to review and accept the End User License Agreement before you can download the zip file. Click on the `I accept the terms of this License Agreement` checkbox and proceed to `Download` as shown below.

![win_download #center](/install-guides/_images/download-win-armpl.png)
Open your Windows File Explorer and locate the downloaded `arm-performance-libraries_23.08.zip` file.
![win_download #center](/install-guides/_images/download-win-armpl_23.10.png)

Open your Windows File Explorer and locate the downloaded `arm-performance-libraries_23.10.zip` file.
Extract the contents of this zip file using the "Extract all" button at the top of the Windows File Explorer.

### Update your system environment variables

Using Windows Search, open `Edit the System Variables` in the `Control Panel`.
On the `Advanced Tab` of the `System Properties` window, click on the `Environment Variables` button.
On the `Advanced Tab` of the `System Properties` window, click on the `Environment Variables` button.

![sys_prop #center](/install-guides/_images/windows-sys-prop.png)

Add a New variable called `ARMPL_DIR` which should point to the location where you unpacked the Arm Performance Libraries.

![add_var #center](/install-guides/_images/windows-sys-env.png)
![add_var #center](/install-guides/_images/windows-sys-env_23.10.png)

Edit the `Path` variable to add `%ARMPL_DIR%\bin` to the list of existing directories in your path.

![edit_path #center](/install-guides/_images/win-sys-path.png)

You can now start linking your application to the Arm Performance libraries on your Windows on Arm device. Follow the examples in the included `RELEASE_NOTES` file of your extracted installation directory to get started.

For more information refer to [Get started with Arm Performance Libraries (Windows version)
Version 23.10](https://developer.arm.com/documentation/109361/2310/?lang=en)

## macOS {#macos}

Go to the Download MacOS section of the [Arm Performance Libraries download page](https://developer.arm.com/downloads/-/arm-performance-libraries) and download the `dmg` file.
Double-click on the icon of the downloaded package to mount the disk image. Alternatively, open a terminal and run the command below:

```console
hdiutil attach armpl_23.06_flang-new_clang_16.dmg
hdiutil attach arm-performance-libraries_23.10_macOS.dmg
```

Now run the installation script as a superuser:

```console
/Volumes/armpl_23.06_flang-new_clang_16_installer/armpl_23.06_flang-new_clang_16_install.sh -y
/Volumes/arm-performance-libraries_23.10_macOS/arm-performance-libraries_23.10_macOS_install.sh -y
```
Using this command you automatically accept the End User License Agreement and the packages are installed to the `/opt/arm` directory. If you want to change the installation directory location use the `--install_dir` option with the script and provide the desired directory location.

To get started, compile and test the examples included in the `/opt/arm/<armpl_dir>/examples/`, or `<install_dir>/<armpl_dir>/examples/` directory, if you have installed to a different location than the default.

For more information refer to [Get started with Arm Performance Libraries (macOS version)
Version 23.10](https://developer.arm.com/documentation/109362/2310/?lang=en)

## Linux {#linux}

Arm Performance Libraries are supported on most Linux Distributions like Ubuntu, RHEL, SLES and Amazon Linux on an `AArch64` host and compatible with various versions of GCC.

[Download](https://developer.arm.com/downloads/-/arm-performance-libraries) the appropriate package for your Linux distribution and version of GCC from the Download Linux section.

The instructions shown below are for an Ubuntu 22.04 AArch64 Linux Host with GCC version 11.3 installed.
The instructions shown below are for an Ubuntu 22.04 AArch64 Linux Host with GCC version 12.2 installed.

On a terminal, run the command shown below to download the appropriate package:
```command
wget https://developer.arm.com/-/media/Files/downloads/hpc/arm-performance-libraries/23-04-1/ubuntu-22/arm-performance-libraries_23.04.1_Ubuntu-22.04_gcc-11.3.tar
wget https://developer.arm.com/-/media/Files/downloads/hpc/arm-performance-libraries/23-10/ubuntu-22/arm-performance-libraries_23.10_Ubuntu-22.04_gcc-12.2.tar
```

Use `tar` to extract the file and then change directory:

```command
tar -xf arm-performance-libraries_23.04.1_Ubuntu-22.04_gcc-11.3.tar
cd arm-performance-libraries_23.04.1_Ubuntu-22.04/
tar -xf arm-performance-libraries_23.10_Ubuntu-22.04_gcc-12.2.tar
cd arm-performance-libraries_23.10_Ubuntu-22.04/
```
Run the installation script as a super user:

```command
sudo ./arm-performance-libraries_23.04.1_Ubuntu-22.04.sh -a
sudo ./arm-performance-libraries_23.10_Ubuntu-22.04.sh -a
```
Using the `-a` switch you automatically accept the End User License Agreement and the packages are installed to the `/opt/arm` directory. If you want to change the installation directory location use the `--install-to` option with the script and provide the desired directory location.

Expand All @@ -112,6 +124,12 @@ Install environment modules on your machine:
sudo apt install environment-modules
```

Set your bash environment to use modules:

```command
source /usr/share/modules/init/bash
```

Set the `MODULEPATH` environment variable to point to the location of the installed modulefiles for Arm Performance Libraries:

```command
Expand All @@ -127,13 +145,16 @@ module avail
The output should be similar to:

```output
armpl/23.04.1_gcc-11.3
armpl/23.10.0_gcc-12.2
```

Load the appropriate module:

```command
module load armpl/23.04.1_gcc-11.3
module load armpl/23.10.0_gcc-12.2
```
You can now compile and test the examples included in the `/opt/arm/<armpl_dir>/examples/`, or `<install_dir>/<armpl_dir>/examples/` directory, if you have installed to a different location than the default.
You can now compile and test the examples included in the `/opt/arm/<armpl_dir>/examples/`, or `<install_dir>/<armpl_dir>/examples/` directory, if you have installed to a different location than the default.

For more information refer to [Get started with Arm Performance Libraries (stand-alone Linux version)
Version 23.10](https://developer.arm.com/documentation/102620/2310/?lang=en)

26 changes: 17 additions & 9 deletions content/install-guides/wperf.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,17 @@ The latest release package `windowsperf-bin-<version>.zip` can be downloaded fro
https://gitlab.com/Linaro/WindowsPerf/windowsperf/-/releases
```
To download directly from command prompt, use:

```console
curl https://gitlab.com/api/v4/projects/40381146/packages/generic/windowsperf/2.5.1/windowsperf-bin-2.5.1.zip --output windowsperf-bin-2.5.1.zip
mkdir windowsperf-bin-3.2.0
cd windowsperf-bin-3.2.0
curl https://gitlab.com/api/v4/projects/40381146/packages/generic/windowsperf/3.2.0/windowsperf-bin-3.2.0.zip --output windowsperf-bin-3.2.0.zip
```
Unzip the package to your preferred location.

Unzip the package:

```console
tar -xmf windowsperf-bin-2.5.1.zip
tar -xmf windowsperf-bin-3.2.0.zip
```

## Install wperf driver
Expand All @@ -75,22 +80,25 @@ Open a `Windows Command Prompt` terminal with `Run as administrator` enabled.

Navigate to the `windowsperf-bin-<version>` directory.
```command
cd windowsperf-bin-2.5.1
cd windowsperf-bin-3.2.0
```

### Install with devcon {#devcon}

Navigate into the `wperf-driver` folder, and use `devcon` to install the driver:

```command
cd wperf-driver
devcon install wperf-driver.inf Root\WPERFDRIVER
```
You will see output similar to:

```output
Device node created. Install is complete when drivers are installed...
Updating drivers for Root\WPERFDRIVER from <path>\wperf-driver.inf.
Drivers installed successfully.
```

### Install with wperf-devgen {#devgen}

Copy the `wperf-devgen.exe` executable to the `wperf-driver` folder.
Expand Down Expand Up @@ -122,14 +130,14 @@ Once the above driver is installed, you can use `wperf` without `Administrator`
For example:
```command
cd ..
wperf -version
wperf --version
```
You should see output similar to:
```output
Component Version
========= =======
wperf 2.5.1
wperf-driver 2.5.1
Component Version GitVer
========= ======= ======
wperf 3.2.0 a947eed8
wperf-driver 3.2.0 a947eed8
```
## Further reading

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,12 @@ Check Hugo is installed correctly and check the version by running this command:
```bash
hugo version
```
Run hugo to launch a development version of website on your machine.

Navigate into the `arm-learning-paths` folder and run hugo to launch a
development version of website on your machine.

```bash
cd arm-learning-paths
hugo server
```

Expand Down Expand Up @@ -158,9 +161,11 @@ There are a number of good options for text editors if you don't have a full Lin

To use Visual Studio Code in the browser on your remote Linux server check the install information for [OpenVSCode Server](/install-guides/openvscode-server/) and [VS Code Tunnels](/install-guides/vscode-tunnels/)

Run hugo to launch a development version of website on your machine.
Navigate into the `arm-learning-paths` folder and run hugo to launch a
development version of website on your machine.

```bash
cd arm-learning-paths
hugo server
```

Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
---
title: Learn how to access hardware counters using the Performance Monitoring Unit (PMU)
title: How to use the Arm Performance Monitoring Unit and System Counter

minutes_to_complete: 90

who_is_this_for: This is an advanced topic for software developers who want to instrument hardware event counters in software applications.
who_is_this_for: This is an advanced topic for software developers who want to instrument hardware event counters or the system counter in software applications.

learning_objectives:
- Understand different options for accessing event counters from user space
- Understand different options for accessing counters from user space
- Use the system counter to measure time in code
- Use PAPI to instrument event counters in code
- Call the Linux perf_event_open system call to instrument event counters in code
- Write Arm assembly instructions to instrument event counters in code

- Use the Linux perf_event_open system call to instrument event counters in code
prerequisites:
- An Arm computer running Linux. A bare metal or cloud metal instance is best because they expose more counters. A virtual machine (VM) can be used, but fewer counters may be available.
- An Arm computer running Linux. A bare metal or cloud metal instance is best because they expose more counters. You can use a virtual machine (VM), but fewer counters may be available.

author_primary: Julio Suarez

Expand Down
Loading

0 comments on commit 08af9e6

Please sign in to comment.