Skip to content

Commit

Permalink
[inductor] Check if n is the input tensor of conv_pointwise
Browse files Browse the repository at this point in the history
ghstack-source-id: 5841a82842be5440f73e1d2612a96eefdbabd2f0
Pull Request resolved: #125119
  • Loading branch information
jiayisunx committed Apr 29, 2024
1 parent 94b328e commit fd4b047
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion torch/_inductor/graph.py
Expand Up @@ -1286,7 +1286,10 @@ def debug(msg):
ir.get_stride_order(n.meta["val"].stride()),
allow_padding=True,
)
if user.target in need_fixed_channels_last_layout:
if (
user.target in need_fixed_channels_last_layout
and n is user.args[0]
):
result = ir.ExternKernel.require_stride_order(
result,
ir.get_stride_order(
Expand Down

0 comments on commit fd4b047

Please sign in to comment.