#tensor-rt #cuda #nvidia #ffi

easy-tensorrt-core

Rust wrapper for NVIDIA TensorRT

1 unstable release

new 0.3.0 May 22, 2025
0.2.0 May 22, 2025

#2 in #tensor-rt

33 downloads per month

MIT/Apache

365KB
967 lines

easy-tensorrt-core

A safe wrapper around easy-tensorrt-sys. Provide the core functions to build and run TensorRT engine.

Inspired by tensorrt-rs.

Major changes from tensorrt-rs:

  1. Replace cuda-rs with cudarc.
  2. Replace Tensor with AbstractTensor trait. Any tensor (e.g. tch::Tensor) that implements AbstractTensor can be used.
  3. Add init module to faciitate the initialization of tensorrt plugins and cuda context.
  4. Init engine with CuStream and avoid passing in another CuStream when inference.

Dependencies

~8–18MB
~231K SLoC