https://github.com/qualcomm/libqcnpuperf
A Simple Lightweight NPU Metrics collection Library
https://github.com/qualcomm/libqcnpuperf
Last synced: 8 days ago
JSON representation
A Simple Lightweight NPU Metrics collection Library
- Host: GitHub
- URL: https://github.com/qualcomm/libqcnpuperf
- Owner: qualcomm
- License: bsd-3-clause
- Created: 2026-05-13T14:17:22.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-20T10:40:03.000Z (about 1 month ago)
- Last Synced: 2026-05-20T13:53:50.895Z (about 1 month ago)
- Language: C
- Size: 24.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE-OF-CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# libqcnpuperf
libqcnpuperf is a lightweight libary providing apis to collect NPU Metrics.
This library can be easily integrated into a simple console application or a profiling tools like NvTop or generate metrics for perfetto or integrate into CI loops or any other applications.
This library provides 3 simple apis.
qcom_dsp_init()
qcom_dsp_get_prof_data()
qcom_dsp_deinit()
## Branches
**main**: Primary development branch. Contributors should develop submissions based on this branch, and submit pull requests to this branch.
## Requirements
### System Requirements
- Linux (Debian/Ubuntu)
- Qualcomm platform with DSP/NPU support
### Dependencies
This project depends on FastRPC for CPU ↔ DSP communication.
Install required package:
```bash
sudo apt update
sudo apt install libfastrpc-dev
```
## Installation Instructions
```bash
git clone https://github.com/qualcomm/libqcnpuperf.git
cd libqcnpuperf
```
## Build Instructions
This project uses CMake.
### 1. Create a build directory
```bash
mkdir -p build
cd build
```
### 2. Configure
```bash
cmake ..
```
### 3. Build
```bash
make -j$(nproc)
```
### 4. (Optional) Install
```bash
sudo make install
```
### Building without the ncurses sample
If you don't want the sample binary:
```bash
cmake -DQCNPU_PERF_BUILD_TUI=OFF ..
```
## Runtime Notes
Ensure FastRPC is available:
```bash
ls /dev/fastrpc*
```
## Usage
```c
qcom_dsp_init();
qcom_dsp_get_prof_data(...);
qcom_dsp_deinit();
```
## Development
How to develop new features/fixes for the software. Maybe different than "usage". Also provide details on how to contribute via a [CONTRIBUTING.md file](CONTRIBUTING.md).
## License
libqcnpuperf is licensed under the [BSD-3-clause License](https://spdx.org/licenses/BSD-3-Clause.html). See [LICENSE.txt](LICENSE.txt) for the full license text.