Skip to content

Commit e3ebe30

Browse files
jataylodnikolaev-amd
authored andcommitted
[Navi] [Inductor] Unskip Navi inductor UTs (#1514)
Relates to https://ontrack-internal.amd.com/browse/SWDEV-461590
1 parent 8c1fa06 commit e3ebe30

File tree

3 files changed

+0
-36
lines changed

3 files changed

+0
-36
lines changed

test/inductor/test_cuda_repro.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,6 @@ def foo(x):
337337
out_ref.add_(2)
338338
# self.assertEqual(out_ref, out)
339339

340-
@skipIfRocmArch(NAVI_ARCH)
341340
def test_accuracy_issue1(self):
342341
class Repro(torch.nn.Module):
343342
def __init__(self) -> None:
@@ -374,7 +373,6 @@ def forward(self, start_positions: torch.Tensor, x: torch.Tensor):
374373
assert same_two_models(mod, opt_mod, args), "Dynamo failed"
375374

376375
@config.patch(allow_buffer_reuse=False)
377-
@skipIfRocmArch(NAVI_ARCH)
378376
def test_issue103461(self):
379377
def forward(add_1):
380378
var_mean = torch.ops.aten.var_mean.correction(
@@ -873,7 +871,6 @@ def forward(self, x):
873871
res2 = jit_func(x)
874872
self.assertEqual(res1, res2)
875873

876-
@skipIfRocmArch(NAVI_ARCH)
877874
def test_issue103481(self):
878875
def fn(x, y):
879876
# NOTE: 6 dimensions is important! does not fail for 5 dimensions

test/inductor/test_torchinductor.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1801,7 +1801,6 @@ def fn(x):
18011801
# make sure things also work if they aren't unrolled
18021802
self.common(fn, (torch.randn(8, 3),))
18031803

1804-
@skipIfRocmArch(NAVI_ARCH)
18051804
def test_multilayer_sum_low_prec(self):
18061805
# fp16 nyi for cpu
18071806
if self.device == "cpu":
@@ -1812,7 +1811,6 @@ def fn(a):
18121811

18131812
self.common(fn, ((torch.rand((10, 3, 352, 352), dtype=torch.float16),)))
18141813

1815-
@skipIfRocmArch(NAVI_ARCH)
18161814
def test_multilayer_prime_size(self):
18171815
def fn(a):
18181816
return torch.max(a), torch.sum(a)
@@ -1824,7 +1822,6 @@ def fn(a):
18241822

18251823
@skip_if_gpu_halide
18261824
@skipCPUIf(IS_MACOS, "fails on macos")
1827-
@skipIfRocmArch(NAVI_ARCH)
18281825
def test_multilayer_var(self):
18291826
def fn(a):
18301827
return torch.var(a)
@@ -2976,7 +2973,6 @@ def fn(a, b):
29762973
self.common(fn, (torch.randn(8, 8), torch.randn(8, 8)))
29772974

29782975
@skip_if_halide # only 32-bit indexing
2979-
@skipIfRocmArch(NAVI_ARCH)
29802976
def test_large_tensor_reduction(self):
29812977
if not _has_sufficient_memory(self.device, 4.5 * 1024**3): # 4.5 GiB
29822978
raise unittest.SkipTest("insufficient memory")
@@ -2998,7 +2994,6 @@ def fn(a):
29982994
self.assertEqual(actual, expect)
29992995

30002996
@skip_if_gpu_halide # only 32-bit indexing
3001-
@skipIfRocmArch(NAVI_ARCH)
30022997
def test_large_broadcast_reduction(self):
30032998
if self.device == "cpu":
30042999
raise unittest.SkipTest("Fails on CPU")
@@ -4160,7 +4155,6 @@ def test_conv2d_channels_last(self):
41604155
check_lowp=False,
41614156
)
41624157

4163-
@skipIfRocmArch(NAVI_ARCH)
41644158
def test_conv2d_backward_channels_last(self):
41654159
def fn(grad_output, inp, weight):
41664160
convolution_backward_8 = torch.ops.aten.convolution_backward.default(
@@ -4945,7 +4939,6 @@ def fn(x, y):
49454939
self.assertEqual(c.stride()[2], 1)
49464940

49474941
@skip_if_gpu_halide
4948-
@skipIfRocmArch(NAVI_ARCH)
49494942
def test_std(self):
49504943
def fn(x):
49514944
return (
@@ -4988,7 +4981,6 @@ def test_batch_norm_2d(self):
49884981

49894982
# From yolov3
49904983
@with_tf32_off
4991-
@skipIfRocmArch(NAVI_ARCH)
49924984
def test_batch_norm_2d_2(self):
49934985
if self.device == "cpu":
49944986
raise unittest.SkipTest(f"requires {GPU_TYPE}")
@@ -5135,7 +5127,6 @@ def fn(dist, angle):
51355127
self.common(fn, (*inp,))
51365128

51375129
@skip_if_gpu_halide # incorrect result on CUDA
5138-
@skipIfRocmArch(NAVI_ARCH)
51395130
def test_cauchy(self):
51405131
def fn(x, y):
51415132
return torch.sum(1 / (torch.unsqueeze(x, -1) - y))
@@ -6536,7 +6527,6 @@ def fn(a):
65366527
y = fn_compiled(x)
65376528
self.assertTrue(y is not x)
65386529

6539-
@skipIfRocmArch(NAVI_ARCH)
65406530
def test_l1_loss(self):
65416531
def fn(a, b):
65426532
return torch.nn.functional.l1_loss(a, b), torch.nn.functional.mse_loss(a, b)
@@ -6939,7 +6929,6 @@ def fn(x):
69396929
fn, (torch.tensor([1, float("inf"), 2, float("-inf"), float("nan")]),)
69406930
)
69416931

6942-
@skipIfRocmArch(NAVI_ARCH)
69436932
def test_any(self):
69446933
def fn(x):
69456934
return (
@@ -7707,7 +7696,6 @@ def fn(a, dim, index, b, reduce):
77077696

77087697
@skip_if_gpu_halide
77097698
# issue #1150
7710-
@skipIfRocmArch(NAVI_ARCH)
77117699
def test_dense_mask_index(self):
77127700
r"""
77137701
There will be a little difference for reduce order between aten and inductor
@@ -8715,7 +8703,6 @@ def fn(a, b):
87158703
b = torch.rand(2, 2, 1, 4, 1).int()
87168704
self.common(fn, (a, b))
87178705

8718-
@skipIfRocmArch(NAVI_ARCH)
87198706
def test_argmax_argmin1(self):
87208707
def fn(x):
87218708
return (aten.argmax(x), aten.argmin(x))
@@ -8727,7 +8714,6 @@ def fn(x):
87278714
],
87288715
)
87298716

8730-
@skipIfRocmArch(NAVI_ARCH)
87318717
def test_argmax_argmin2(self):
87328718
def fn(x):
87338719
return (
@@ -8739,7 +8725,6 @@ def fn(x):
87398725

87408726
self.common(fn, (torch.randn([144, 144]),))
87418727

8742-
@skipIfRocmArch(NAVI_ARCH)
87438728
def test_argmax_argmin_with_duplicates(self):
87448729
def fn(x):
87458730
return (
@@ -8762,7 +8747,6 @@ def fn(x):
87628747
self.common(fn, (t1,))
87638748

87648749
@skip_if_halide # nan behavior
8765-
@skipIfRocmArch(NAVI_ARCH)
87668750
def test_argmax_argmin_with_nan(self):
87678751
def fn(x):
87688752
return (
@@ -8886,7 +8870,6 @@ def fn(x):
88868870
],
88878871
)
88888872

8889-
@skipIfRocmArch(NAVI_ARCH)
88908873
def test_tmp_not_defined_issue1(self):
88918874
def forward(
88928875
primals_3,
@@ -9286,7 +9269,6 @@ def __torch_dispatch__(self, func, types, args=(), kwargs=None):
92869269
else:
92879270
self.assertEqual(len(inps), 0)
92889271

9289-
@skipIfRocmArch(NAVI_ARCH)
92909272
def test_dtype_mismatch_issue(self):
92919273
def fn(x):
92929274
attn = torch.nn.functional.pad(x, [0, 1])
@@ -12377,7 +12359,6 @@ def test_rnn_compile_safe(self):
1237712359

1237812360
class NanCheckerTest(TestCase):
1237912361
@config.patch("nan_asserts", True)
12380-
@skipIfRocmArch(NAVI_ARCH)
1238112362
def test_nan_checker_pass(self):
1238212363
def f(x):
1238312364
return torch.softmax(x, dim=-1)

test/inductor/test_torchinductor_opinfo.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
dtype_abbrs,
3333
IS_MACOS,
3434
IS_X86,
35-
is_navi_arch,
3635
skipCUDAMemoryLeakCheckIf,
3736
skipIfCrossRef,
3837
skipIfTorchDynamo,
@@ -204,19 +203,6 @@ def format_op(op):
204203
# Tensors are not alike
205204
inductor_skips["cuda"]["logcumsumexp"] = {f32}
206205
inductor_skips["cuda"]["special.modified_bessel_i1"] = {f64}
207-
if is_navi_arch():
208-
inductor_skips["cuda"]["aminmax"] = {b8, f16, f32, f64, i32, i64}
209-
inductor_skips["cuda"]["dist"] = {b8, f16, f32, f64, i32, i64}
210-
inductor_skips["cuda"]["kron"] = {b8, f16, f32, f64, i32, i64}
211-
inductor_skips["cuda"]["masked.std"] = {b8, f16, f32, f64, i32, i64}
212-
inductor_skips["cuda"]["masked.var"] = {b8, f16, f32, f64, i32, i64}
213-
inductor_skips["cuda"][("max", "reduction_no_dim")] = {b8, f16, f32, f64, i32, i64}
214-
inductor_skips["cuda"][("min", "reduction_no_dim")] = {b8, f16, f32, f64, i32, i64}
215-
inductor_skips["cuda"]["nn.functional.conv_transpose3d"] = {b8, f16, f32, f64, i32, i64}
216-
inductor_skips["cuda"]["std"] = {b8, f16, f32, f64, i32, i64}
217-
inductor_skips["cuda"]["std_mean"] = {b8, f16, f32, f64, i32, i64}
218-
inductor_skips["cuda"]["var"] = {b8, f16, f32, f64, i32, i64}
219-
inductor_skips["cuda"]["var_mean"] = {b8, f16, f32, f64, i32, i64}
220206

221207
inductor_expected_failures_single_sample = defaultdict(dict)
222208

0 commit comments

Comments
 (0)