Skip to content

Commit

Permalink
Automated Update
Browse files Browse the repository at this point in the history
  • Loading branch information
natural-harmonia-gropius authored and github-actions[bot] committed Jan 25, 2025
1 parent 46e38ef commit 58be336
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions portable_config/filters/vsmlrt.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "3.22.10"
__version__ = "3.22.12"

__all__ = [
"Backend", "BackendV2",
Expand Down Expand Up @@ -186,6 +186,8 @@ class TRT:
custom_args: typing.List[str] = field(default_factory=lambda: [])
engine_folder: typing.Optional[str] = None
max_tactics: typing.Optional[int] = None
tiling_optimization_level: int = 0
l2_limit_for_tiling: int = -1

# internal backend attributes
supports_onnx_serialization: bool = False
Expand Down Expand Up @@ -1703,16 +1705,18 @@ def SwinIR(

@enum.unique
class ArtCNNModel(enum.IntEnum):
ArtCNN_C4F32 = 0 # deprecated
ArtCNN_C4F32_DS = 1 # deprecated
ArtCNN_C4F32 = 0
ArtCNN_C4F32_DS = 1
ArtCNN_C16F64 = 2
ArtCNN_C16F64_DS = 3
ArtCNN_C4F32_Chroma = 4 # deprecated
ArtCNN_C4F32_Chroma = 4
ArtCNN_C16F64_Chroma = 5
ArtCNN_R16F96 = 6
ArtCNN_R8F64 = 7
ArtCNN_R8F64_DS = 8
ArtCNN_R8F64_Chroma = 9
ArtCNN_C4F16 = 10
ArtCNN_C4F16_DS = 11


def ArtCNN(
Expand Down Expand Up @@ -1922,7 +1926,9 @@ def trtexec(
custom_env: typing.Dict[str, str] = {},
custom_args: typing.List[str] = [],
engine_folder: typing.Optional[str] = None,
max_tactics: typing.Optional[int] = None
max_tactics: typing.Optional[int] = None,
tiling_optimization_level: int = 0,
l2_limit_for_tiling: int = -1,
) -> str:

# tensort runtime version
Expand Down Expand Up @@ -2104,6 +2110,10 @@ def trtexec(
if max_tactics is not None:
args.append(f"--maxTactics={max_tactics}")

if trt_version >= (10, 8, 0) and tiling_optimization_level != 0:
args.append(f"--tilingOptimizationLevel={tiling_optimization_level}")
args.append(f"--l2LimitForTiling={l2_limit_for_tiling}")

args.extend(custom_args)

if log:
Expand Down Expand Up @@ -2613,6 +2623,8 @@ def _inference(
custom_args=backend.custom_args,
engine_folder=backend.engine_folder,
max_tactics=backend.max_tactics,
tiling_optimization_level=backend.tiling_optimization_level,
l2_limit_for_tiling=backend.l2_limit_for_tiling,
)
ret = core.trt.Model(
clips, engine_path,
Expand Down

0 comments on commit 58be336

Please # to comment.