#extension #sdk #api-bindings #nvidia® #nvidia #range #nvtx

yanked nvtx-rs

Rust bindings for the NVIDIA® Tools Extension SDK (NVTX)

1.1.0 May 30, 2022
1.0.0 May 30, 2022
0.11.0 May 25, 2021
0.1.0 May 24, 2021

#63 in #nvidia

32 downloads per month

MIT/Apache

35KB
116 lines

NVIDIA Logo

nvtx-rs

Crates.io Documentation Build Status dependency status

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.

Motivation

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.

Sections

Using nvtx-rs

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"

Getting Started

Screenshot from 2021-05-24 19-54-07

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!'

State

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.

FAQ

I need help!

Don't hesitate to file an issue or contact @simbleau by e-mail.

Contributing

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.

License

This project is dual-licensed under both Apache 2.0 and MIT licenses.

No runtime deps

~175KB