Skip to content

Commit daffc7c

Browse files
change decomposition default table due to upstream torch change (#3291)
1 parent b4de166 commit daffc7c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

py/torch_tensorrt/dynamo/lowering/_decompositions.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
import torch
66
from torch._decomp import register_decomposition
7-
from torch._export.utils import _decomp_table_to_post_autograd_aten
87
from torch._ops import OpOverload
8+
from torch.export import default_decompositions
99
from torch_tensorrt.dynamo._defaults import default_device
1010
from torch_tensorrt.dynamo.conversion.converter_utils import get_positive_dim
1111
from torch_tensorrt.dynamo.utils import to_torch_device
@@ -412,7 +412,8 @@ def get_decompositions(
412412
return {**CORE_ATEN_DECOMPOSITIONS_FILTERED, **TORCH_TRT_DECOMPOSITIONS}
413413
else:
414414
# changes made here due to torch2.6 changes https://github.com/pytorch/pytorch/pull/135080
415-
decomp_table = _decomp_table_to_post_autograd_aten()
415+
# changes made here due to torch2.6 changes https://github.com/pytorch/pytorch/pull/140085
416+
decomp_table = default_decompositions()
416417
DECOMP_TABLE_FILTERED: Dict[OpOverload, Callable[[Any], Any]] = {
417418
decomp: decomp_table[decomp]
418419
for decomp in decomp_table

0 commit comments

Comments
 (0)