trt ¶
Type Aliases:
-
Shape–
Classes:
-
TRT–TensorRT backend for Nvidia GPUs using the
core.trtplugin. -
TRT_RTX–TensorRT RTX backend for Nvidia RTX GPUs using the
core.trt_rtxplugin.
Attributes:
LOGGING_VERBOSITY_MAP module-attribute ¶
TRT dataclass ¶
TRT(
*,
plugin: Plugin,
device_id: int = 0,
num_streams: int = 1,
use_cuda_graph: bool = True,
verbosity: SupportsInt | Severity | Severity | None = None,
fp16: bool | None = None,
fp16_blacklist_ops: Collection[str] | None = None,
bf16: bool | None = None,
tf32: bool = False,
strict_nans: bool = False,
static_shape: bool = True,
min_shapes: Shape = (0, 0),
opt_shapes: Shape | None = None,
max_shapes: Shape | None = None,
edge_mask_convolutions: bool = True,
jit_convolutions: bool = True,
sparse_weights: bool = False,
workspace: int | None = None,
builder_optimization_level: int = 3,
max_aux_streams: int | None = None,
max_num_tactics: int | None = None,
tiling_optimization_level: SupportsInt
| TilingOptimizationLevel
| TilingOptimizationLevel = 0,
l2_limit_for_tiling: int = -1,
avg_timing_iterations: int = 1,
tactic_dram: int | None = None,
weight_streaming: bool = False,
force_rebuild: bool = False,
max_threads: int | None = None,
)
Bases: Backend
TensorRT backend for Nvidia GPUs using the core.trt plugin.
Classes:
-
OutputFormat–Output format for the backend plugin.
Methods:
-
autoselect–Try to select the best backend for the current system.
-
build– -
build_engine–Build or retrieve a cached TensorRT engine.
-
configure_builder_config– -
configure_optimization_settings– -
configure_tactic_sources– -
get_args–Return backend plugin arguments derived from this configuration.
-
get_identity– -
inference–Run inference with this backend.
-
logger– -
setup_optimization_profile–
Attributes:
-
MIGX– -
NCNN– -
NCNN_VK– -
ORT– -
ORT_COREML– -
ORT_CPU– -
ORT_CUDA– -
ORT_DML– -
OV– -
OV_CPU– -
OV_GPU– -
OV_NPU– -
TRT– -
TRT_RTX– -
avg_timing_iterations(int) –Number of averaging iterations when timing tactics. Higher values produce more stable tactic selection.
-
bf16(bool | None) –Convert the ONNX model to BF16 before building. Default to False.
-
builder_optimization_level(int) –TensorRT builder optimization level.
-
device_id(int) –CUDA device index.
-
edge_mask_convolutions(bool) –Enable TensorRT edge-mask convolution tactics.
-
flexible_output_prop(str) – -
force_rebuild(bool) –Force a full engine rebuild, ignoring any cached engine.
-
fp16(bool | None) –Convert the ONNX model to FP16 before building. Default to True.
-
fp16_blacklist_ops(Collection[str] | None) –ONNX node or op names to keep in FP32 during FP16 conversion.
-
jit_convolutions(bool) –Enable TensorRT JIT convolution tactics.
-
l2_limit_for_tiling(int) –L2 cache usage hint for tiling optimization.
-
max_aux_streams(int | None) –Maximum auxiliary streams used by TensorRT kernels.
-
max_num_tactics(int | None) –Maximum number of tactics considered per layer.
-
max_shapes(Shape | None) –Maximum dynamic input tile size as
(width, height). Defaults to the inference tile size. -
max_threads(int | None) –Maximum number of builder threads. Limits CPU usage during engine build.
-
min_shapes(Shape) –Minimum dynamic input tile size as
(width, height). -
num_streams(int) –Number of parallel plugin inference streams.
-
opt_shapes(Shape | None) –Optimal input tile size as
(width, height). Defaults to the inference tile size. -
plugin(Plugin) – -
sparse_weights(bool) –Allow the builder to exploit structured sparsity in weights.
-
static_shape(bool) –Build a fixed-shape engine when true.
-
strict_nans(bool) –Disable float optimizations (0*x => 0, x-x => 0, x/x => 1) to preserve NaN/Inf propagation.
-
tactic_dram(int | None) –DRAM limit in bytes for the optimizer during tactic selection. Prevents OOM on memory-constrained systems.
-
tf32(bool) –Allow TensorRT TF32 tactics.
-
tiling_optimization_level(SupportsInt | TilingOptimizationLevel | TilingOptimizationLevel) –TensorRT tiling optimization search level.
-
use_cuda_graph(bool) –Enable CUDA graph execution for compatible engines to improve performance and reduce CPU overhead.
-
verbosity(SupportsInt | Severity | Severity | None) –TensorRT/plugin logging severity.
-
version(tuple[int, int, int]) – -
weight_streaming(bool) –Stream weights from host to device to reduce GPU memory at the cost of performance.
-
workspace(int | None) –Workspace memory pool limit in bytes.
avg_timing_iterations class-attribute instance-attribute ¶
avg_timing_iterations: int = 1
Number of averaging iterations when timing tactics. Higher values produce more stable tactic selection.
bf16 class-attribute instance-attribute ¶
bf16: bool | None = None
Convert the ONNX model to BF16 before building. Default to False.
builder_optimization_level class-attribute instance-attribute ¶
builder_optimization_level: int = 3
TensorRT builder optimization level.
edge_mask_convolutions class-attribute instance-attribute ¶
edge_mask_convolutions: bool = True
Enable TensorRT edge-mask convolution tactics.
force_rebuild class-attribute instance-attribute ¶
Force a full engine rebuild, ignoring any cached engine.
fp16 class-attribute instance-attribute ¶
fp16: bool | None = None
Convert the ONNX model to FP16 before building. Default to True.
fp16_blacklist_ops class-attribute instance-attribute ¶
fp16_blacklist_ops: Collection[str] | None = None
ONNX node or op names to keep in FP32 during FP16 conversion.
jit_convolutions class-attribute instance-attribute ¶
jit_convolutions: bool = True
Enable TensorRT JIT convolution tactics.
l2_limit_for_tiling class-attribute instance-attribute ¶
l2_limit_for_tiling: int = -1
L2 cache usage hint for tiling optimization.
max_aux_streams class-attribute instance-attribute ¶
max_aux_streams: int | None = None
Maximum auxiliary streams used by TensorRT kernels.
max_num_tactics class-attribute instance-attribute ¶
max_num_tactics: int | None = None
Maximum number of tactics considered per layer.
max_shapes class-attribute instance-attribute ¶
max_shapes: Shape | None = None
Maximum dynamic input tile size as (width, height). Defaults to the inference tile size.
max_threads class-attribute instance-attribute ¶
Maximum number of builder threads. Limits CPU usage during engine build.
min_shapes class-attribute instance-attribute ¶
min_shapes: Shape = (0, 0)
Minimum dynamic input tile size as (width, height).
num_streams class-attribute instance-attribute ¶
num_streams: int = 1
Number of parallel plugin inference streams.
opt_shapes class-attribute instance-attribute ¶
opt_shapes: Shape | None = None
Optimal input tile size as (width, height). Defaults to the inference tile size.
sparse_weights class-attribute instance-attribute ¶
sparse_weights: bool = False
Allow the builder to exploit structured sparsity in weights.
static_shape class-attribute instance-attribute ¶
static_shape: bool = True
Build a fixed-shape engine when true.
strict_nans class-attribute instance-attribute ¶
strict_nans: bool = False
Disable float optimizations (0*x => 0, x-x => 0, x/x => 1) to preserve NaN/Inf propagation.
tactic_dram class-attribute instance-attribute ¶
tactic_dram: int | None = None
DRAM limit in bytes for the optimizer during tactic selection. Prevents OOM on memory-constrained systems.
tiling_optimization_level class-attribute instance-attribute ¶
tiling_optimization_level: (
SupportsInt | TilingOptimizationLevel | TilingOptimizationLevel
) = 0
TensorRT tiling optimization search level.
use_cuda_graph class-attribute instance-attribute ¶
use_cuda_graph: bool = True
Enable CUDA graph execution for compatible engines to improve performance and reduce CPU overhead.
verbosity class-attribute instance-attribute ¶
verbosity: SupportsInt | Severity | Severity | None = field(
default=None, repr=False
)
TensorRT/plugin logging severity.
weight_streaming class-attribute instance-attribute ¶
weight_streaming: bool = False
Stream weights from host to device to reduce GPU memory at the cost of performance.
workspace class-attribute instance-attribute ¶
workspace: int | None = None
Workspace memory pool limit in bytes.
OutputFormat ¶
autoselect classmethod ¶
Try to select the best backend for the current system.
Parameters:
-
(device_id¶int, default:0) –The GPU device id.
-
(**kwargs¶Any, default:{}) –Additional arguments to pass to the backend.
Returns:
-
Backend–The selected backend.
Source code in vsscale/mlrt/backend/base.py
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | |
build ¶
build(
network_path: Path,
engine_path: Path,
channels: int,
tilesize: Shape,
input_name: str,
) -> None
Source code in vsscale/mlrt/backend/trt.py
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 | |
build_engine ¶
build_engine(
network_path: Path,
channels: int,
tilesize: Shape,
input_name: str = "input",
) -> Path
Build or retrieve a cached TensorRT engine.
Parameters:
-
(network_path¶Path) –Path to the ONNX model.
-
(channels¶int) –Number of model input channels.
-
(tilesize¶Shape) –Inference tile size as
(width, height). -
(input_name¶str, default:'input') –Name of the model input tensor.
Returns:
-
Path–Path to the serialized engine file.
Source code in vsscale/mlrt/backend/trt.py
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 | |
configure_builder_config ¶
configure_builder_config(
config: IBuilderConfig, network: INetworkDefinition
) -> None
Source code in vsscale/mlrt/backend/trt.py
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 | |
configure_optimization_settings ¶
configure_optimization_settings(config: IBuilderConfig) -> None
Source code in vsscale/mlrt/backend/trt.py
341 342 343 344 345 346 347 348 349 350 351 352 353 | |
configure_tactic_sources ¶
configure_tactic_sources(config: IBuilderConfig) -> None
Source code in vsscale/mlrt/backend/trt.py
326 327 328 329 330 331 332 333 334 335 336 337 338 339 | |
get_args ¶
Return backend plugin arguments derived from this configuration.
Source code in vsscale/mlrt/backend/trt.py
184 185 186 187 188 189 190 | |
get_identity ¶
Source code in vsscale/mlrt/backend/trt.py
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | |
inference ¶
inference(
clips: VideoNode | Sequence[VideoNode],
network_path: str | PathLike[str],
/,
overlap: tuple[int, int],
tilesize: tuple[int, int],
*,
flexible: bool = False,
**kwargs: Any,
) -> VideoNode | list[VideoNode]
Run inference with this backend.
Parameters:
-
(clips¶VideoNode | Sequence[VideoNode]) –Input clip or clips passed to the backend model.
-
(network_path¶str | PathLike[str]) –Path to the model file or backend artifact.
-
(overlap¶tuple[int, int]) –Horizontal and vertical tile overlap in pixels.
-
(tilesize¶tuple[int, int]) –Horizontal and vertical tile size in pixels.
-
(flexible¶bool, default:False) –Return each flexible output plane as a separate clip.
-
(**kwargs¶Any, default:{}) –Additional backend plugin arguments forwarded unchanged.
Returns:
-
VideoNode | list[VideoNode]–A single output clip, or a list of output clips when
flexibleis enabled.
Source code in vsscale/mlrt/backend/trt.py
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | |
logger classmethod ¶
logger() -> ILogger
Source code in vsscale/mlrt/backend/trt.py
152 153 154 155 156 157 | |
setup_optimization_profile ¶
setup_optimization_profile(
builder: Builder,
network: INetworkDefinition,
config: IBuilderConfig,
channels: int,
input_name: str,
tilesize: Shape,
) -> None
Source code in vsscale/mlrt/backend/trt.py
355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 | |
TRT_RTX dataclass ¶
TRT_RTX(
*,
plugin: Plugin,
device_id: int = 0,
num_streams: int = 1,
use_cuda_graph: bool = True,
verbosity: SupportsInt | Severity | Severity | None = None,
fp16: bool | None = None,
fp16_blacklist_ops: Collection[str] | None = None,
bf16: bool | None = None,
tf32: bool = False,
strict_nans: bool = False,
static_shape: bool = True,
min_shapes: Shape = (0, 0),
opt_shapes: Shape | None = None,
max_shapes: Shape | None = None,
edge_mask_convolutions: bool = True,
jit_convolutions: bool = True,
sparse_weights: bool = False,
workspace: int | None = None,
builder_optimization_level: int = 3,
max_aux_streams: int | None = None,
max_num_tactics: int | None = None,
tiling_optimization_level: SupportsInt
| TilingOptimizationLevel
| TilingOptimizationLevel = 0,
l2_limit_for_tiling: int = -1,
avg_timing_iterations: int = 1,
tactic_dram: int | None = None,
weight_streaming: bool = False,
force_rebuild: bool = False,
max_threads: int | None = None,
)
Bases: TRT
TensorRT RTX backend for Nvidia RTX GPUs using the core.trt_rtx plugin.
Classes:
-
OutputFormat–Output format for the backend plugin.
Methods:
-
autoselect–Try to select the best backend for the current system.
-
build– -
build_engine–Build or retrieve a cached TensorRT engine.
-
configure_builder_config– -
configure_optimization_settings– -
configure_tactic_sources– -
get_args–Return backend plugin arguments derived from this configuration.
-
get_identity– -
inference–Run inference with this backend.
-
logger– -
setup_optimization_profile–
Attributes:
-
MIGX– -
NCNN– -
NCNN_VK– -
ORT– -
ORT_COREML– -
ORT_CPU– -
ORT_CUDA– -
ORT_DML– -
OV– -
OV_CPU– -
OV_GPU– -
OV_NPU– -
TRT– -
TRT_RTX– -
avg_timing_iterations(int) –Number of averaging iterations when timing tactics. Higher values produce more stable tactic selection.
-
bf16(bool | None) –Convert the ONNX model to BF16 before building. Default to False.
-
builder_optimization_level(int) –TensorRT builder optimization level.
-
device_id(int) –CUDA device index.
-
edge_mask_convolutions(bool) –Enable TensorRT edge-mask convolution tactics.
-
flexible_output_prop(str) – -
force_rebuild(bool) –Force a full engine rebuild, ignoring any cached engine.
-
fp16(bool | None) –Convert the ONNX model to FP16 before building. Default to True.
-
fp16_blacklist_ops(Collection[str] | None) –ONNX node or op names to keep in FP32 during FP16 conversion.
-
jit_convolutions(bool) –Enable TensorRT JIT convolution tactics.
-
l2_limit_for_tiling(int) –L2 cache usage hint for tiling optimization.
-
max_aux_streams(int | None) –Maximum auxiliary streams used by TensorRT kernels.
-
max_num_tactics(int | None) –Maximum number of tactics considered per layer.
-
max_shapes(Shape | None) –Maximum dynamic input tile size as
(width, height). Defaults to the inference tile size. -
max_threads(int | None) –Maximum number of builder threads. Limits CPU usage during engine build.
-
min_shapes(Shape) –Minimum dynamic input tile size as
(width, height). -
num_streams(int) –Number of parallel plugin inference streams.
-
opt_shapes(Shape | None) –Optimal input tile size as
(width, height). Defaults to the inference tile size. -
plugin– -
sparse_weights(bool) –Allow the builder to exploit structured sparsity in weights.
-
static_shape(bool) –Build a fixed-shape engine when true.
-
strict_nans(bool) –Disable float optimizations (0*x => 0, x-x => 0, x/x => 1) to preserve NaN/Inf propagation.
-
tactic_dram(int | None) –DRAM limit in bytes for the optimizer during tactic selection. Prevents OOM on memory-constrained systems.
-
tf32(bool) –Allow TensorRT TF32 tactics.
-
tiling_optimization_level(SupportsInt | TilingOptimizationLevel | TilingOptimizationLevel) –TensorRT tiling optimization search level.
-
use_cuda_graph(bool) –Enable CUDA graph execution for compatible engines to improve performance and reduce CPU overhead.
-
verbosity(SupportsInt | Severity | Severity | None) –TensorRT/plugin logging severity.
-
version(tuple[int, int, int]) – -
weight_streaming(bool) –Stream weights from host to device to reduce GPU memory at the cost of performance.
-
workspace(int | None) –Workspace memory pool limit in bytes.
avg_timing_iterations class-attribute instance-attribute ¶
avg_timing_iterations: int = 1
Number of averaging iterations when timing tactics. Higher values produce more stable tactic selection.
bf16 class-attribute instance-attribute ¶
bf16: bool | None = None
Convert the ONNX model to BF16 before building. Default to False.
builder_optimization_level class-attribute instance-attribute ¶
builder_optimization_level: int = 3
TensorRT builder optimization level.
edge_mask_convolutions class-attribute instance-attribute ¶
edge_mask_convolutions: bool = True
Enable TensorRT edge-mask convolution tactics.
force_rebuild class-attribute instance-attribute ¶
Force a full engine rebuild, ignoring any cached engine.
fp16 class-attribute instance-attribute ¶
fp16: bool | None = None
Convert the ONNX model to FP16 before building. Default to True.
fp16_blacklist_ops class-attribute instance-attribute ¶
fp16_blacklist_ops: Collection[str] | None = None
ONNX node or op names to keep in FP32 during FP16 conversion.
jit_convolutions class-attribute instance-attribute ¶
jit_convolutions: bool = True
Enable TensorRT JIT convolution tactics.
l2_limit_for_tiling class-attribute instance-attribute ¶
l2_limit_for_tiling: int = -1
L2 cache usage hint for tiling optimization.
max_aux_streams class-attribute instance-attribute ¶
max_aux_streams: int | None = None
Maximum auxiliary streams used by TensorRT kernels.
max_num_tactics class-attribute instance-attribute ¶
max_num_tactics: int | None = None
Maximum number of tactics considered per layer.
max_shapes class-attribute instance-attribute ¶
max_shapes: Shape | None = None
Maximum dynamic input tile size as (width, height). Defaults to the inference tile size.
max_threads class-attribute instance-attribute ¶
Maximum number of builder threads. Limits CPU usage during engine build.
min_shapes class-attribute instance-attribute ¶
min_shapes: Shape = (0, 0)
Minimum dynamic input tile size as (width, height).
num_streams class-attribute instance-attribute ¶
num_streams: int = 1
Number of parallel plugin inference streams.
opt_shapes class-attribute instance-attribute ¶
opt_shapes: Shape | None = None
Optimal input tile size as (width, height). Defaults to the inference tile size.
sparse_weights class-attribute instance-attribute ¶
sparse_weights: bool = False
Allow the builder to exploit structured sparsity in weights.
static_shape class-attribute instance-attribute ¶
static_shape: bool = True
Build a fixed-shape engine when true.
strict_nans class-attribute instance-attribute ¶
strict_nans: bool = False
Disable float optimizations (0*x => 0, x-x => 0, x/x => 1) to preserve NaN/Inf propagation.
tactic_dram class-attribute instance-attribute ¶
tactic_dram: int | None = None
DRAM limit in bytes for the optimizer during tactic selection. Prevents OOM on memory-constrained systems.
tiling_optimization_level class-attribute instance-attribute ¶
tiling_optimization_level: (
SupportsInt | TilingOptimizationLevel | TilingOptimizationLevel
) = 0
TensorRT tiling optimization search level.
use_cuda_graph class-attribute instance-attribute ¶
use_cuda_graph: bool = True
Enable CUDA graph execution for compatible engines to improve performance and reduce CPU overhead.
verbosity class-attribute instance-attribute ¶
verbosity: SupportsInt | Severity | Severity | None = field(
default=None, repr=False
)
TensorRT/plugin logging severity.
weight_streaming class-attribute instance-attribute ¶
weight_streaming: bool = False
Stream weights from host to device to reduce GPU memory at the cost of performance.
workspace class-attribute instance-attribute ¶
workspace: int | None = None
Workspace memory pool limit in bytes.
OutputFormat ¶
autoselect classmethod ¶
Try to select the best backend for the current system.
Parameters:
-
(device_id¶int, default:0) –The GPU device id.
-
(**kwargs¶Any, default:{}) –Additional arguments to pass to the backend.
Returns:
-
Backend–The selected backend.
Source code in vsscale/mlrt/backend/base.py
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | |
build ¶
build(
network_path: Path,
engine_path: Path,
channels: int,
tilesize: Shape,
input_name: str,
) -> None
Source code in vsscale/mlrt/backend/trt.py
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 | |
build_engine ¶
build_engine(
network_path: Path,
channels: int,
tilesize: Shape,
input_name: str = "input",
) -> Path
Build or retrieve a cached TensorRT engine.
Parameters:
-
(network_path¶Path) –Path to the ONNX model.
-
(channels¶int) –Number of model input channels.
-
(tilesize¶Shape) –Inference tile size as
(width, height). -
(input_name¶str, default:'input') –Name of the model input tensor.
Returns:
-
Path–Path to the serialized engine file.
Source code in vsscale/mlrt/backend/trt.py
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 | |
configure_builder_config ¶
configure_builder_config(
config: IBuilderConfig, network: INetworkDefinition
) -> None
Source code in vsscale/mlrt/backend/trt.py
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 | |
configure_optimization_settings ¶
configure_optimization_settings(config: IBuilderConfig) -> None
Source code in vsscale/mlrt/backend/trt.py
341 342 343 344 345 346 347 348 349 350 351 352 353 | |
configure_tactic_sources ¶
configure_tactic_sources(config: IBuilderConfig) -> None
Source code in vsscale/mlrt/backend/trt.py
326 327 328 329 330 331 332 333 334 335 336 337 338 339 | |
get_args ¶
Return backend plugin arguments derived from this configuration.
Source code in vsscale/mlrt/backend/trt.py
184 185 186 187 188 189 190 | |
get_identity ¶
Source code in vsscale/mlrt/backend/trt.py
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | |
inference ¶
inference(
clips: VideoNode | Sequence[VideoNode],
network_path: str | PathLike[str],
/,
overlap: tuple[int, int],
tilesize: tuple[int, int],
*,
flexible: bool = False,
**kwargs: Any,
) -> VideoNode | list[VideoNode]
Run inference with this backend.
Parameters:
-
(clips¶VideoNode | Sequence[VideoNode]) –Input clip or clips passed to the backend model.
-
(network_path¶str | PathLike[str]) –Path to the model file or backend artifact.
-
(overlap¶tuple[int, int]) –Horizontal and vertical tile overlap in pixels.
-
(tilesize¶tuple[int, int]) –Horizontal and vertical tile size in pixels.
-
(flexible¶bool, default:False) –Return each flexible output plane as a separate clip.
-
(**kwargs¶Any, default:{}) –Additional backend plugin arguments forwarded unchanged.
Returns:
-
VideoNode | list[VideoNode]–A single output clip, or a list of output clips when
flexibleis enabled.
Source code in vsscale/mlrt/backend/trt.py
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | |
logger classmethod ¶
logger() -> ILogger
Source code in vsscale/mlrt/backend/trt.py
493 494 495 496 497 498 | |
setup_optimization_profile ¶
setup_optimization_profile(
builder: Builder,
network: INetworkDefinition,
config: IBuilderConfig,
channels: int,
input_name: str,
tilesize: Shape,
) -> None
Source code in vsscale/mlrt/backend/trt.py
355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 | |