tensorplay-tensorrt
NVIDIA TensorRT compiler backend for TensorPlay.
Installing this package registers a backend under the
tensorplay_compiler_backends entry-point group, so the name tensorrt
becomes available to the TensorPlay compiler:
import tensorplay as tp
model = ... # an inference region
optimized = tp.compile(model, backend="tensorrt")
out = optimized(x) # engines build on first use
How it lowers
The canonical captured graph is translated into TensorRT layers directly by a node-by-node interpreter: each supported operation has one converter registered by name, constants are frozen with explicit dtypes (a Python number feeding a float tensor arrives as that tensor's float), and binary operands are rank-aligned before the layer. An operation with no converter leaves the region uncompiled rather than failing the compile. Engines are content-addressed on disk (graph + shapes + settings + TensorRT build), so a rebuild only happens when something that could change the binary changed. Execution addresses buffers by raw device pointer: CUDA inputs stay in device memory end to end, host regions stage through the device and return host results, and launches land on TensorPlay's current stream.
Scope
- Inference regions only. Training regions are wrapped ahead-of-time by the compiler frontend: forward through this backend, backward as traced.
- Static shapes: the optimization profile pins the sample shapes given at compile time; a different shape runs uncompiled at runtime.
- A failed engine build runs the region uncompiled instead of failing the
compile, unless
pass_through_build_failures=Trueis passed throughoptions.
Options
Passed through tp.compile(..., backend="tensorrt", options={...}):
| Option | Default | Meaning |
|---|---|---|
precision |
"fp32" |
"fp32" or "fp16" tactic selection |
workspace_bytes |
builder default | workspace pool ceiling |
cache_dir |
~/.cache/tensorplay-tensorrt |
serialized-engine directory; None disables the disk cache |
pass_through_build_failures |
False |
raise on engine-build failure instead of falling back |
Install
pip install tensorplay tensorrt
pip install tensorplay-tensorrt
Tests
pip install -e ".[dev]"
pytest tests/
Engine and numeric tests need a CUDA device and the tensorrt package and
skip when either is absent.
License
Apache-2.0.
Metadata
Release files for tensorplay-tensorrt 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tensorplay_tensorrt-0.1.0.tar.gz | 19.6 kB | With provenance | Details for tensorplay_tensorrt-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tensorplay_tensorrt-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for tensorplay_tensorrt-0.1.0-py3-none-any.whl |
Total release size: 42.5 kB
Release files / tensorplay_tensorrt-0.1.0.tar.gz
| Download URL | tensorplay_tensorrt-0.1.0.tar.gz |
|---|---|
| Size | 19.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0bc1c6e6866330d40d5d39ffeac9be0b61c2c2089e93d152bad16b076b8b7a82
|
|
BLAKE2b-256 checksum How to use checksums |
f1162d371909404085f84c2d6266bb2c136befb3c056b5a385b7e4d42b7ac474
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.
Transparency logRelease files / tensorplay_tensorrt-0.1.0-py3-none-any.whl
| Download URL | tensorplay_tensorrt-0.1.0-py3-none-any.whl |
|---|---|
| Size | 22.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f28424c4ff9df8515c4ae6ad743785233f97498d9cd6dbbb8ab35f8f57acb726
|
|
BLAKE2b-256 checksum How to use checksums |
0f5836e7de5f8fc357ead0e8d11062a8e6d21daef71c239ba02c2844e238f42f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.
Transparency logSecurity for tensorplay-tensorrt 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for tensorplay_tensorrt-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.