Add gaudi2 component for Intel Habana Gaudi2 AI accelerator#545
Open
tokey-tahmid wants to merge 18 commits into
Open
Add gaudi2 component for Intel Habana Gaudi2 AI accelerator#545tokey-tahmid wants to merge 18 commits into
tokey-tahmid wants to merge 18 commits into
Conversation
Treece-Burgess
requested changes
Feb 2, 2026
56bcc52 to
8a29c68
Compare
…pi into feature/gaudi2-component Update feature/gaudi2-component
… the Gaudi2 hardware
Treece-Burgess
requested changes
Feb 10, 2026
…to replace structs
… zero counter value issue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 189 native events covering TPC (81), EDMA (50), MME CTRL (8), and PDMA (50) engines with 6 simultaneous hardware counters per SPMU unit.
Implementation
Uses
hlthunk_debug()ioctl interface with:HL_DEBUG_OP_SET_MODE- Enable debug modeHL_DEBUG_OP_SPMU- Configure SPMU event selectionHL_DEBUG_OP_READBLOCK- Read counter valuesFile Description
Component:
linux-gaudi2.c- Main component implementationgaudi2_events.h- Event definitions and SPMU base addressesRules.gaudi2- Build configurationREADME.md- Component documentationTests (ctypes-based):
tests/Makefile- Build system for teststests/python/run_tests.sh- Test runner scripttests/python/test_component_and_events.py- Event enumeration and component availability teststests/python/test_start_stop_read.py- Basic start/stop/read lifecycle test on TPC eventstests/python/test_multidevice.py- Multi-device counter isolation testtests/python/test_mme_events.py- MME CTRL SPMU event testtests/python/test_edma_events.py- EDMA SPMU event testTests (cyPAPI-based):
tests/cypapi_tests/Makefile- Builds cyPAPI dependencytests/cypapi_tests/run_tests.sh- Test runner scripttests/cypapi_tests/test_start_stop_read_cypapi.py- Basic lifecycle test using cyPAPItests/cypapi_tests/test_multidevice_cypapi.py- Multi-device test using cyPAPItests/cypapi_tests/test_mme_events_cypapi.py- MME CTRL event test using cyPAPItests/cypapi_tests/test_edma_events_cypapi.py- EDMA event test using cyPAPITesting
Tested on Voyager machine with Gaudi2 (HL-225)
papi_component_avail- ✅papi_avail- ✅papi_native_avail- ✅papi_command_line- ✅gaudi2component to test the events and counter values:Author Checklist
Why this PR exists. Reference all relevant information, including background, issues, test failures, etc
Commits are self contained and only do one thing
Commits have a header of the form:
module: short descriptionCommits have a body (whenever relevant) containing a detailed description of the addressed problem and its solution
The PR needs to pass all the tests