From 0c1b2b773e6bb1014b5a570c9dff60847265c164 Mon Sep 17 00:00:00 2001 From: Christine Long Date: Sun, 17 May 2026 09:06:06 -0700 Subject: [PATCH 1/5] Add a16w8 per-op test for var (#19596) Summary: Add int16 activation / int8 weight (a16w8) quantization tests for `aten.var` on Ethos-U55 and Ethos-U85. ## Changes - Add `test_var_a16w8_u55_INT` using `EthosU55PipelineINT` with `a16w8_quantization=True, symmetric_io_quantization=True`, reusing existing `Var.test_parameters` (4 test configurations) - Add `test_var_a16w8_u85_INT` using `EthosU85PipelineINT` with same kwargs - Register `ops/test_var.py` in `fbcode/` and `xplat/` `targets.bzl` bypass-pytorch-oss-checks Differential Revision: D104532362 --- backends/arm/test/ops/test_var.py | 30 ++++++++++++++++++++++++++++++ backends/arm/test/targets.bzl | 1 + 2 files changed, 31 insertions(+) diff --git a/backends/arm/test/ops/test_var.py b/backends/arm/test/ops/test_var.py index a7943bfc19b..c65f4991ca3 100644 --- a/backends/arm/test/ops/test_var.py +++ b/backends/arm/test/ops/test_var.py @@ -224,6 +224,36 @@ def test_var_dim_vgf_quant_no_dim(test_data: Tuple): pipeline.run() +@common.parametrize("test_data", Var.test_parameters) +@common.XfailIfNoCorstone300 +def test_var_a16w8_u55_INT(test_data: Tuple): + test_data, keepdim, correction = test_data() + pipeline = EthosU55PipelineINT[input_t1]( + Var(keepdim, correction), + (test_data,), + aten_ops=[], + exir_ops=[], + a16w8_quantization=True, + symmetric_io_quantization=True, + ) + pipeline.run() + + +@common.parametrize("test_data", Var.test_parameters) +@common.XfailIfNoCorstone320 +def test_var_a16w8_u85_INT(test_data: Tuple): + test_data, keepdim, correction = test_data() + pipeline = EthosU85PipelineINT[input_t1]( + Var(keepdim, correction), + (test_data,), + aten_ops=[], + exir_ops=[], + a16w8_quantization=True, + symmetric_io_quantization=True, + ) + pipeline.run() + + ############# ## VarDim ### ############# diff --git a/backends/arm/test/targets.bzl b/backends/arm/test/targets.bzl index b8030ae7ba8..30fa348414f 100644 --- a/backends/arm/test/targets.bzl +++ b/backends/arm/test/targets.bzl @@ -39,6 +39,7 @@ def define_arm_tests(): "ops/test_exp.py", "ops/test_reciprocal.py", "ops/test_mean_dim.py", + "ops/test_var.py", ] # Quantization From 64cd4d2986ac191e8fe7c81cc7826ab56ed56a91 Mon Sep 17 00:00:00 2001 From: Christine Long Date: Sun, 17 May 2026 09:06:06 -0700 Subject: [PATCH 2/5] Add a16w8 per-op test for conv1d Summary: Add int16 activation / int8 weight (a16w8) quantization tests for `aten.conv1d` on Ethos-U55 and Ethos-U85. ## Changes - Add `test_conv1d_a16w8_u55_INT` using `EthosU55PipelineINT` with `a16w8_quantization=True, symmetric_io_quantization=True`, reusing existing `test_data_INT` parameters - Add `test_conv1d_a16w8_u85_INT` using `EthosU85PipelineINT` with same kwargs - Register `ops/test_conv1d.py` in `fbcode/` and `xplat/` `targets.bzl` Reviewed By: Ninja91 Differential Revision: D104532360 --- backends/arm/test/ops/test_conv1d.py | 31 ++++++++++++++++++++++++++++ backends/arm/test/targets.bzl | 1 + 2 files changed, 32 insertions(+) diff --git a/backends/arm/test/ops/test_conv1d.py b/backends/arm/test/ops/test_conv1d.py index 486b6b3ce7c..0e75eab621f 100644 --- a/backends/arm/test/ops/test_conv1d.py +++ b/backends/arm/test/ops/test_conv1d.py @@ -399,3 +399,34 @@ def test_convolution_1d_vgf_quant_a8w4(test_data): get_symmetric_a8w4_quantization_config(is_per_channel=per_channel_quantization) ) pipeline.run() + + +@common.parametrize("test_data", test_data_INT) +@common.XfailIfNoCorstone300 +def test_conv1d_a16w8_u55_INT(test_data): + model, per_channel_quantization = test_data() + pipeline = EthosU55PipelineINT[input_t]( + model, + model.get_inputs(), + aten_op, + exir_op, + a16w8_quantization=True, + symmetric_io_quantization=True, + per_channel_quantization=per_channel_quantization, + ) + pipeline.run() + +@common.parametrize("test_data", test_data_INT) +@common.XfailIfNoCorstone320 +def test_conv1d_a16w8_u85_INT(test_data): + model, per_channel_quantization = test_data() + pipeline = EthosU85PipelineINT[input_t]( + model, + model.get_inputs(), + aten_op, + exir_op, + a16w8_quantization=True, + symmetric_io_quantization=True, + per_channel_quantization=per_channel_quantization, + ) + pipeline.run() diff --git a/backends/arm/test/targets.bzl b/backends/arm/test/targets.bzl index 30fa348414f..1b2dfa8e2c6 100644 --- a/backends/arm/test/targets.bzl +++ b/backends/arm/test/targets.bzl @@ -40,6 +40,7 @@ def define_arm_tests(): "ops/test_reciprocal.py", "ops/test_mean_dim.py", "ops/test_var.py", + "ops/test_conv1d.py", ] # Quantization From 1e398d646fbee2eb717456d0b861f0d4919edeed Mon Sep 17 00:00:00 2001 From: christine-long-meta <163800716+christine-long-meta@users.noreply.github.com> Date: Mon, 18 May 2026 14:34:11 -0400 Subject: [PATCH 3/5] Delete backends/arm/test/ops/test_var.py Accidental change during merge conflict resolution --- backends/arm/test/ops/test_var.py | 438 ------------------------------ 1 file changed, 438 deletions(-) delete mode 100644 backends/arm/test/ops/test_var.py diff --git a/backends/arm/test/ops/test_var.py b/backends/arm/test/ops/test_var.py deleted file mode 100644 index 3413ca53f03..00000000000 --- a/backends/arm/test/ops/test_var.py +++ /dev/null @@ -1,438 +0,0 @@ -# Copyright 2024-2025 Arm Limited and/or its affiliates. -# -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. - - -from typing import Tuple - -import torch - -from executorch.backends.arm.test import common -from executorch.backends.arm.test.tester.test_pipeline import ( - EthosU55PipelineINT, - EthosU85PipelineINT, - TosaPipelineFP, - TosaPipelineINT, - VgfPipeline, -) - -input_t1 = Tuple[torch.Tensor] # Input x - - -class Var(torch.nn.Module): - test_parameters = { - "var_4d_keep_dim_0_correction": lambda: (torch.randn(1, 50, 10, 20), True, 0), - "var_3d_no_keep_dim_0_correction": lambda: (torch.rand(1, 50, 10), False, 0), - "var_4d_keep_dim_1_correction": lambda: (torch.randn(1, 30, 15, 20), True, 1), - "var_4d_no_keep_dim_0_5_correction": lambda: ( - torch.rand(1, 50, 10, 20), - False, - 0.5, - ), - } - - def __init__(self, keepdim: bool = True, correction: int = 0): - super().__init__() - self.keepdim = keepdim - self.correction = correction - - def forward( - self, - x: torch.Tensor, - ): - return x.var(keepdim=self.keepdim, correction=self.correction) - - -class VarDim(torch.nn.Module): - test_parameters = { - "var_4d_dim_1_keep_dim_unbiased": lambda: ( - torch.randn(1, 50, 10, 20), - 1, - True, - False, - ), - "var_3d_dim_neg_2_no_keep_dim_unbiased": lambda: ( - torch.rand(1, 50, 10), - -2, - False, - False, - ), - "var_3d_dim_neg_3_keep_dim_biased": lambda: ( - torch.randn(1, 30, 15, 20), - -3, - True, - True, - ), - "var_3d_dim_neg_1_no_keep_dim_biased": lambda: ( - torch.rand(1, 50, 10, 20), - -1, - False, - True, - ), - } - - test_parameters_u55 = { - "var_4d_dim_1_keep_dim_unbiased": lambda: ( - torch.randn(1, 50, 10, 20), - 1, - True, - False, - ), - "var_4d_dim_neg_3_keep_dim_biased": lambda: ( - torch.randn(1, 30, 15, 20), - -3, - True, - True, - ), - } - - def __init__(self, dim: int = -1, keepdim: bool = True, unbiased: bool = False): - super().__init__() - self.dim = dim - self.keepdim = keepdim - self.unbiased = unbiased - - def forward( - self, - x: torch.Tensor, - ): - return x.var(dim=self.dim, keepdim=self.keepdim, unbiased=self.unbiased) - - -class VarCorrection(torch.nn.Module): - test_parameters = { - "var_4d_dims_keep_dim_0_correction": lambda: ( - torch.randn(1, 50, 10, 20), - (-1, -2), - True, - 0, - ), - "var_3d_dims_keep_dim_0_correction": lambda: ( - torch.rand(1, 50, 10), - (-2), - True, - 0, - ), - "var_4d_dims_keep_dim_1_correction": lambda: ( - torch.randn(1, 30, 15, 20), - (-1, -2, -3), - True, - 1, - ), - "var_4d_dims_keep_dim_0_5_correction": lambda: ( - torch.rand(1, 50, 10, 20), - (-1, -2), - True, - 0.5, - ), - } - - def __init__(self, dim: int = -1, keepdim: bool = True, correction: bool = False): - super().__init__() - self.dim = dim - self.keepdim = keepdim - self.correction = correction - - def forward( - self, - x: torch.Tensor, - ): - return x.var(dim=self.dim, keepdim=self.keepdim, correction=self.correction) - - -# Var parameters that pass on Ethos-U hardware (keepdim=True only) -var_test_parameters_hw = { - "var_4d_keep_dim_0_correction": lambda: (torch.randn(1, 50, 10, 20), True, 0), - "var_4d_keep_dim_1_correction": lambda: (torch.randn(1, 30, 15, 20), True, 1), -} - -a16w8_var_test_parameters = { - "var_4d_keep_dim_0_correction": lambda: (torch.randn(1, 50, 10, 20), True, 0), - "var_4d_keep_dim_1_correction": lambda: (torch.randn(1, 30, 15, 20), True, 1), -} - - -########## -## Var ### -########## - - -@common.parametrize("test_data", Var.test_parameters) -def test_var_dim_tosa_FP_no_dim(test_data: Tuple): - test_data, keepdim, correction = test_data() - pipeline = TosaPipelineFP[input_t1]( - Var(keepdim, correction), - (test_data,), - aten_op=[], - exir_op=[], - ) - pipeline.run() - - -@common.parametrize("test_data", Var.test_parameters) -def test_var_dim_tosa_INT_no_dim(test_data: Tuple): - test_data, keepdim, correction = test_data() - pipeline = TosaPipelineINT[input_t1]( - Var(keepdim, correction), - (test_data,), - aten_op=[], - exir_op=[], - ) - pipeline.run() - - -@common.parametrize("test_data", var_test_parameters_hw) -@common.XfailIfNoCorstone300 -def test_var_dim_u55_INT_no_dim(test_data: Tuple): - test_data, keepdim, correction = test_data() - pipeline = EthosU55PipelineINT[input_t1]( - Var(keepdim, correction), - (test_data,), - aten_ops=[], - exir_ops=[], - ) - pipeline.run() - - -@common.parametrize("test_data", var_test_parameters_hw) -@common.XfailIfNoCorstone320 -def test_var_dim_u85_INT_no_dim(test_data: Tuple): - test_data, keepdim, correction = test_data() - pipeline = EthosU85PipelineINT[input_t1]( - Var(keepdim, correction), - (test_data,), - aten_ops=[], - exir_ops=[], - ) - pipeline.run() - - -@common.parametrize("test_data", Var.test_parameters) -@common.SkipIfNoModelConverter -def test_var_dim_vgf_no_quant_no_dim(test_data: Tuple): - data, keepdim, correction = test_data() - pipeline = VgfPipeline[input_t1]( - Var(keepdim, correction), - (data,), - [], - [], - quantize=False, - ) - pipeline.run() - - -@common.parametrize("test_data", Var.test_parameters) -@common.SkipIfNoModelConverter -def test_var_dim_vgf_quant_no_dim(test_data: Tuple): - data, keepdim, correction = test_data() - pipeline = VgfPipeline[input_t1]( - Var(keepdim, correction), - (data,), - [], - [], - quantize=True, - ) - pipeline.run() - - -@common.parametrize("test_data", Var.test_parameters) -@common.parametrize("test_data", a16w8_var_test_parameters) -@common.XfailIfNoCorstone300 -def test_var_a16w8_u55_INT(test_data: Tuple): - test_data, keepdim, correction = test_data() - pipeline = EthosU55PipelineINT[input_t1]( - Var(keepdim, correction), - (test_data,), - aten_ops=[], - exir_ops=[], - a16w8_quantization=True, - symmetric_io_quantization=True, - ) - pipeline.run() - - -@common.parametrize("test_data", Var.test_parameters) -@common.parametrize("test_data", a16w8_var_test_parameters) -@common.XfailIfNoCorstone320 -def test_var_a16w8_u85_INT(test_data: Tuple): - test_data, keepdim, correction = test_data() - pipeline = EthosU85PipelineINT[input_t1]( - Var(keepdim, correction), - (test_data,), - aten_ops=[], - exir_ops=[], - a16w8_quantization=True, - symmetric_io_quantization=True, - ) - pipeline.run() - - -############# -## VarDim ### -############# - - -@common.parametrize("test_data", VarDim.test_parameters) -def test_var_dim_tosa_FP(test_data: Tuple): - test_data, dim, keepdim, unbiased = test_data() - pipeline = TosaPipelineFP[input_t1]( - VarDim(dim, keepdim, unbiased), - (test_data,), - aten_op=[], - exir_op=[], - ) - pipeline.run() - - -@common.parametrize("test_data", VarDim.test_parameters) -def test_var_dim_tosa_INT(test_data: Tuple): - - test_data, dim, keepdim, unbiased = test_data() - pipeline = TosaPipelineINT[input_t1]( - VarDim(dim, keepdim, unbiased), - (test_data,), - aten_op=[], - exir_op=[], - ) - pipeline.run() - - -@common.parametrize("test_data", VarDim.test_parameters_u55) -@common.XfailIfNoCorstone300 -def test_var_dim_u55_INT(test_data: Tuple): - test_data, dim, keepdim, unbiased = test_data() - pipeline = EthosU55PipelineINT[input_t1]( - VarDim(dim, keepdim, unbiased), - (test_data,), - aten_ops=[], - exir_ops=[], - ) - pipeline.run() - - -@common.parametrize("test_data", VarDim.test_parameters) -@common.XfailIfNoCorstone320 -def test_var_dim_u85_INT(test_data: Tuple): - test_data, dim, keepdim, unbiased = test_data() - pipeline = EthosU85PipelineINT[input_t1]( - VarDim(dim, keepdim, unbiased), - (test_data,), - aten_ops=[], - exir_ops=[], - ) - pipeline.run() - - -@common.parametrize("test_data", VarDim.test_parameters) -@common.SkipIfNoModelConverter -def test_var_dim_vgf_no_quant(test_data: Tuple): - data, dim, keepdim, unbiased = test_data() - pipeline = VgfPipeline[input_t1]( - VarDim(dim, keepdim, unbiased), - (data,), - [], - [], - quantize=False, - ) - pipeline.run() - - -@common.parametrize("test_data", VarDim.test_parameters) -@common.SkipIfNoModelConverter -def test_var_dim_vgf_quant(test_data: Tuple): - data, dim, keepdim, unbiased = test_data() - pipeline = VgfPipeline[input_t1]( - VarDim(dim, keepdim, unbiased), - (data,), - [], - [], - quantize=True, - ) - pipeline.run() - - -#################### -## VarCorrection ### -#################### - - -@common.parametrize("test_data", VarCorrection.test_parameters) -def test_var_dim_tosa_FP_correction(test_data: Tuple): - test_data, dim, keepdim, correction = test_data() - pipeline = TosaPipelineFP[input_t1]( - VarCorrection(dim, keepdim, correction), - (test_data,), - aten_op=[], - exir_op=[], - ) - pipeline.run() - - -@common.parametrize("test_data", VarCorrection.test_parameters) -def test_var_dim_tosa_INT_correction(test_data: Tuple): - test_data, dim, keepdim, correction = test_data() - pipeline = TosaPipelineINT[input_t1]( - VarCorrection(dim, keepdim, correction), - (test_data,), - aten_op=[], - exir_op=[], - ) - pipeline.run() - - -@common.parametrize( - "test_data", - VarCorrection.test_parameters, -) -@common.XfailIfNoCorstone300 -def test_var_dim_u55_INT_correction(test_data: Tuple): - test_data, dim, keepdim, correction = test_data() - pipeline = EthosU55PipelineINT[input_t1]( - VarCorrection(dim, keepdim, correction), - (test_data,), - aten_ops=[], - exir_ops=[], - ) - pipeline.run() - - -@common.parametrize("test_data", VarCorrection.test_parameters) -@common.XfailIfNoCorstone320 -def test_var_dim_u85_INT_correction(test_data: Tuple): - test_data, dim, keepdim, correction = test_data() - pipeline = EthosU85PipelineINT[input_t1]( - VarCorrection(dim, keepdim, correction), - (test_data,), - aten_ops=[], - exir_ops=[], - ) - pipeline.run() - - -@common.parametrize("test_data", VarCorrection.test_parameters) -@common.SkipIfNoModelConverter -def test_var_dim_vgf_no_quant_correction(test_data: Tuple): - data, dim, keepdim, corr = test_data() - pipeline = VgfPipeline[input_t1]( - VarCorrection(dim, keepdim, corr), - (data,), - [], - [], - quantize=False, - ) - pipeline.run() - - -@common.parametrize("test_data", VarCorrection.test_parameters) -@common.SkipIfNoModelConverter -def test_var_dim_vgf_quant_correction(test_data: Tuple): - data, dim, keepdim, corr = test_data() - pipeline = VgfPipeline[input_t1]( - VarCorrection(dim, keepdim, corr), - (data,), - [], - [], - quantize=True, - ) - pipeline.run() From cd186ace8f3781d42639aee0499b29380f9cd1d6 Mon Sep 17 00:00:00 2001 From: christine-long-meta <163800716+christine-long-meta@users.noreply.github.com> Date: Mon, 18 May 2026 17:36:39 -0400 Subject: [PATCH 4/5] Add files via upload --- backends/arm/test/ops/test_var.py | 436 ++++++++++++++++++++++++++++++ 1 file changed, 436 insertions(+) create mode 100644 backends/arm/test/ops/test_var.py diff --git a/backends/arm/test/ops/test_var.py b/backends/arm/test/ops/test_var.py new file mode 100644 index 00000000000..35aa2857d3b --- /dev/null +++ b/backends/arm/test/ops/test_var.py @@ -0,0 +1,436 @@ +# Copyright 2024-2025 Arm Limited and/or its affiliates. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + + +from typing import Tuple + +import torch + +from executorch.backends.arm.test import common +from executorch.backends.arm.test.tester.test_pipeline import ( + EthosU55PipelineINT, + EthosU85PipelineINT, + TosaPipelineFP, + TosaPipelineINT, + VgfPipeline, +) + +input_t1 = Tuple[torch.Tensor] # Input x + + +class Var(torch.nn.Module): + test_parameters = { + "var_4d_keep_dim_0_correction": lambda: (torch.randn(1, 50, 10, 20), True, 0), + "var_3d_no_keep_dim_0_correction": lambda: (torch.rand(1, 50, 10), False, 0), + "var_4d_keep_dim_1_correction": lambda: (torch.randn(1, 30, 15, 20), True, 1), + "var_4d_no_keep_dim_0_5_correction": lambda: ( + torch.rand(1, 50, 10, 20), + False, + 0.5, + ), + } + + def __init__(self, keepdim: bool = True, correction: int = 0): + super().__init__() + self.keepdim = keepdim + self.correction = correction + + def forward( + self, + x: torch.Tensor, + ): + return x.var(keepdim=self.keepdim, correction=self.correction) + + +class VarDim(torch.nn.Module): + test_parameters = { + "var_4d_dim_1_keep_dim_unbiased": lambda: ( + torch.randn(1, 50, 10, 20), + 1, + True, + False, + ), + "var_3d_dim_neg_2_no_keep_dim_unbiased": lambda: ( + torch.rand(1, 50, 10), + -2, + False, + False, + ), + "var_3d_dim_neg_3_keep_dim_biased": lambda: ( + torch.randn(1, 30, 15, 20), + -3, + True, + True, + ), + "var_3d_dim_neg_1_no_keep_dim_biased": lambda: ( + torch.rand(1, 50, 10, 20), + -1, + False, + True, + ), + } + + test_parameters_u55 = { + "var_4d_dim_1_keep_dim_unbiased": lambda: ( + torch.randn(1, 50, 10, 20), + 1, + True, + False, + ), + "var_4d_dim_neg_3_keep_dim_biased": lambda: ( + torch.randn(1, 30, 15, 20), + -3, + True, + True, + ), + } + + def __init__(self, dim: int = -1, keepdim: bool = True, unbiased: bool = False): + super().__init__() + self.dim = dim + self.keepdim = keepdim + self.unbiased = unbiased + + def forward( + self, + x: torch.Tensor, + ): + return x.var(dim=self.dim, keepdim=self.keepdim, unbiased=self.unbiased) + + +class VarCorrection(torch.nn.Module): + test_parameters = { + "var_4d_dims_keep_dim_0_correction": lambda: ( + torch.randn(1, 50, 10, 20), + (-1, -2), + True, + 0, + ), + "var_3d_dims_keep_dim_0_correction": lambda: ( + torch.rand(1, 50, 10), + (-2), + True, + 0, + ), + "var_4d_dims_keep_dim_1_correction": lambda: ( + torch.randn(1, 30, 15, 20), + (-1, -2, -3), + True, + 1, + ), + "var_4d_dims_keep_dim_0_5_correction": lambda: ( + torch.rand(1, 50, 10, 20), + (-1, -2), + True, + 0.5, + ), + } + + def __init__(self, dim: int = -1, keepdim: bool = True, correction: bool = False): + super().__init__() + self.dim = dim + self.keepdim = keepdim + self.correction = correction + + def forward( + self, + x: torch.Tensor, + ): + return x.var(dim=self.dim, keepdim=self.keepdim, correction=self.correction) + + +# Var parameters that pass on Ethos-U hardware (keepdim=True only) +var_test_parameters_hw = { + "var_4d_keep_dim_0_correction": lambda: (torch.randn(1, 50, 10, 20), True, 0), + "var_4d_keep_dim_1_correction": lambda: (torch.randn(1, 30, 15, 20), True, 1), +} + +a16w8_var_test_parameters = { + "var_4d_keep_dim_0_correction": lambda: (torch.randn(1, 50, 10, 20), True, 0), + "var_4d_keep_dim_1_correction": lambda: (torch.randn(1, 30, 15, 20), True, 1), +} + + +########## +## Var ### +########## + + +@common.parametrize("test_data", Var.test_parameters) +def test_var_dim_tosa_FP_no_dim(test_data: Tuple): + test_data, keepdim, correction = test_data() + pipeline = TosaPipelineFP[input_t1]( + Var(keepdim, correction), + (test_data,), + aten_op=[], + exir_op=[], + ) + pipeline.run() + + +@common.parametrize("test_data", Var.test_parameters) +def test_var_dim_tosa_INT_no_dim(test_data: Tuple): + test_data, keepdim, correction = test_data() + pipeline = TosaPipelineINT[input_t1]( + Var(keepdim, correction), + (test_data,), + aten_op=[], + exir_op=[], + ) + pipeline.run() + + +@common.parametrize("test_data", var_test_parameters_hw) +@common.XfailIfNoCorstone300 +def test_var_dim_u55_INT_no_dim(test_data: Tuple): + test_data, keepdim, correction = test_data() + pipeline = EthosU55PipelineINT[input_t1]( + Var(keepdim, correction), + (test_data,), + aten_ops=[], + exir_ops=[], + ) + pipeline.run() + + +@common.parametrize("test_data", var_test_parameters_hw) +@common.XfailIfNoCorstone320 +def test_var_dim_u85_INT_no_dim(test_data: Tuple): + test_data, keepdim, correction = test_data() + pipeline = EthosU85PipelineINT[input_t1]( + Var(keepdim, correction), + (test_data,), + aten_ops=[], + exir_ops=[], + ) + pipeline.run() + + +@common.parametrize("test_data", Var.test_parameters) +@common.SkipIfNoModelConverter +def test_var_dim_vgf_no_quant_no_dim(test_data: Tuple): + data, keepdim, correction = test_data() + pipeline = VgfPipeline[input_t1]( + Var(keepdim, correction), + (data,), + [], + [], + quantize=False, + ) + pipeline.run() + + +@common.parametrize("test_data", Var.test_parameters) +@common.SkipIfNoModelConverter +def test_var_dim_vgf_quant_no_dim(test_data: Tuple): + data, keepdim, correction = test_data() + pipeline = VgfPipeline[input_t1]( + Var(keepdim, correction), + (data,), + [], + [], + quantize=True, + ) + pipeline.run() + + +@common.parametrize("test_data", a16w8_var_test_parameters) +@common.XfailIfNoCorstone300 +def test_var_a16w8_u55_INT(test_data: Tuple): + test_data, keepdim, correction = test_data() + pipeline = EthosU55PipelineINT[input_t1]( + Var(keepdim, correction), + (test_data,), + aten_ops=[], + exir_ops=[], + a16w8_quantization=True, + symmetric_io_quantization=True, + ) + pipeline.run() + + +@common.parametrize("test_data", a16w8_var_test_parameters) +@common.XfailIfNoCorstone320 +def test_var_a16w8_u85_INT(test_data: Tuple): + test_data, keepdim, correction = test_data() + pipeline = EthosU85PipelineINT[input_t1]( + Var(keepdim, correction), + (test_data,), + aten_ops=[], + exir_ops=[], + a16w8_quantization=True, + symmetric_io_quantization=True, + ) + pipeline.run() + + +############# +## VarDim ### +############# + + +@common.parametrize("test_data", VarDim.test_parameters) +def test_var_dim_tosa_FP(test_data: Tuple): + test_data, dim, keepdim, unbiased = test_data() + pipeline = TosaPipelineFP[input_t1]( + VarDim(dim, keepdim, unbiased), + (test_data,), + aten_op=[], + exir_op=[], + ) + pipeline.run() + + +@common.parametrize("test_data", VarDim.test_parameters) +def test_var_dim_tosa_INT(test_data: Tuple): + + test_data, dim, keepdim, unbiased = test_data() + pipeline = TosaPipelineINT[input_t1]( + VarDim(dim, keepdim, unbiased), + (test_data,), + aten_op=[], + exir_op=[], + ) + pipeline.run() + + +@common.parametrize("test_data", VarDim.test_parameters_u55) +@common.XfailIfNoCorstone300 +def test_var_dim_u55_INT(test_data: Tuple): + test_data, dim, keepdim, unbiased = test_data() + pipeline = EthosU55PipelineINT[input_t1]( + VarDim(dim, keepdim, unbiased), + (test_data,), + aten_ops=[], + exir_ops=[], + ) + pipeline.run() + + +@common.parametrize("test_data", VarDim.test_parameters) +@common.XfailIfNoCorstone320 +def test_var_dim_u85_INT(test_data: Tuple): + test_data, dim, keepdim, unbiased = test_data() + pipeline = EthosU85PipelineINT[input_t1]( + VarDim(dim, keepdim, unbiased), + (test_data,), + aten_ops=[], + exir_ops=[], + ) + pipeline.run() + + +@common.parametrize("test_data", VarDim.test_parameters) +@common.SkipIfNoModelConverter +def test_var_dim_vgf_no_quant(test_data: Tuple): + data, dim, keepdim, unbiased = test_data() + pipeline = VgfPipeline[input_t1]( + VarDim(dim, keepdim, unbiased), + (data,), + [], + [], + quantize=False, + ) + pipeline.run() + + +@common.parametrize("test_data", VarDim.test_parameters) +@common.SkipIfNoModelConverter +def test_var_dim_vgf_quant(test_data: Tuple): + data, dim, keepdim, unbiased = test_data() + pipeline = VgfPipeline[input_t1]( + VarDim(dim, keepdim, unbiased), + (data,), + [], + [], + quantize=True, + ) + pipeline.run() + + +#################### +## VarCorrection ### +#################### + + +@common.parametrize("test_data", VarCorrection.test_parameters) +def test_var_dim_tosa_FP_correction(test_data: Tuple): + test_data, dim, keepdim, correction = test_data() + pipeline = TosaPipelineFP[input_t1]( + VarCorrection(dim, keepdim, correction), + (test_data,), + aten_op=[], + exir_op=[], + ) + pipeline.run() + + +@common.parametrize("test_data", VarCorrection.test_parameters) +def test_var_dim_tosa_INT_correction(test_data: Tuple): + test_data, dim, keepdim, correction = test_data() + pipeline = TosaPipelineINT[input_t1]( + VarCorrection(dim, keepdim, correction), + (test_data,), + aten_op=[], + exir_op=[], + ) + pipeline.run() + + +@common.parametrize( + "test_data", + VarCorrection.test_parameters, +) +@common.XfailIfNoCorstone300 +def test_var_dim_u55_INT_correction(test_data: Tuple): + test_data, dim, keepdim, correction = test_data() + pipeline = EthosU55PipelineINT[input_t1]( + VarCorrection(dim, keepdim, correction), + (test_data,), + aten_ops=[], + exir_ops=[], + ) + pipeline.run() + + +@common.parametrize("test_data", VarCorrection.test_parameters) +@common.XfailIfNoCorstone320 +def test_var_dim_u85_INT_correction(test_data: Tuple): + test_data, dim, keepdim, correction = test_data() + pipeline = EthosU85PipelineINT[input_t1]( + VarCorrection(dim, keepdim, correction), + (test_data,), + aten_ops=[], + exir_ops=[], + ) + pipeline.run() + + +@common.parametrize("test_data", VarCorrection.test_parameters) +@common.SkipIfNoModelConverter +def test_var_dim_vgf_no_quant_correction(test_data: Tuple): + data, dim, keepdim, corr = test_data() + pipeline = VgfPipeline[input_t1]( + VarCorrection(dim, keepdim, corr), + (data,), + [], + [], + quantize=False, + ) + pipeline.run() + + +@common.parametrize("test_data", VarCorrection.test_parameters) +@common.SkipIfNoModelConverter +def test_var_dim_vgf_quant_correction(test_data: Tuple): + data, dim, keepdim, corr = test_data() + pipeline = VgfPipeline[input_t1]( + VarCorrection(dim, keepdim, corr), + (data,), + [], + [], + quantize=True, + ) + pipeline.run() From 6c0fd12ed4c865eb2a961a3f425517a8522f9f3d Mon Sep 17 00:00:00 2001 From: christine-long-meta <163800716+christine-long-meta@users.noreply.github.com> Date: Tue, 19 May 2026 11:07:31 -0400 Subject: [PATCH 5/5] Update test_conv1d.py to fix lint runner add one line of blank line --- backends/arm/test/ops/test_conv1d.py | 1 + 1 file changed, 1 insertion(+) diff --git a/backends/arm/test/ops/test_conv1d.py b/backends/arm/test/ops/test_conv1d.py index 0e75eab621f..5fcdcf50465 100644 --- a/backends/arm/test/ops/test_conv1d.py +++ b/backends/arm/test/ops/test_conv1d.py @@ -416,6 +416,7 @@ def test_conv1d_a16w8_u55_INT(test_data): ) pipeline.run() + @common.parametrize("test_data", test_data_INT) @common.XfailIfNoCorstone320 def test_conv1d_a16w8_u85_INT(test_data):