From bc7349bac20566c2f75a1b1c88e2c872fcc3da18 Mon Sep 17 00:00:00 2001 From: Gregory James Comer Date: Thu, 4 Sep 2025 17:30:16 -0700 Subject: [PATCH 1/9] Update [ghstack-poisoned] --- backends/test/suite/models/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/backends/test/suite/models/__init__.py b/backends/test/suite/models/__init__.py index 76b2d2966f6..65b546b0eb5 100644 --- a/backends/test/suite/models/__init__.py +++ b/backends/test/suite/models/__init__.py @@ -22,7 +22,6 @@ DTYPES: list[torch.dtype] = [ torch.float16, torch.float32, - torch.float64, ] From 223d5d654671810d55dae40cde82503d836cb6fb Mon Sep 17 00:00:00 2001 From: Gregory Comer Date: Thu, 4 Sep 2025 22:45:06 -0700 Subject: [PATCH 2/9] Update [ghstack-poisoned] --- backends/test/suite/operators/test_elu.py | 2 ++ backends/test/suite/operators/test_hardsigmoid.py | 2 ++ backends/test/suite/operators/test_hardswish.py | 2 ++ backends/test/suite/operators/test_hardtanh.py | 2 ++ backends/test/suite/operators/test_leaky_relu.py | 2 ++ backends/test/suite/operators/test_relu.py | 2 ++ backends/test/suite/operators/test_silu.py | 2 ++ backends/test/suite/operators/test_threshold.py | 2 ++ 8 files changed, 16 insertions(+) diff --git a/backends/test/suite/operators/test_elu.py b/backends/test/suite/operators/test_elu.py index f768a426954..1ecc6c5b1ab 100644 --- a/backends/test/suite/operators/test_elu.py +++ b/backends/test/suite/operators/test_elu.py @@ -8,6 +8,7 @@ import torch +import unittest from executorch.backends.test.suite.flow import TestFlow from executorch.backends.test.suite.operators import ( @@ -42,5 +43,6 @@ def test_elu_f32_multi_dim(self, flow: TestFlow) -> None: def test_elu_f32_alpha(self, flow: TestFlow) -> None: self._test_op(Model(alpha=0.5), (torch.randn(3, 4, 5),), flow) + @unittest.skip("In place activations aren't properly defunctionalized yet.") def test_elu_f32_inplace(self, flow: TestFlow) -> None: self._test_op(Model(inplace=True), (torch.randn(3, 4, 5),), flow) diff --git a/backends/test/suite/operators/test_hardsigmoid.py b/backends/test/suite/operators/test_hardsigmoid.py index 238b18b1e0d..8eff9d75f6a 100644 --- a/backends/test/suite/operators/test_hardsigmoid.py +++ b/backends/test/suite/operators/test_hardsigmoid.py @@ -8,6 +8,7 @@ import torch +import unittest from executorch.backends.test.suite.flow import TestFlow from executorch.backends.test.suite.operators import ( @@ -38,6 +39,7 @@ def test_hardsigmoid_f32_single_dim(self, flow: TestFlow) -> None: def test_hardsigmoid_f32_multi_dim(self, flow: TestFlow) -> None: self._test_op(Model(), (torch.randn(2, 3, 4, 5),), flow) + @unittest.skip("In place activations aren't properly defunctionalized yet.") def test_hardsigmoid_f32_inplace(self, flow: TestFlow) -> None: self._test_op(Model(inplace=True), (torch.randn(3, 4, 5),), flow) diff --git a/backends/test/suite/operators/test_hardswish.py b/backends/test/suite/operators/test_hardswish.py index 66902791c33..09b959be1ef 100644 --- a/backends/test/suite/operators/test_hardswish.py +++ b/backends/test/suite/operators/test_hardswish.py @@ -8,6 +8,7 @@ import torch +import unittest from executorch.backends.test.suite.flow import TestFlow from executorch.backends.test.suite.operators import ( @@ -38,6 +39,7 @@ def test_hardswish_f32_single_dim(self, flow: TestFlow) -> None: def test_hardswish_f32_multi_dim(self, flow: TestFlow) -> None: self._test_op(Model(), (torch.randn(2, 3, 4, 5),), flow) + @unittest.skip("In place activations aren't properly defunctionalized yet.") def test_hardswish_f32_inplace(self, flow: TestFlow) -> None: self._test_op(Model(inplace=True), (torch.randn(3, 4, 5),), flow) diff --git a/backends/test/suite/operators/test_hardtanh.py b/backends/test/suite/operators/test_hardtanh.py index 2fcd1dbf563..09d25550685 100644 --- a/backends/test/suite/operators/test_hardtanh.py +++ b/backends/test/suite/operators/test_hardtanh.py @@ -8,6 +8,7 @@ import torch +import unittest from executorch.backends.test.suite.flow import TestFlow from executorch.backends.test.suite.operators import ( @@ -45,6 +46,7 @@ def test_hardtanh_f32_multi_dim(self, flow: TestFlow) -> None: def test_hardtanh_f32_custom_range(self, flow: TestFlow) -> None: self._test_op(Model(min_val=-2.0, max_val=2.0), (torch.randn(3, 4, 5),), flow) + @unittest.skip("In place activations aren't properly defunctionalized yet.") def test_hardtanh_f32_inplace(self, flow: TestFlow) -> None: self._test_op(Model(inplace=True), (torch.randn(3, 4, 5),), flow) diff --git a/backends/test/suite/operators/test_leaky_relu.py b/backends/test/suite/operators/test_leaky_relu.py index 983da47bba3..def8f8f8492 100644 --- a/backends/test/suite/operators/test_leaky_relu.py +++ b/backends/test/suite/operators/test_leaky_relu.py @@ -8,6 +8,7 @@ import torch +import unittest from executorch.backends.test.suite.flow import TestFlow from executorch.backends.test.suite.operators import ( @@ -44,6 +45,7 @@ def test_leaky_relu_f32_multi_dim(self, flow: TestFlow) -> None: def test_leaky_relu_f32_custom_slope(self, flow: TestFlow) -> None: self._test_op(Model(negative_slope=0.1), (torch.randn(3, 4, 5),), flow) + @unittest.skip("In place activations aren't properly defunctionalized yet.") def test_leaky_relu_f32_inplace(self, flow: TestFlow) -> None: self._test_op(Model(inplace=True), (torch.randn(3, 4, 5),), flow) diff --git a/backends/test/suite/operators/test_relu.py b/backends/test/suite/operators/test_relu.py index c9f416f090f..fc03bfedfc3 100644 --- a/backends/test/suite/operators/test_relu.py +++ b/backends/test/suite/operators/test_relu.py @@ -8,6 +8,7 @@ import torch +import unittest from executorch.backends.test.suite.flow import TestFlow from executorch.backends.test.suite.operators import ( @@ -38,5 +39,6 @@ def test_relu_f32_single_dim(self, flow: TestFlow) -> None: def test_relu_f32_multi_dim(self, flow: TestFlow) -> None: self._test_op(Model(), (torch.randn(2, 3, 4, 5),), flow) + @unittest.skip("In place activations aren't properly defunctionalized yet.") def test_relu_f32_inplace(self, flow: TestFlow) -> None: self._test_op(Model(inplace=True), (torch.randn(3, 4, 5),), flow) diff --git a/backends/test/suite/operators/test_silu.py b/backends/test/suite/operators/test_silu.py index 69b6576734f..46b7c55489e 100644 --- a/backends/test/suite/operators/test_silu.py +++ b/backends/test/suite/operators/test_silu.py @@ -8,6 +8,7 @@ import torch +import unittest from executorch.backends.test.suite.flow import TestFlow from executorch.backends.test.suite.operators import ( @@ -38,6 +39,7 @@ def test_silu_f32_single_dim(self, flow: TestFlow) -> None: def test_silu_f32_multi_dim(self, flow: TestFlow) -> None: self._test_op(Model(), (torch.randn(2, 3, 4, 5),), flow) + @unittest.skip("In place activations aren't properly defunctionalized yet.") def test_silu_f32_inplace(self, flow: TestFlow) -> None: self._test_op(Model(inplace=True), (torch.randn(3, 4, 5),), flow) diff --git a/backends/test/suite/operators/test_threshold.py b/backends/test/suite/operators/test_threshold.py index 42b6fb801e5..85cf65ab8f2 100644 --- a/backends/test/suite/operators/test_threshold.py +++ b/backends/test/suite/operators/test_threshold.py @@ -8,6 +8,7 @@ import torch +import unittest from executorch.backends.test.suite.flow import TestFlow from executorch.backends.test.suite.operators import ( @@ -51,6 +52,7 @@ def test_threshold_f32_custom_value(self, flow: TestFlow) -> None: def test_threshold_f32_custom_threshold_value(self, flow: TestFlow) -> None: self._test_op(Model(threshold=0.5, value=1.0), (torch.randn(3, 4, 5),), flow) + @unittest.skip("In place activations aren't properly defunctionalized yet.") def test_threshold_f32_inplace(self, flow: TestFlow) -> None: self._test_op(Model(inplace=True), (torch.randn(3, 4, 5),), flow) From ed8a85995a342b82e6174e9db2b9a08f4a430e64 Mon Sep 17 00:00:00 2001 From: Gregory James Comer Date: Thu, 4 Sep 2025 23:05:28 -0700 Subject: [PATCH 3/9] Update [ghstack-poisoned] --- backends/test/suite/operators/test_abs.py | 2 ++ backends/test/suite/operators/test_amax.py | 2 ++ backends/test/suite/operators/test_amin.py | 2 ++ backends/test/suite/operators/test_argmax.py | 2 ++ backends/test/suite/operators/test_argmin.py | 2 ++ backends/test/suite/operators/test_ceil.py | 2 ++ backends/test/suite/operators/test_clamp.py | 2 ++ backends/test/suite/operators/test_exp.py | 2 ++ backends/test/suite/operators/test_floor.py | 2 ++ backends/test/suite/operators/test_floor_divide.py | 2 ++ backends/test/suite/operators/test_log.py | 2 ++ backends/test/suite/operators/test_log10.py | 2 ++ backends/test/suite/operators/test_log1p.py | 2 ++ backends/test/suite/operators/test_log2.py | 2 ++ backends/test/suite/operators/test_mean.py | 2 ++ backends/test/suite/operators/test_median.py | 2 ++ backends/test/suite/operators/test_neg.py | 2 ++ backends/test/suite/operators/test_pow.py | 2 ++ backends/test/suite/operators/test_round.py | 3 +++ backends/test/suite/operators/test_rsqrt.py | 2 ++ backends/test/suite/operators/test_sqrt.py | 2 ++ backends/test/suite/operators/test_square.py | 2 ++ backends/test/suite/operators/test_trunc.py | 2 ++ 23 files changed, 47 insertions(+) diff --git a/backends/test/suite/operators/test_abs.py b/backends/test/suite/operators/test_abs.py index fdfc6be671e..5ab4eb92173 100644 --- a/backends/test/suite/operators/test_abs.py +++ b/backends/test/suite/operators/test_abs.py @@ -8,6 +8,7 @@ import torch +import unittest from executorch.backends.test.suite.flow import TestFlow from executorch.backends.test.suite.operators import ( @@ -45,6 +46,7 @@ def test_abs_shapes(self, flow: TestFlow) -> None: # 3D tensor self._test_op(AbsModel(), (torch.randn(3, 4, 5),), flow) + @unittest.skip("NaN and Inf are not enforced for backends.") def test_abs_edge_cases(self, flow: TestFlow) -> None: # Test edge cases diff --git a/backends/test/suite/operators/test_amax.py b/backends/test/suite/operators/test_amax.py index 0c9a8c06f0d..ab2b1a310ad 100644 --- a/backends/test/suite/operators/test_amax.py +++ b/backends/test/suite/operators/test_amax.py @@ -9,6 +9,7 @@ from typing import List, Optional, Tuple, Union import torch +import unittest from executorch.backends.test.suite.flow import TestFlow from executorch.backends.test.suite.operators import ( @@ -201,6 +202,7 @@ def test_amax_shapes(self, flow: TestFlow) -> None: flow, ) + @unittest.skip("NaN and Inf are not enforced for backends.") def test_amax_edge_cases(self, flow: TestFlow) -> None: x = torch.tensor([[1.0, float("inf"), 3.0], [4.0, 5.0, float("inf")]]) self._test_op( diff --git a/backends/test/suite/operators/test_amin.py b/backends/test/suite/operators/test_amin.py index f4b88b1dade..6787567b2dc 100644 --- a/backends/test/suite/operators/test_amin.py +++ b/backends/test/suite/operators/test_amin.py @@ -9,6 +9,7 @@ from typing import List, Optional, Tuple, Union import torch +import unittest from executorch.backends.test.suite.flow import TestFlow from executorch.backends.test.suite.operators import ( @@ -203,6 +204,7 @@ def test_amin_shapes(self, flow: TestFlow) -> None: flow, ) + @unittest.skip("NaN and Inf are not enforced for backends.") def test_amin_edge_cases(self, flow: TestFlow) -> None: x = torch.tensor([[1.0, float("-inf"), 3.0], [4.0, 5.0, float("-inf")]]) self._test_op( diff --git a/backends/test/suite/operators/test_argmax.py b/backends/test/suite/operators/test_argmax.py index dc8b57fc214..75d34072e77 100644 --- a/backends/test/suite/operators/test_argmax.py +++ b/backends/test/suite/operators/test_argmax.py @@ -9,6 +9,7 @@ from typing import Optional import torch +import unittest from executorch.backends.test.suite.flow import TestFlow from executorch.backends.test.suite.operators import ( @@ -143,6 +144,7 @@ def test_argmax_shapes(self, flow: TestFlow) -> None: flow, ) + @unittest.skip("NaN and Inf are not enforced for backends.") def test_argmax_edge_cases(self, flow: TestFlow) -> None: x = torch.tensor([[1.0, float("inf"), 3.0], [4.0, 5.0, float("inf")]]) self._test_op( diff --git a/backends/test/suite/operators/test_argmin.py b/backends/test/suite/operators/test_argmin.py index d7a24e24f5a..e85e918ca0d 100644 --- a/backends/test/suite/operators/test_argmin.py +++ b/backends/test/suite/operators/test_argmin.py @@ -9,6 +9,7 @@ from typing import Optional import torch +import unittest from executorch.backends.test.suite.flow import TestFlow from executorch.backends.test.suite.operators import ( @@ -143,6 +144,7 @@ def test_argmin_shapes(self, flow: TestFlow) -> None: flow, ) + @unittest.skip("NaN and Inf are not enforced for backends.") def test_argmin_edge_cases(self, flow: TestFlow) -> None: x = torch.tensor([[1.0, float("-inf"), 3.0], [4.0, 5.0, float("-inf")]]) self._test_op( diff --git a/backends/test/suite/operators/test_ceil.py b/backends/test/suite/operators/test_ceil.py index 198c9e9fe16..6ca82afce2d 100644 --- a/backends/test/suite/operators/test_ceil.py +++ b/backends/test/suite/operators/test_ceil.py @@ -8,6 +8,7 @@ import torch +import unittest from executorch.backends.test.suite.flow import TestFlow from executorch.backends.test.suite.operators import ( @@ -45,6 +46,7 @@ def test_ceil_shapes(self, flow: TestFlow) -> None: # 3D tensor self._test_op(CeilModel(), (torch.randn(3, 4, 5),), flow) + @unittest.skip("NaN and Inf are not enforced for backends.") def test_ceil_edge_cases(self, flow: TestFlow) -> None: # Test edge cases diff --git a/backends/test/suite/operators/test_clamp.py b/backends/test/suite/operators/test_clamp.py index 67c61c67caa..8193e62c022 100644 --- a/backends/test/suite/operators/test_clamp.py +++ b/backends/test/suite/operators/test_clamp.py @@ -8,6 +8,7 @@ import torch +import unittest from executorch.backends.test.suite.flow import TestFlow from executorch.backends.test.suite.operators import ( @@ -56,6 +57,7 @@ def test_clamp_shapes(self, flow: TestFlow) -> None: # 3D tensor self._test_op(model, (torch.randn(3, 4, 5),), flow) + @unittest.skip("NaN and Inf are not enforced for backends.") def test_clamp_edge_cases(self, flow: TestFlow) -> None: # Test edge cases diff --git a/backends/test/suite/operators/test_exp.py b/backends/test/suite/operators/test_exp.py index bdae5c6a5e6..0322ee46eaf 100644 --- a/backends/test/suite/operators/test_exp.py +++ b/backends/test/suite/operators/test_exp.py @@ -8,6 +8,7 @@ import torch +import unittest from executorch.backends.test.suite.flow import TestFlow from executorch.backends.test.suite.operators import ( @@ -46,6 +47,7 @@ def test_exp_shapes(self, flow: TestFlow) -> None: # 3D tensor self._test_op(ExpModel(), (torch.randn(3, 4, 5),), flow) + @unittest.skip("NaN and Inf are not enforced for backends.") def test_exp_edge_cases(self, flow: TestFlow) -> None: # Test edge cases diff --git a/backends/test/suite/operators/test_floor.py b/backends/test/suite/operators/test_floor.py index fcc834afa16..c02c5995123 100644 --- a/backends/test/suite/operators/test_floor.py +++ b/backends/test/suite/operators/test_floor.py @@ -8,6 +8,7 @@ import torch +import unittest from executorch.backends.test.suite.flow import TestFlow from executorch.backends.test.suite.operators import ( @@ -42,6 +43,7 @@ def test_floor_shapes(self, flow: TestFlow) -> None: # 3D tensor self._test_op(FloorModel(), (torch.randn(3, 4, 5),), flow) + @unittest.skip("NaN and Inf are not enforced for backends.") def test_floor_edge_cases(self, flow: TestFlow) -> None: # Test edge cases diff --git a/backends/test/suite/operators/test_floor_divide.py b/backends/test/suite/operators/test_floor_divide.py index 87104af11dc..8afb2bb72d0 100644 --- a/backends/test/suite/operators/test_floor_divide.py +++ b/backends/test/suite/operators/test_floor_divide.py @@ -7,6 +7,7 @@ # pyre-unsafe import torch +import unittest from executorch.backends.test.suite.flow import TestFlow from executorch.backends.test.suite.operators import ( @@ -178,6 +179,7 @@ def test_floor_divide_values(self, flow: TestFlow) -> None: y = torch.tensor([-2.0]).expand_as(x).clone() self._test_op(model, (x, y), flow, generate_random_test_inputs=False) + @unittest.skip("NaN and Inf are not enforced for backends.") def test_floor_divide_edge_cases(self, flow: TestFlow) -> None: # Test edge cases model = FloorDivideModel() diff --git a/backends/test/suite/operators/test_log.py b/backends/test/suite/operators/test_log.py index 96ba8da1292..783cae4bf37 100644 --- a/backends/test/suite/operators/test_log.py +++ b/backends/test/suite/operators/test_log.py @@ -8,6 +8,7 @@ import torch +import unittest from executorch.backends.test.suite.flow import TestFlow from executorch.backends.test.suite.operators import ( @@ -46,6 +47,7 @@ def test_log_shapes(self, flow: TestFlow) -> None: # 3D tensor self._test_op(LogModel(), (torch.rand(3, 4, 5) + 0.01,), flow) + @unittest.skip("NaN and Inf are not enforced for backends.") def test_log_edge_cases(self, flow: TestFlow) -> None: # Test edge cases # Tensor with infinity diff --git a/backends/test/suite/operators/test_log10.py b/backends/test/suite/operators/test_log10.py index 7d0e2e111d6..fcbbb7d69a9 100644 --- a/backends/test/suite/operators/test_log10.py +++ b/backends/test/suite/operators/test_log10.py @@ -8,6 +8,7 @@ import torch +import unittest from executorch.backends.test.suite.flow import TestFlow from executorch.backends.test.suite.operators import ( @@ -46,6 +47,7 @@ def test_log10_shapes(self, flow: TestFlow) -> None: # 3D tensor self._test_op(Log10Model(), (torch.rand(3, 4, 5) + 0.01,), flow) + @unittest.skip("NaN and Inf are not enforced for backends.") def test_log10_edge_cases(self, flow: TestFlow) -> None: # Test edge cases # Tensor with infinity diff --git a/backends/test/suite/operators/test_log1p.py b/backends/test/suite/operators/test_log1p.py index 383e3116b32..2a00202097a 100644 --- a/backends/test/suite/operators/test_log1p.py +++ b/backends/test/suite/operators/test_log1p.py @@ -8,6 +8,7 @@ import torch +import unittest from executorch.backends.test.suite.flow import TestFlow from executorch.backends.test.suite.operators import ( @@ -46,6 +47,7 @@ def test_log1p_shapes(self, flow: TestFlow) -> None: # 3D tensor self._test_op(Log1pModel(), (torch.rand(3, 4, 5) * 2 - 0.5,), flow) + @unittest.skip("NaN and Inf are not enforced for backends.") def test_log1p_edge_cases(self, flow: TestFlow) -> None: # Test edge cases # Tensor with infinity diff --git a/backends/test/suite/operators/test_log2.py b/backends/test/suite/operators/test_log2.py index ddcafaf08d2..36acee8edf2 100644 --- a/backends/test/suite/operators/test_log2.py +++ b/backends/test/suite/operators/test_log2.py @@ -8,6 +8,7 @@ import torch +import unittest from executorch.backends.test.suite.flow import TestFlow from executorch.backends.test.suite.operators import ( @@ -46,6 +47,7 @@ def test_log2_shapes(self, flow: TestFlow) -> None: # 3D tensor self._test_op(Log2Model(), (torch.rand(3, 4, 5) + 0.01,), flow) + @unittest.skip("NaN and Inf are not enforced for backends.") def test_log2_edge_cases(self, flow: TestFlow) -> None: # Test edge cases # Tensor with infinity diff --git a/backends/test/suite/operators/test_mean.py b/backends/test/suite/operators/test_mean.py index 746a4b16d9f..b53144ed18a 100644 --- a/backends/test/suite/operators/test_mean.py +++ b/backends/test/suite/operators/test_mean.py @@ -9,6 +9,7 @@ from typing import List, Optional, Tuple, Union import torch +import unittest from executorch.backends.test.suite.flow import TestFlow from executorch.backends.test.suite.operators import ( @@ -229,6 +230,7 @@ def test_mean_shapes(self, flow: TestFlow) -> None: flow, ) + @unittest.skip("NaN and Inf are not enforced for backends.") def test_mean_edge_cases(self, flow: TestFlow) -> None: x = torch.tensor([[1.0, float("inf"), 3.0], [4.0, 5.0, float("inf")]]) self._test_op( diff --git a/backends/test/suite/operators/test_median.py b/backends/test/suite/operators/test_median.py index 93823b812ca..89d1fdb0069 100644 --- a/backends/test/suite/operators/test_median.py +++ b/backends/test/suite/operators/test_median.py @@ -9,6 +9,7 @@ from typing import Optional import torch +import unittest from executorch.backends.test.suite.flow import TestFlow from executorch.backends.test.suite.operators import ( @@ -167,6 +168,7 @@ def test_median_shapes(self, flow: TestFlow) -> None: # 5D tensor self._test_op(MedianValueOnlyModel(), (torch.randn(2, 2, 3, 4, 5),), flow) + @unittest.skip("NaN and Inf are not enforced for backends.") def test_median_edge_cases(self, flow: TestFlow) -> None: # Tensor with NaN (NaN should be propagated) x = torch.tensor([[1.0, float("nan"), 3.0], [4.0, 5.0, float("nan")]]) diff --git a/backends/test/suite/operators/test_neg.py b/backends/test/suite/operators/test_neg.py index 35c9d851817..a2b4cf942f8 100644 --- a/backends/test/suite/operators/test_neg.py +++ b/backends/test/suite/operators/test_neg.py @@ -7,6 +7,7 @@ # pyre-unsafe import torch +import unittest from executorch.backends.test.suite.flow import TestFlow from executorch.backends.test.suite.operators import ( @@ -55,6 +56,7 @@ def test_neg_shapes(self, flow: TestFlow) -> None: NegModel(), (torch.randn(3, 4, 5),), flow, generate_random_test_inputs=False ) + @unittest.skip("NaN and Inf are not enforced for backends.") def test_neg_edge_cases(self, flow: TestFlow) -> None: # Test edge cases diff --git a/backends/test/suite/operators/test_pow.py b/backends/test/suite/operators/test_pow.py index 334038d73d3..b613683372e 100644 --- a/backends/test/suite/operators/test_pow.py +++ b/backends/test/suite/operators/test_pow.py @@ -7,6 +7,7 @@ # pyre-unsafe import torch +import unittest from executorch.backends.test.suite.flow import TestFlow from executorch.backends.test.suite.operators import ( @@ -127,6 +128,7 @@ def test_pow_shapes(self, flow: TestFlow) -> None: model, (torch.rand(3, 4, 5) + 0.1,), flow, generate_random_test_inputs=False ) + @unittest.skip("NaN and Inf are not enforced for backends.") def test_pow_edge_cases(self, flow: TestFlow) -> None: # Test edge cases diff --git a/backends/test/suite/operators/test_round.py b/backends/test/suite/operators/test_round.py index ca8e6368d48..1794da838f9 100644 --- a/backends/test/suite/operators/test_round.py +++ b/backends/test/suite/operators/test_round.py @@ -7,6 +7,7 @@ # pyre-unsafe import torch +import unittest from executorch.backends.test.suite.flow import TestFlow from executorch.backends.test.suite.operators import ( @@ -52,6 +53,7 @@ def test_round_values(self, flow: TestFlow) -> None: x = torch.arange(-5, 5, 0.5) # [-5.0, -4.5, -4.0, ..., 4.0, 4.5] self._test_op(RoundModel(), (x,), flow, generate_random_test_inputs=False) + @unittest.skip("NaN and Inf are not enforced for backends.") def test_round_edge_cases(self, flow: TestFlow) -> None: # Test edge cases @@ -98,6 +100,7 @@ def test_round_decimals(self, flow: TestFlow) -> None: RoundModel(decimals=-2), (x,), flow, generate_random_test_inputs=False ) + @unittest.skip("NaN and Inf are not enforced for backends.") def test_round_decimals_edge_cases(self, flow: TestFlow) -> None: # Test edge cases with decimal places diff --git a/backends/test/suite/operators/test_rsqrt.py b/backends/test/suite/operators/test_rsqrt.py index 175bbcdb2cc..cd4d5db89f5 100644 --- a/backends/test/suite/operators/test_rsqrt.py +++ b/backends/test/suite/operators/test_rsqrt.py @@ -7,6 +7,7 @@ # pyre-unsafe import torch +import unittest from executorch.backends.test.suite.flow import TestFlow from executorch.backends.test.suite.operators import ( @@ -45,6 +46,7 @@ def test_rsqrt_shapes(self, flow: TestFlow) -> None: # 3D tensor self._test_op(RsqrtModel(), (torch.rand(3, 4, 5) + 0.01,), flow) + @unittest.skip("NaN and Inf are not enforced for backends.") def test_rsqrt_edge_cases(self, flow: TestFlow) -> None: # Tensor with infinity x = torch.tensor([float("inf"), 1.0, 4.0]) diff --git a/backends/test/suite/operators/test_sqrt.py b/backends/test/suite/operators/test_sqrt.py index c3874dcb209..0c8498981d8 100644 --- a/backends/test/suite/operators/test_sqrt.py +++ b/backends/test/suite/operators/test_sqrt.py @@ -7,6 +7,7 @@ # pyre-unsafe import torch +import unittest from executorch.backends.test.suite.flow import TestFlow from executorch.backends.test.suite.operators import ( @@ -45,6 +46,7 @@ def test_sqrt_shapes(self, flow: TestFlow) -> None: # 3D tensor self._test_op(SqrtModel(), (torch.rand(3, 4, 5),), flow) + @unittest.skip("NaN and Inf are not enforced for backends.") def test_sqrt_edge_cases(self, flow: TestFlow) -> None: # Test edge cases diff --git a/backends/test/suite/operators/test_square.py b/backends/test/suite/operators/test_square.py index 52cd739bf9f..489b48520d5 100644 --- a/backends/test/suite/operators/test_square.py +++ b/backends/test/suite/operators/test_square.py @@ -7,6 +7,7 @@ # pyre-unsafe import torch +import unittest from executorch.backends.test.suite.flow import TestFlow from executorch.backends.test.suite.operators import ( @@ -44,6 +45,7 @@ def test_square_shapes(self, flow: TestFlow) -> None: # 3D tensor self._test_op(SquareModel(), (torch.randn(3, 4, 5),), flow) + @unittest.skip("NaN and Inf are not enforced for backends.") def test_square_edge_cases(self, flow: TestFlow) -> None: # Test edge cases diff --git a/backends/test/suite/operators/test_trunc.py b/backends/test/suite/operators/test_trunc.py index 1d6d18817bd..d864bad6f68 100644 --- a/backends/test/suite/operators/test_trunc.py +++ b/backends/test/suite/operators/test_trunc.py @@ -7,6 +7,7 @@ # pyre-unsafe import torch +import unittest from executorch.backends.test.suite.flow import TestFlow from executorch.backends.test.suite.operators import ( @@ -44,6 +45,7 @@ def test_trunc_shapes(self, flow: TestFlow) -> None: # 3D tensor self._test_op(TruncModel(), (torch.randn(3, 4, 5) * 5,), flow) + @unittest.skip("NaN and Inf are not enforced for backends.") def test_trunc_edge_cases(self, flow: TestFlow) -> None: # Test edge cases From 774f59ff7d6614fe1f97ad9b4b83fcc6bea91475 Mon Sep 17 00:00:00 2001 From: Gregory James Comer Date: Thu, 4 Sep 2025 23:27:31 -0700 Subject: [PATCH 4/9] Update [ghstack-poisoned] --- backends/test/suite/reporting.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/backends/test/suite/reporting.py b/backends/test/suite/reporting.py index ce8a48dcc12..cdf2ce870e1 100644 --- a/backends/test/suite/reporting.py +++ b/backends/test/suite/reporting.py @@ -45,6 +45,8 @@ ] ) +CSV_FIELD_NAMES.append("Error") + # Operators that are excluded from the counts returned by count_ops. These are used to # exclude operatations that are not logically relevant or delegatable to backends. @@ -365,6 +367,15 @@ def write_csv_header(output: TextIO): def write_csv_row(record: TestCaseSummary, output: TextIO): writer = csv.DictWriter(output, CSV_FIELD_NAMES) + # Truncate error message if it's too long, keeping first and last 200 characters + error_message = "" + if record.error is not None: + error_str = str(record.error) + if len(error_str) > 400: + error_message = error_str[:200] + "..." + error_str[-200:] + else: + error_message = error_str + row = { "Test ID": record.name, "Test Case": record.base_name, @@ -373,6 +384,7 @@ def write_csv_row(record: TestCaseSummary, output: TextIO): "Params": _serialize_params(record.params), "Result": record.result.to_short_str(), "Result Detail": record.result.to_detail_str(), + "Error": error_message, "Delegated": "True" if record.is_delegated() else "False", "Quantize Time (s)": ( f"{record.quantize_time.total_seconds():.3f}" From 51137cd007ac58ba36861fd3ae858b495778fd73 Mon Sep 17 00:00:00 2001 From: Gregory James Comer Date: Thu, 4 Sep 2025 23:59:07 -0700 Subject: [PATCH 5/9] Update [ghstack-poisoned] --- backends/test/suite/flow.py | 8 +++++++- backends/test/suite/flows/coreml.py | 1 + backends/test/suite/models/__init__.py | 3 +++ backends/test/suite/operators/__init__.py | 3 +++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/backends/test/suite/flow.py b/backends/test/suite/flow.py index b7a126eaf35..9df3805444a 100644 --- a/backends/test/suite/flow.py +++ b/backends/test/suite/flow.py @@ -1,6 +1,6 @@ import logging -from dataclasses import dataclass +from dataclasses import dataclass, field from typing import Callable from executorch.backends.test.harness import Tester @@ -35,6 +35,12 @@ class TestFlow: is_delegated: bool = True """ Indicates whether the flow is expected to generate CALL_DELEGATE nodes. """ + skip_patterns: list[str] = field(default_factory=lambda: []) + """ Tests with names containing any substrings in this list are skipped. """ + + def should_skip_test(self, test_name: str) -> bool: + return any(pattern in test_name for pattern in self.skip_patterns) + def all_flows() -> dict[str, TestFlow]: flows = [] diff --git a/backends/test/suite/flows/coreml.py b/backends/test/suite/flows/coreml.py index fd956b64f05..8a532ff0003 100644 --- a/backends/test/suite/flows/coreml.py +++ b/backends/test/suite/flows/coreml.py @@ -19,6 +19,7 @@ def _create_coreml_flow( CoreMLTester, minimum_deployment_target=minimum_deployment_target ), quantize=quantize, + skip_patterns=["test_argmin", "test_argmax"], ) diff --git a/backends/test/suite/models/__init__.py b/backends/test/suite/models/__init__.py index 65b546b0eb5..a6775dd8246 100644 --- a/backends/test/suite/models/__init__.py +++ b/backends/test/suite/models/__init__.py @@ -52,6 +52,9 @@ def wrapped_test(self): "use_dynamic_shapes": use_dynamic_shapes, } with TestContext(test_name, test_func.__name__, flow.name, params): + if flow.should_skip_test(test_name): + raise unittest.SkipTest(f"Skipping test due to matching flow {flow.name} skip patterns") + test_func(self, flow, dtype, use_dynamic_shapes) wrapped_test._name = test_func.__name__ # type: ignore diff --git a/backends/test/suite/operators/__init__.py b/backends/test/suite/operators/__init__.py index 6ceb9086f71..464eb1aaf55 100644 --- a/backends/test/suite/operators/__init__.py +++ b/backends/test/suite/operators/__init__.py @@ -97,6 +97,9 @@ def _make_wrapped_test( ): def wrapped_test(self): with TestContext(test_name, test_base_name, flow.name, params): + if flow.should_skip_test(test_name): + raise unittest.SkipTest(f"Skipping test due to matching flow {flow.name} skip patterns") + test_kwargs = copy.copy(params) or {} test_kwargs["flow"] = flow From 4410ca125a8b7850c36140eeba305267016b8022 Mon Sep 17 00:00:00 2001 From: Gregory James Comer Date: Fri, 5 Sep 2025 00:35:52 -0700 Subject: [PATCH 6/9] Update [ghstack-poisoned] --- .../test/suite/generate_markdown_summary.py | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/backends/test/suite/generate_markdown_summary.py b/backends/test/suite/generate_markdown_summary.py index 37bf758fed0..fac3c2471f6 100644 --- a/backends/test/suite/generate_markdown_summary.py +++ b/backends/test/suite/generate_markdown_summary.py @@ -12,6 +12,25 @@ # +def escape_for_markdown(text: str) -> str: + """ + Modify a string to properly display in a markdown table cell. + """ + if not text: + return text + + # Replace newlines with
tags + escaped = text.replace('\n', '
') + + # Escape backslashes. + escaped = escaped.replace('\\', '\\\\') + + # Escape pipe characters that would break table structure + escaped = escaped.replace('|', '\\|') + + return escaped + + def generate_markdown(csv_path: str, exit_code: int = 0): # noqa (C901) # Print warning if exit code is non-zero if exit_code != 0: @@ -46,7 +65,7 @@ def generate_markdown(csv_path: str, exit_code: int = 0): # noqa (C901) for row in data_rows: # Make a copy of the row to avoid modifying the original - processed_row = row.copy() + processed_row = [escape_for_markdown(cell) for cell in row] # Count results and collect failed tests if result_column_index is not None and result_column_index < len(row): @@ -96,7 +115,8 @@ def generate_markdown(csv_path: str, exit_code: int = 0): # noqa (C901) # Generate Failed Tests section print("# Failed Tests\n") if failed_tests: - print("| " + " | ".join(header) + " |") + escaped_header = [escape_for_markdown(col) for col in header] + print("| " + " | ".join(escaped_header) + " |") print("|" + "|".join(["---"] * len(header)) + "|") for row in failed_tests: print("| " + " | ".join(row) + " |") From db1e1765dd0fa9bb87bbe3ef2f388f7f61b2e66e Mon Sep 17 00:00:00 2001 From: Gregory James Comer Date: Tue, 9 Sep 2025 17:28:51 -0700 Subject: [PATCH 7/9] Update [ghstack-poisoned] --- .github/workflows/_test_backend.yml | 63 ++++++++++++++++++++++ .github/workflows/nightly.yml | 48 ----------------- .github/workflows/test-backend-coreml.yml | 28 ++++++++++ .github/workflows/test-backend-qnn.yml | 28 ++++++++++ .github/workflows/test-backend-vulkan.yml | 28 ++++++++++ .github/workflows/test-backend-xnnpack.yml | 28 ++++++++++ 6 files changed, 175 insertions(+), 48 deletions(-) create mode 100644 .github/workflows/_test_backend.yml create mode 100644 .github/workflows/test-backend-coreml.yml create mode 100644 .github/workflows/test-backend-qnn.yml create mode 100644 .github/workflows/test-backend-vulkan.yml create mode 100644 .github/workflows/test-backend-xnnpack.yml diff --git a/.github/workflows/_test_backend.yml b/.github/workflows/_test_backend.yml new file mode 100644 index 00000000000..4a52cedcc84 --- /dev/null +++ b/.github/workflows/_test_backend.yml @@ -0,0 +1,63 @@ +name: Test Backend + +on: + workflow_call: + inputs: + backend: + description: 'Backend to test (xnnpack, coreml, vulkan, qnn)' + required: true + type: string + flows: + description: 'JSON array of flows to test' + required: true + type: string + runner: + description: 'Runner to use' + required: true + type: string + docker-image: + description: 'Docker image to use (Linux only)' + required: false + type: string + python-version: + description: 'Python version to use (macOS only)' + required: false + type: string + ref: + description: 'Git ref to checkout' + required: false + type: string + default: ${{ github.sha }} + timeout: + description: 'Job timeout in minutes' + required: false + type: number + default: 120 + +jobs: + test-backend: + strategy: + fail-fast: false + matrix: + flow: ${{ fromJSON(inputs.flows) }} + suite: [models, operators] + + uses: ${{ contains(inputs.runner, 'macos') && 'pytorch/test-infra/.github/workflows/macos_job.yml@main' || 'pytorch/test-infra/.github/workflows/linux_job_v2.yml@main' }} + permissions: + id-token: write + contents: read + with: + ref: ${{ inputs.ref }} + runner: ${{ inputs.runner }} + docker-image: ${{ inputs.docker-image }} + python-version: ${{ inputs.python-version }} + submodules: recursive + timeout: ${{ inputs.timeout }} + upload-artifact: test-report-${{ matrix.flow }}-${{ matrix.suite }} + script: | + set -eux + + ${{ contains(inputs.runner, 'macos') && '# This is needed to get the prebuilt PyTorch wheel from S3 + ${CONDA_RUN} --no-capture-output pip install awscli==1.37.21 + + source .ci/scripts/test_backend_macos.sh "${{ matrix.suite }}" "${{ matrix.flow }}" "${RUNNER_ARTIFACT_DIR}"' || 'source .ci/scripts/test_backend_linux.sh "${{ matrix.suite }}" "${{ matrix.flow }}" "${RUNNER_ARTIFACT_DIR}"' }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index c220b371c0a..4658fdc0d26 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -36,51 +36,3 @@ jobs: uses: ./.github/workflows/_link_check.yml with: ref: ${{ github.sha }} - - backend-test-linux: - uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main - strategy: - fail-fast: false - matrix: - flow: [ - qnn, qnn_16a16w, qnn_16a8w, qnn_16a4w, qnn_16a4w_block, qnn_8a8w, - vulkan, vulkan_static_int8_per_channel, - xnnpack, xnnpack_dynamic_int8_per_channel, xnnpack_static_int8_per_channel, xnnpack_static_int8_per_tensor - ] - suite: [models, operators] - with: - ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} - runner: linux.4xlarge.memory - docker-image: ci-image:executorch-ubuntu-22.04-clang12 - submodules: recursive - timeout: 120 - upload-artifact: test-report-${{ matrix.flow }}-${{ matrix.suite }} - script: | - set -eux - - source .ci/scripts/test_backend_linux.sh "${{ matrix.suite }}" "${{ matrix.flow }}" "${RUNNER_ARTIFACT_DIR}" - - backend-test-macos: - uses: pytorch/test-infra/.github/workflows/macos_job.yml@main - permissions: - id-token: write - contents: read - strategy: - fail-fast: false - matrix: - flow: [coreml, coreml_static_int8] - suite: [models, operators] - with: - ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} - runner: macos-m1-stable - python-version: 3.12 - submodules: recursive - timeout: 120 - upload-artifact: test-report-${{ matrix.flow }}-${{ matrix.suite }} - script: | - set -eux - - # This is needed to get the prebuilt PyTorch wheel from S3 - ${CONDA_RUN} --no-capture-output pip install awscli==1.37.21 - - source .ci/scripts/test_backend_macos.sh "${{ matrix.suite }}" "${{ matrix.flow }}" "${RUNNER_ARTIFACT_DIR}" diff --git a/.github/workflows/test-backend-coreml.yml b/.github/workflows/test-backend-coreml.yml new file mode 100644 index 00000000000..4aa90eabfe9 --- /dev/null +++ b/.github/workflows/test-backend-coreml.yml @@ -0,0 +1,28 @@ +name: Test CoreML Backend + +on: + schedule: + - cron: 0 2 * * * + push: + tags: + - ciflow/nightly/* + pull_request: + paths: + - .github/workflows/test-backend-coreml.yml + - .github/workflows/_test_backend.yml + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}--${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }} + cancel-in-progress: true + +jobs: + test-coreml: + uses: ./.github/workflows/_test_backend.yml + with: + backend: coreml + flows: '["coreml", "coreml_static_int8"]' + runner: macos-m1-stable + python-version: "3.12" + ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} + timeout: 120 diff --git a/.github/workflows/test-backend-qnn.yml b/.github/workflows/test-backend-qnn.yml new file mode 100644 index 00000000000..a100b1398fc --- /dev/null +++ b/.github/workflows/test-backend-qnn.yml @@ -0,0 +1,28 @@ +name: Test QNN Backend + +on: + schedule: + - cron: 0 2 * * * + push: + tags: + - ciflow/nightly/* + pull_request: + paths: + - .github/workflows/test-backend-qnn.yml + - .github/workflows/_test_backend.yml + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}--${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }} + cancel-in-progress: true + +jobs: + test-qnn: + uses: ./.github/workflows/_test_backend.yml + with: + backend: qnn + flows: '["qnn", "qnn_16a16w", "qnn_16a8w", "qnn_16a4w", "qnn_16a4w_block", "qnn_8a8w"]' + runner: linux.4xlarge.memory + docker-image: ci-image:executorch-ubuntu-22.04-clang12 + ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} + timeout: 120 diff --git a/.github/workflows/test-backend-vulkan.yml b/.github/workflows/test-backend-vulkan.yml new file mode 100644 index 00000000000..9ecb9e827ee --- /dev/null +++ b/.github/workflows/test-backend-vulkan.yml @@ -0,0 +1,28 @@ +name: Test Vulkan Backend + +on: + schedule: + - cron: 0 2 * * * + push: + tags: + - ciflow/nightly/* + pull_request: + paths: + - .github/workflows/test-backend-vulkan.yml + - .github/workflows/_test_backend.yml + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}--${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }} + cancel-in-progress: true + +jobs: + test-vulkan: + uses: ./.github/workflows/_test_backend.yml + with: + backend: vulkan + flows: '["vulkan", "vulkan_static_int8_per_channel"]' + runner: linux.4xlarge.memory + docker-image: ci-image:executorch-ubuntu-22.04-clang12 + ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} + timeout: 120 diff --git a/.github/workflows/test-backend-xnnpack.yml b/.github/workflows/test-backend-xnnpack.yml new file mode 100644 index 00000000000..da8e277f8d5 --- /dev/null +++ b/.github/workflows/test-backend-xnnpack.yml @@ -0,0 +1,28 @@ +name: Test XNNPACK Backend + +on: + schedule: + - cron: 0 2 * * * + push: + tags: + - ciflow/nightly/* + pull_request: + paths: + - .github/workflows/test-backend-xnnpack.yml + - .github/workflows/_test_backend.yml + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}--${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }} + cancel-in-progress: true + +jobs: + test-xnnpack: + uses: ./.github/workflows/_test_backend.yml + with: + backend: xnnpack + flows: '["xnnpack", "xnnpack_dynamic_int8_per_channel", "xnnpack_static_int8_per_channel", "xnnpack_static_int8_per_tensor"]' + runner: linux.4xlarge.memory + docker-image: ci-image:executorch-ubuntu-22.04-clang12 + ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} + timeout: 120 From 1d00f658fea77b537d12ac4fc3e619a17aa3c9d2 Mon Sep 17 00:00:00 2001 From: Gregory James Comer Date: Tue, 9 Sep 2025 17:37:41 -0700 Subject: [PATCH 8/9] Update [ghstack-poisoned] --- .github/workflows/_test_backend.yml | 60 +++++++++++++++------- .github/workflows/test-backend-coreml.yml | 3 +- .github/workflows/test-backend-qnn.yml | 3 +- .github/workflows/test-backend-vulkan.yml | 3 +- .github/workflows/test-backend-xnnpack.yml | 3 +- 5 files changed, 45 insertions(+), 27 deletions(-) diff --git a/.github/workflows/_test_backend.yml b/.github/workflows/_test_backend.yml index 4a52cedcc84..b1c8370bc24 100644 --- a/.github/workflows/_test_backend.yml +++ b/.github/workflows/_test_backend.yml @@ -11,18 +11,6 @@ on: description: 'JSON array of flows to test' required: true type: string - runner: - description: 'Runner to use' - required: true - type: string - docker-image: - description: 'Docker image to use (Linux only)' - required: false - type: string - python-version: - description: 'Python version to use (macOS only)' - required: false - type: string ref: description: 'Git ref to checkout' required: false @@ -33,31 +21,65 @@ on: required: false type: number default: 120 + run-linux: + description: 'Whether to run Linux tests' + required: false + type: boolean + default: false + run-macos: + description: 'Whether to run macOS tests' + required: false + type: boolean + default: false jobs: - test-backend: + test-backend-linux: + if: ${{ inputs.run-linux }} + strategy: + fail-fast: false + matrix: + flow: ${{ fromJSON(inputs.flows) }} + suite: [models, operators] + + uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main + permissions: + id-token: write + contents: read + with: + ref: ${{ inputs.ref }} + runner: linux.4xlarge.memory + docker-image: ci-image:executorch-ubuntu-22.04-clang12 + submodules: recursive + timeout: ${{ inputs.timeout }} + upload-artifact: test-report-${{ matrix.flow }}-${{ matrix.suite }} + script: | + set -eux + + source .ci/scripts/test_backend_linux.sh "${{ matrix.suite }}" "${{ matrix.flow }}" "${RUNNER_ARTIFACT_DIR}" + + test-backend-macos: + if: ${{ inputs.run-macos }} strategy: fail-fast: false matrix: flow: ${{ fromJSON(inputs.flows) }} suite: [models, operators] - uses: ${{ contains(inputs.runner, 'macos') && 'pytorch/test-infra/.github/workflows/macos_job.yml@main' || 'pytorch/test-infra/.github/workflows/linux_job_v2.yml@main' }} + uses: pytorch/test-infra/.github/workflows/macos_job.yml@main permissions: id-token: write contents: read with: ref: ${{ inputs.ref }} - runner: ${{ inputs.runner }} - docker-image: ${{ inputs.docker-image }} - python-version: ${{ inputs.python-version }} + runner: macos-m1-stable + python-version: "3.12" submodules: recursive timeout: ${{ inputs.timeout }} upload-artifact: test-report-${{ matrix.flow }}-${{ matrix.suite }} script: | set -eux - ${{ contains(inputs.runner, 'macos') && '# This is needed to get the prebuilt PyTorch wheel from S3 + # This is needed to get the prebuilt PyTorch wheel from S3 ${CONDA_RUN} --no-capture-output pip install awscli==1.37.21 - source .ci/scripts/test_backend_macos.sh "${{ matrix.suite }}" "${{ matrix.flow }}" "${RUNNER_ARTIFACT_DIR}"' || 'source .ci/scripts/test_backend_linux.sh "${{ matrix.suite }}" "${{ matrix.flow }}" "${RUNNER_ARTIFACT_DIR}"' }} + source .ci/scripts/test_backend_macos.sh "${{ matrix.suite }}" "${{ matrix.flow }}" "${RUNNER_ARTIFACT_DIR}" diff --git a/.github/workflows/test-backend-coreml.yml b/.github/workflows/test-backend-coreml.yml index 4aa90eabfe9..c6970ddff61 100644 --- a/.github/workflows/test-backend-coreml.yml +++ b/.github/workflows/test-backend-coreml.yml @@ -22,7 +22,6 @@ jobs: with: backend: coreml flows: '["coreml", "coreml_static_int8"]' - runner: macos-m1-stable - python-version: "3.12" ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} timeout: 120 + run-macos: true diff --git a/.github/workflows/test-backend-qnn.yml b/.github/workflows/test-backend-qnn.yml index a100b1398fc..64dc7cdce36 100644 --- a/.github/workflows/test-backend-qnn.yml +++ b/.github/workflows/test-backend-qnn.yml @@ -22,7 +22,6 @@ jobs: with: backend: qnn flows: '["qnn", "qnn_16a16w", "qnn_16a8w", "qnn_16a4w", "qnn_16a4w_block", "qnn_8a8w"]' - runner: linux.4xlarge.memory - docker-image: ci-image:executorch-ubuntu-22.04-clang12 ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} timeout: 120 + run-linux: true diff --git a/.github/workflows/test-backend-vulkan.yml b/.github/workflows/test-backend-vulkan.yml index 9ecb9e827ee..f04fdcdd1f1 100644 --- a/.github/workflows/test-backend-vulkan.yml +++ b/.github/workflows/test-backend-vulkan.yml @@ -22,7 +22,6 @@ jobs: with: backend: vulkan flows: '["vulkan", "vulkan_static_int8_per_channel"]' - runner: linux.4xlarge.memory - docker-image: ci-image:executorch-ubuntu-22.04-clang12 ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} timeout: 120 + run-linux: true diff --git a/.github/workflows/test-backend-xnnpack.yml b/.github/workflows/test-backend-xnnpack.yml index da8e277f8d5..2ae423dd99b 100644 --- a/.github/workflows/test-backend-xnnpack.yml +++ b/.github/workflows/test-backend-xnnpack.yml @@ -22,7 +22,6 @@ jobs: with: backend: xnnpack flows: '["xnnpack", "xnnpack_dynamic_int8_per_channel", "xnnpack_static_int8_per_channel", "xnnpack_static_int8_per_tensor"]' - runner: linux.4xlarge.memory - docker-image: ci-image:executorch-ubuntu-22.04-clang12 ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} timeout: 120 + run-linux: true From 311e536a86d29fca3d8482974e1e2d9bef0a1940 Mon Sep 17 00:00:00 2001 From: Gregory James Comer Date: Tue, 9 Sep 2025 17:45:50 -0700 Subject: [PATCH 9/9] Update [ghstack-poisoned] --- .github/workflows/_test_backend.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/_test_backend.yml b/.github/workflows/_test_backend.yml index b1c8370bc24..8b572825bdf 100644 --- a/.github/workflows/_test_backend.yml +++ b/.github/workflows/_test_backend.yml @@ -42,9 +42,6 @@ jobs: suite: [models, operators] uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main - permissions: - id-token: write - contents: read with: ref: ${{ inputs.ref }} runner: linux.4xlarge.memory @@ -66,9 +63,6 @@ jobs: suite: [models, operators] uses: pytorch/test-infra/.github/workflows/macos_job.yml@main - permissions: - id-token: write - contents: read with: ref: ${{ inputs.ref }} runner: macos-m1-stable