Skip to content

dynamic shape arg#4233

Open
apbose wants to merge 1 commit intomainfrom
abose/dynamic-shapes-passthrough
Open

dynamic shape arg#4233
apbose wants to merge 1 commit intomainfrom
abose/dynamic-shapes-passthrough

Conversation

@apbose
Copy link
Copy Markdown
Collaborator

@apbose apbose commented May 5, 2026

Add dynamic_shapes= passthrough kwarg to torch_tensorrt.compile —forwards directly to torch.export.export, letting users share a Dim across inputs
Unblock kwarg-only nn.Module calls — relax the arg_inputs is None assertion, normalize None to [], and stop inputs or arg_inputs from overwriting empty inputs

@meta-cla meta-cla Bot added the cla signed label May 5, 2026
@github-actions github-actions Bot added component: tests Issues re: Tests component: core Issues re: The core compiler component: api [Python] Issues re: Python API component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths labels May 5, 2026
@github-actions github-actions Bot requested a review from zewenli98 May 5, 2026 04:54
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some changes that do not conform to Python style guidelines:

--- /home/runner/work/TensorRT/TensorRT/tests/py/dynamo/models/test_shared_dynamic_dim.py	2026-05-05 04:54:37.448873+00:00
+++ /home/runner/work/TensorRT/TensorRT/tests/py/dynamo/models/test_shared_dynamic_dim.py	2026-05-05 04:55:00.216122+00:00
@@ -14,10 +14,11 @@
caller supply a shared ``Dim`` directly to ``torch_tensorrt.compile`` --
mirroring the ``torch.export.export(dynamic_shapes=...)`` signature -- so the
shared-batch case compiles end to end without the caller having to pre-export
the module themselves.
"""
+
import unittest

import pytest
import torch
import torch.nn as nn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed component: api [Python] Issues re: Python API component: core Issues re: The core compiler component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths component: tests Issues re: Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant