8000 [Inductor] Add a JIT Inductor unit test following #146293 · pytorch/pytorch@08285df · GitHub
[go: up one dir, main page]

Skip to content

Commit 08285df

Browse files
committed
[Inductor] Add a JIT Inductor unit test following #146293
Summary: To follow up #146293, add a JIT Inductor unit test. Other Triton template may need similar fixes. ghstack-source-id: 6fdb192 Pull Request resolved: #146529
1 parent e01a5e9 commit 08285df

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

test/inductor/test_torchinductor.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3747,6 +3747,26 @@ def forward(self, x):
37473747
with self.assertRaisesRegex(RuntimeError, msg):
37483748
torch.compile(fn)(t)
37493749

3750+
@config.patch(
3751+
{
3752+
"max_autotune": True,
3753+
"max_autotune_gemm_backends": "TRITON",
3754+
}
3755+
)
3756+
def test_linear_dynamic_maxautotune(self):
3757+
@torch.compile(dynamic=True)
3758+
class Model(torch.nn.Module):
3759+
def __init__(self) -> None:
3760+
super().__init__()
3761+
self.linear = torch.nn.Linear(1, 1)
3762+
3763+
def forward(self, x):
3764+
return self.linear(x)
3765+
3766+
x = torch.randn(10, 1)
3767+
torch._dynamo.mark_dynamic(x, 0)
3768+
self.common(Model(), (x,))
3769+
37503770
def test_scalar_input(self):
37513771
def fn(x, y):
37523772
a = torch.div(x, y, rounding_mode="floor")

0 commit comments

Comments
 (0)
0