aitune.torch.backend.torch_tensorrt_jit_backend
aitune.torch.backend.torch_tensorrt_jit_backend
Torch compile backend.
Module Contents
Classes
Functions
Data
API
Fallback settings matching upstream defaults when torch_tensorrt is unavailable.
Bases: Backend
Torch TensorRT thought torch.compile(backend=“torch_tensorrt”).
Backend does not use intermediate formats, and compiled model is not stored.
Activate backend.
Build the model with Torch compile.
Compile module with Torch compile.
Deactivate backend and cleanup.
Deploys the backend.
Run inference with TensorRT engine thought Torch compile.
Parameters:
Inference arguments
Inference keyword arguments
Returns: Any
Model outputs
Raises:
AITuneError: If backend is not activated
Store the backend configuration to a file.
Returns the description of the backend.
Creates a backend from a state_dict.
Returns the key of the backend.
Returns the state_dict of the backend.
Bases: BackendConfig
Configuration for torch.compile(backend=“torch_tensorrt”).
Defaults preserve torch.compile behavior unless callers opt into stricter compilation options.
Describe the backend configuration. Display only changed fields.
Initialise config from a plain dict (e.g. parsed from YAML).
compile_config may be passed as a nested dict and will be
reconstructed into a TorchTensorRTConfig instance automatically.
Convert TorchTensorRTJitBackendConfig to dict.
Check if torch_tensorrt is installed.