Skip to content

Commit 1f7f8e9

Browse files
committed
fix: Set dynamic=False in torch.compile call
- Currently, we do not support symbolic values in our converters or in our compiler generally - Setting `dynamic=False` ensures the kernels and shapes are specialized, which is the existing behavior reflected by the current converters - When SymInt Dynamic shape support is ready, remove this argument
1 parent 91fcea4 commit 1f7f8e9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

py/torch_tensorrt/_compile.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,10 @@ def torch_compile(module: torch.nn.Module, **kwargs: Any) -> Any:
239239
"""
240240
from torch_tensorrt.dynamo.backend import torch_tensorrt_backend
241241

242-
boxed_fn = torch.compile(module, backend=torch_tensorrt_backend, options={**kwargs})
242+
# TODO: Remove dynamic=False when SymInt Dynamic shape support is ready
243+
boxed_fn = torch.compile(
244+
module, backend=torch_tensorrt_backend, dynamic=False, options={**kwargs}
245+
)
243246

244247
return boxed_fn
245248

0 commit comments

Comments
 (0)