Skip to navigation

nemo_curator.stages.audio.inference.scripts.tensorrt_encoder_utils

View as Markdown

Shared export, build, and validation helpers for NeMo TensorRT encoders.

Module Contents

Functions

NameDescription
build_encoder_bundleBuild, validate, and atomically publish one complete bundle directory.
build_engine-
export_encoder-
validate_engine-

Data

logger

API

nemo_curator.stages.audio.inference.scripts.tensorrt_encoder_utils.build_encoder_bundle(
model: torch.nn.Module,
model_path: pathlib.Path,
output_dir: pathlib.Path,
args: argparse.Namespace,
metadata: dict[str, object],
temporary_prefix: str,
parity_message: str,
tolerances: tuple[float, float] = (0.05, 0.05)
) -> None

Build, validate, and atomically publish one complete bundle directory.

nemo_curator.stages.audio.inference.scripts.tensorrt_encoder_utils.build_engine(
onnx_path: pathlib.Path,
engine_path: pathlib.Path,
feature_count: int,
args: argparse.Namespace
) -> str
nemo_curator.stages.audio.inference.scripts.tensorrt_encoder_utils.export_encoder(
model: torch.nn.Module,
onnx_path: pathlib.Path,
feature_count: int,
example_frames: int
) -> None
nemo_curator.stages.audio.inference.scripts.tensorrt_encoder_utils.validate_engine(
model: torch.nn.Module,
engine_path: pathlib.Path,
feature_count: int,
min_batch: int,
min_frames: int,
opt_frames: int,
tolerances: tuple[float, float] = (0.05, 0.05)
) -> None
nemo_curator.stages.audio.inference.scripts.tensorrt_encoder_utils.logger = logging.getLogger(__name__)