From 27239340b3193a860e5dfd6439b47c0be494cde1 Mon Sep 17 00:00:00 2001 From: Digant Desai Date: Tue, 3 Nov 2026 06:24:21 -0800 Subject: [PATCH] [executorch][test-suite] Feed the Linear tests inputs with the model's 67 input features Pull Request resolved: https://github.com/pytorch/executorch/pull/24355 Eight of the fourteen `test_linear.py` models were fed 64-feature inputs, but `Model` defaults to `in_features=67`, so eager rejected them and every backend skipped them. The dtype, no-bias, batch-size and leading-batch tests now pass 67-feature inputs. Authored with Claude Code. @bypass-github-export-checks @bypass-github-pytorch-ci-checks @bypass-github-executorch-ci-checks ghstack-source-id: 463657740 @exported-using-ghexport Differential Revision: [D128254891](https://our.internmc.facebook.com/intern/diff/D128254891/) --- backends/test/suite/operators/test_linear.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/backends/test/suite/operators/test_linear.py b/backends/test/suite/operators/test_linear.py index 30ae963a1ba..0dc4ef3fedb 100644 --- a/backends/test/suite/operators/test_linear.py +++ b/backends/test/suite/operators/test_linear.py @@ -41,7 +41,7 @@ class Linear(OperatorTest): def test_linear_dtype(self, flow: TestFlow, dtype) -> None: self._test_op( Model().to(dtype), - ((torch.rand(16, 64) * 10).to(dtype),), + ((torch.rand(16, 67) * 10).to(dtype),), flow, ) @@ -49,7 +49,7 @@ def test_linear_dtype(self, flow: TestFlow, dtype) -> None: def test_linear_no_bias_dtype(self, flow: TestFlow, dtype) -> None: self._test_op( Model(bias=False).to(dtype), - ((torch.rand(16, 64) * 10).to(dtype),), + ((torch.rand(16, 67) * 10).to(dtype),), flow, ) @@ -78,7 +78,7 @@ def test_linear_feature_sizes(self, flow: TestFlow) -> None: def test_linear_no_bias(self, flow: TestFlow) -> None: self._test_op( Model(bias=False), - (torch.randn(16, 64),), + (torch.randn(16, 67),), flow, ) self._test_op( @@ -90,17 +90,17 @@ def test_linear_no_bias(self, flow: TestFlow) -> None: def test_linear_batch_sizes(self, flow: TestFlow) -> None: self._test_op( Model(), - (torch.randn(8, 64),), + (torch.randn(8, 67),), flow, ) self._test_op( Model(), - (torch.randn(32, 64),), + (torch.randn(32, 67),), flow, ) self._test_op( Model(), - (torch.randn(100, 64),), + (torch.randn(100, 67),), flow, ) @@ -114,11 +114,11 @@ def test_linear_unbatched(self, flow: TestFlow) -> None: def test_linear_leading_batch(self, flow: TestFlow) -> None: self._test_op( Model(), - (torch.randn(4, 8, 64),), + (torch.randn(4, 8, 67),), flow, ) self._test_op( Model(), - (torch.randn(2, 4, 8, 64),), + (torch.randn(2, 4, 8, 67),), flow, )