Allow symbols to reach conv_layout stride argument #125829 (#126116)
https://github.com/pytorch/pytorch/pull/125829 was reverted i rebased and the error could be merge error
because its not reproducible.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/126116
Approved by: https://github.com/anijain2305
diff --git a/torch/_inductor/kernel/conv.py b/torch/_inductor/kernel/conv.py
index 37a760a..44aef07 100644
--- a/torch/_inductor/kernel/conv.py
+++ b/torch/_inductor/kernel/conv.py
@@ -5,6 +5,7 @@
from typing import cast, List, Optional, Sequence, Tuple, TYPE_CHECKING, TypedDict
import torch
+
from .. import config, ir
from ..lowering import (
@@ -245,11 +246,11 @@
ir.ir_node_to_tensor(x, guard_shape=True),
ir.ir_node_to_tensor(weight, guard_shape=True),
ir.ir_node_to_tensor(bias, guard_shape=True),
- stride,
- tuple(V.graph.sizevars.size_hint(p) for p in padding), # type: ignore[arg-type]
+ V.graph.sizevars.size_hints(stride), # type: ignore[arg-type]
+ V.graph.sizevars.size_hints(padding), # type: ignore[arg-type]
dilation,
transposed,
- tuple(V.graph.sizevars.size_hint(p) for p in output_padding), # type: ignore[arg-type]
+ V.graph.sizevars.size_hints(output_padding), # type: ignore[arg-type]
groups,
)
sizes = ir.convert_shape_to_inductor(output.size())