Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change decomposition default table due to upstream torch change #3291

Merged
merged 1 commit into from
Nov 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions py/torch_tensorrt/dynamo/lowering/_decompositions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

import torch
from torch._decomp import register_decomposition
from torch._export.utils import _decomp_table_to_post_autograd_aten
from torch._ops import OpOverload
from torch.export import default_decompositions
from torch_tensorrt.dynamo._defaults import default_device
from torch_tensorrt.dynamo.conversion.converter_utils import get_positive_dim
from torch_tensorrt.dynamo.utils import to_torch_device
Expand Down Expand Up @@ -412,7 +412,8 @@ def get_decompositions(
return {**CORE_ATEN_DECOMPOSITIONS_FILTERED, **TORCH_TRT_DECOMPOSITIONS}
else:
# changes made here due to torch2.6 changes https://github.com/pytorch/pytorch/pull/135080
decomp_table = _decomp_table_to_post_autograd_aten()
# changes made here due to torch2.6 changes https://github.com/pytorch/pytorch/pull/140085
decomp_table = default_decompositions()
Copy link
Collaborator

Choose a reason for hiding this comment

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

@peri044 can we take a quick pass on the decomp set?

DECOMP_TABLE_FILTERED: Dict[OpOverload, Callable[[Any], Any]] = {
decomp: decomp_table[decomp]
for decomp in decomp_table
Expand Down
Loading