Crates.io | nvtx-rs |
lib.rs | nvtx-rs |
version | 1.1.0 |
source | src |
created_at | 2021-05-24 13:27:33.475207 |
updated_at | 2022-05-30 04:43:39.173311 |
description | Rust bindings for the NVIDIA® Tools Extension SDK (NVTX) |
homepage | |
repository | https://github.com/simbleau/nvtx-rs |
max_upload_size | |
id | 401430 |
size | 217,519 |
An safe rust wrapper for the NVIDIA® Tools Extension SDK (NVTX).
NVIDIA® Tools Extension SDK (NVTX) is a C-based Application Programming Interface (API) for annotating events, code ranges, and resources in your applications. Official documentation for NVIDIA®'s NVTX can be found here.
The intent is wrap to safely wrap the NVTX library in "Rust" fashion to provide a proper cross-platform library for GPU and CPU profiling.
Ideally this library would be used in benchmarking rust applications and performing research on rust projects such as a GPU analysis with zero-cost abstraction.
nvtx-rs is designed to be easy to use. The crate is published on crates.io and the easiest way to use nvtx-rs is by adding the lone dependency to your Cargo.toml
file:
nvtx-rs = "0.11.0"
There are several examples in the example folder which can be run from applications such as NVIDIA NSight Systems. Each example has a README with easy to read steps, screenshots, and documentation. Check out the first example, 'Hello, World!'
nvtx-rs is in active development and maturing. Right now development is driven by necessity. In the following months I will be performing a GPU analysis and thus will wrap the appropriate (common) functionality one would need or seem important to me.
Don't hesitate to file an issue or contact @simbleau by e-mail.
I encourage all contributions by pull request. Please check the issues first if you'd like to help. Another great place to start would be binding more functions and wrapping them in a safe way. I will not accept unsafe functionality unless truly required. FFI handling is tricky, and be aware that there are several inline functions in the NVTX header files. This makes converting them automatically (with tools such as bindgen) more difficult. If you have a good way to do it, I'd love to see it! I ended up going the manual translation route because automatic binding was troublesome.
The Rust code of conduct applies.
This project is dual-licensed under both Apache 2.0 and MIT licenses.