Skip to content

Comments

Add gaudi2 component for Intel Habana Gaudi2 AI accelerator#545

Open
tokey-tahmid wants to merge 12 commits intoicl-utk-edu:masterfrom
tokey-tahmid:feature/gaudi2-component
Open

Add gaudi2 component for Intel Habana Gaudi2 AI accelerator#545
tokey-tahmid wants to merge 12 commits intoicl-utk-edu:masterfrom
tokey-tahmid:feature/gaudi2-component

Conversation

@tokey-tahmid
Copy link

Pull Request Description

This PR adds a new component for accessing hardware performance counters on Intel Habana Gaudi2 AI accelerator via the SPMU interface. Currently supports 47 native events covering TPC, EDMA, and MME engines with 6 simultaneous hardware counters per SPMU unit.

Implementation

Uses hlthunk_debug() ioctl interface with:

  • HL_DEBUG_OP_SET_MODE - Enable debug mode
  • HL_DEBUG_OP_SPMU - Configure SPMU event selection
  • HL_DEBUG_OP_READBLOCK - Read counter values

File Description

  • linux-gaudi2.c - Main component implementation
  • gaudi2_events.h - Event definitions and SPMU base addresses
  • Rules.gaudi2 - Build configuration
  • README.md - Component documentation

Testing

Tested on Voyager machine with Gaudi2 (HL-225)

  • All of the following PAPI utilities successfully work with the component:
    • papi_component_avail - ✅
    • papi_avail - ✅
    • papi_native_avail - ✅
    • papi_command_line - ✅
  • Successfully instrumented workloads with the gaudi2 component to test the events and counter values:
    • Python example - ✅
    • Custom TPC kernel - ✅

Author Checklist

  • Description
    Why this PR exists. Reference all relevant information, including background, issues, test failures, etc
  • Commits
    Commits are self contained and only do one thing
    Commits have a header of the form: module: short description
    Commits have a body (whenever relevant) containing a detailed description of the addressed problem and its solution
  • Tests
    The PR needs to pass all the tests

@dbarry9 dbarry9 self-requested a review January 28, 2026 15:59
@tokey-tahmid tokey-tahmid force-pushed the feature/gaudi2-component branch from 56bcc52 to 8a29c68 Compare February 3, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants