s6.nn.trt_runtimeΒΆ

TensorRT runtime wrapper for NumPy-based inference.

Provides a lightweight session-like adapter around a serialized TensorRT engine so callers can query tensor metadata and execute inference using a single-input runtime contract similar to ONNX Runtime.

class s6.nn.trt_runtime.TensorInfo(name: str, shape: tuple[int, ...])

Bases: object

Tensor metadata exposed by TensorRTRunner.

name: str
shape: tuple[int, ...]
class s6.nn.trt_runtime.TensorRTRunner(engine_path: str)

Bases: object

Run inference from a serialized TensorRT engine.

get_inputs() list[TensorInfo]

Return model input metadata.

get_outputs() list[TensorInfo]

Return model output metadata.

get_providers() list[str]

Return a provider-like label for compatibility with smoke tests.

run(output_names: list[str], inputs: dict[str, ndarray]) list[ndarray]

Execute inference using an ONNX-Runtime-like session contract.

infer(x: ndarray) list[ndarray]

Run inference for a single-input engine.