Skip to content

Commit 8a29c68

Browse files
committed
Update gaudi2 component details
1 parent b757f0f commit 8a29c68

File tree

4 files changed

+29
-49
lines changed

4 files changed

+29
-49
lines changed

src/components/gaudi2/README.md

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,22 @@
1-
# PAPI Gaudi2 Component
1+
# Gaudi2 Component
22

3-
This PAPI component provides access to hardware performance counters on Intel Gaudi2 AI Accelerators through the SPMU interface.
3+
The `gaudi2` component provides access to hardware performance counters on Intel Gaudi2 AI Accelerators through the SPMU interface.
44

5-
## Overview
5+
- [Environment Variables](#environment-variables)
6+
- [Enabling the Gaudi2 Component](#enabling-the-gaudi2-component)
67

7-
The Gaudi2 component enables monitoring of:
8-
- **TPC (Tensor Processing Core)** - 24 TPCs across 4 DCOREs
9-
- **EDMA (External DMA)** - 8 EDMAs for data movement
10-
- **PDMA (PCIe DMA)** - 2 PDMAs for host-device transfers
11-
- **MME (Matrix Multiplication Engine)** - 4 MMEs for matrix operations
8+
## Environment Variables
9+
The `gaudi2` component requires setting the `PAPI_GAUDI2_ROOT` environment variable to habanalabs installed directory for `hl-thunk` headers and libraries.
1210

13-
Each SPMU unit supports up to 6 programmable counters that can be configured to count various hardware events.
11+
```bash
12+
export PAPI_GAUDI2_ROOT=/usr`
13+
```
1414

15-
## Requirements
15+
## Enabling the Gaudi2 Component
1616

17-
- **Hardware**: Intel Gaudi2 AI Accelerator
18-
- **Software**:
19-
- Habana Labs driver and runtime
20-
- libhl-thunk.so (Habana thunk library)
21-
- Access to `/dev/accel/accel*` devices
22-
- **Permissions**: User must have read/write access to accelerator devices
17+
To enable the `gaudi2` component, configure and build PAPI with the component enabled as follows:
2318

24-
## Building
25-
26-
Set the `PAPI_GAUDI2_ROOT` environment variable to habanalabs installed directory for `hl-thunk` headers and libraries.
27-
`export PAPI_GAUDI2_ROOT=/usr`
28-
29-
Configure the component using:
30-
`./configure --with-components="gaudi2"`
31-
32-
then build with:
33-
`make && make install`
19+
```bash
20+
./configure --with-components="gaudi2"
21+
make && make install
22+
```

src/components/gaudi2/Rules.gaudi2

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,11 @@
11
# Rules for the Gaudi2 component
2-
#
3-
# This component provides access to Intel Gaudi2 AI Accelerator
4-
# hardware performance counters (SPMU).
5-
#
6-
# Requirements:
7-
# - libhl-thunk.so (Habana Labs thunk library)
8-
# - /dev/accel/accel* device access
9-
#
10-
# Build with:
11-
# ./configure --with-components="gaudi2"
12-
#
132
# Environment variables (REQUIRED):
143
# PAPI_GAUDI2_ROOT - Path to Habana installation root
154
# Example: /usr (for container builds with headers in /usr/include/habanalabs
165
# and libraries in /usr/lib/habanalabs)
17-
#
186
# Expected directory structure under PAPI_GAUDI2_ROOT:
197
# $(PAPI_GAUDI2_ROOT)/include/habanalabs/hlthunk.h
208
# $(PAPI_GAUDI2_ROOT)/lib/habanalabs/libhl-thunk.so
21-
#
229

2310
# Component source files
2411
COMPSRCS += components/gaudi2/linux-gaudi2.c

src/components/gaudi2/gaudi2_events.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
/*
2-
* gaudi2_events.h - Gaudi2 SPMU event definitions
1+
/**
2+
* @file gaudi2_events.h
33
*
4-
* Event IDs from hl-prof-config -c gaudi2 --spmu-help
5-
* SPMU base addresses from gaudi2_blocks.h
4+
* @author Tokey Tahmid ttahmid@icl.utk.edu
65
*/
76

87
#ifndef _GAUDI2_EVENTS_H

src/components/gaudi2/linux-gaudi2.c

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
/*
2-
* linux-gaudi2.c - PAPI component for Intel Gaudi2 SPMU counters
1+
/**
2+
* @file linux-gaudi2.c
3+
*
4+
* @author Tokey Tahmid ttahmid@icl.utk.edu
35
*
4-
* Accesses hardware performance counters on Gaudi2 AI accelerators
5-
* via the hlthunk library debug interface.
6+
* @ingroup papi_components
67
*
7-
* Engines: TPC (24), EDMA (8), PDMA (2), MME (4)
8+
* @brief
9+
* This file implements a PAPI component for the Intel Gaudi2 SPMU counters
10+
* Accesses hardware performance counters on Gaudi2 AI accelerators
11+
* via the hlthunk library debug interface.
812
*
9-
* Requires: libhl-thunk.so, /dev/accel/accel* access, debug mode
13+
* The open source software license for PAPI conforms to the BSD
14+
* License template.
1015
*/
1116

1217
#include <stdio.h>

0 commit comments

Comments
 (0)