Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions backends/arm/scripts/parse_test_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
"multihead_attention.default",
"adaptive_avg_pool2d.default",
"bitwise_right_shift.Tensor",
"bitwise_right_shift.Scalar",
"bitwise_left_shift.Tensor",
"bitwise_left_shift.Scalar",
"native_group_norm.default",
"silu.default",
"sdpa.default",
Expand Down
6 changes: 4 additions & 2 deletions backends/arm/test/models/test_nn_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,10 @@ def test_nn_functional_INT(test_data):
)
pipeline.pop_stage("check.aten")
pipeline.pop_stage("check_count.exir")
pipeline.pop_stage("check.quant_nodes")
pipeline.pop_stage("check_not.quant_nodes")
if pipeline.has_stage("check.quant_nodes"):
pipeline.pop_stage("check.quant_nodes")
if pipeline.has_stage("check_not.quant_nodes"):
pipeline.pop_stage("check_not.quant_nodes")
try:
pipeline.run()
except RuntimeError as e:
Expand Down
6 changes: 4 additions & 2 deletions backends/arm/test/models/test_nn_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,10 @@ def test_nn_Modules_INT(test_data):
)
pipeline.pop_stage("check.aten")
pipeline.pop_stage("check_count.exir")
pipeline.pop_stage("check.quant_nodes")
pipeline.pop_stage("check_not.quant_nodes")
if pipeline.has_stage("check.quant_nodes"):
pipeline.pop_stage("check.quant_nodes")
if pipeline.has_stage("check_not.quant_nodes"):
pipeline.pop_stage("check_not.quant_nodes")
try:
pipeline.run()
except RuntimeError as e:
Expand Down
6 changes: 0 additions & 6 deletions backends/arm/test/ops/test_any.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,6 @@ def test_any_tosa_INT(test_data: input_t1):
rtol=0,
qtol=0,
)
pipeline.pop_stage("quantize")
pipeline.pop_stage("check.quant_nodes")
pipeline.run()


Expand Down Expand Up @@ -181,8 +179,6 @@ def test_any_u85_INT(test_data: input_t1):
rtol=0,
qtol=0,
)
pipeline.pop_stage("quantize")
pipeline.pop_stage("check.quant_nodes")
pipeline.run()


Expand Down Expand Up @@ -211,6 +207,4 @@ def test_any_vgf_INT(test_data: input_t1):
op.exir_op,
tosa_version="TOSA-1.0+INT",
)
pipeline.pop_stage("quantize")
pipeline.pop_stage("check.quant_nodes")
pipeline.run()
3 changes: 0 additions & 3 deletions backends/arm/test/ops/test_arange.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ def test_arange_start_step_tosa_INT(test_data: test_data_t):
ArangeAdd.aten_op,
ArangeAdd.exir_op,
)
pipeline.pop_stage("check.quant_nodes")
pipeline.run()


Expand All @@ -111,7 +110,6 @@ def test_arange_start_step_u55_INT(test_data: test_data_t):
input_data(),
ArangeAdd.aten_op,
)
pipeline.pop_stage("check.quant_nodes")
pipeline.run()


Expand All @@ -124,7 +122,6 @@ def test_arange_start_step_u85_INT(test_data: test_data_t):
input_data(),
ArangeAdd.aten_op,
)
pipeline.pop_stage("check.quant_nodes")
pipeline.run()


Expand Down
42 changes: 3 additions & 39 deletions backends/arm/test/ops/test_bitwise.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ def forward(self, tensor1: torch.Tensor, tensor2: torch.Tensor):


class AndScalar(BitwiseBinaryScalar):
aten_op = "torch.ops.aten.bitwise_and.Scalar"
# Tensor because it gets converted from Scalar -> Tensor in lowering
aten_op = "torch.ops.aten.bitwise_and.Tensor"
exir_op = "executorch_exir_dialects_edge__ops_aten_bitwise_and_Tensor"
exir_op_scalar = "executorch_exir_dialects_edge__ops_aten_bitwise_and_Scalar"

Expand All @@ -119,8 +119,8 @@ def forward(self, tensor: torch.Tensor, scalar: int):


class XorScalar(BitwiseBinaryScalar):
aten_op = "torch.ops.aten.bitwise_xor.Scalar"
# Tensor because it gets converted from Scalar -> Tensor in lowering
aten_op = "torch.ops.aten.bitwise_xor.Tensor"
exir_op = "executorch_exir_dialects_edge__ops_aten_bitwise_xor_Tensor"
exir_op_scalar = "executorch_exir_dialects_edge__ops_aten_bitwise_xor_Scalar"

Expand All @@ -129,8 +129,8 @@ def forward(self, tensor: torch.Tensor, scalar: int):


class OrScalar(BitwiseBinaryScalar):
aten_op = "torch.ops.aten.bitwise_or.Scalar"
# Tensor because it gets converted from Scalar -> Tensor in lowering
aten_op = "torch.ops.aten.bitwise_or.Tensor"
exir_op = "executorch_exir_dialects_edge__ops_aten_bitwise_or_Tensor"
exir_op_scalar = "executorch_exir_dialects_edge__ops_aten_bitwise_or_Scalar"

Expand Down Expand Up @@ -174,8 +174,6 @@ def test_bitwise_and_tensor_tosa_INT(test_data: input_t2):
rtol=0,
qtol=0,
)
pipeline.pop_stage("quantize")
pipeline.pop_stage("check.quant_nodes")
pipeline.run()


Expand All @@ -190,8 +188,6 @@ def test_bitwise_and_scalar_tosa_INT(test_data: input_t2):
rtol=0,
qtol=0,
)
pipeline.pop_stage("quantize")
pipeline.pop_stage("check.quant_nodes")
pipeline.run()


Expand Down Expand Up @@ -239,8 +235,6 @@ def test_bitwise_and_scalar_u85_INT(test_data: input_t2):
rtol=0,
qtol=0,
)
pipeline.pop_stage("quantize")
pipeline.pop_stage("check.quant_nodes")
pipeline.run()


Expand All @@ -256,8 +250,6 @@ def test_bitwise_and_tensor_u85_INT(test_data: input_t2):
rtol=0,
qtol=0,
)
pipeline.pop_stage("quantize")
pipeline.pop_stage("check.quant_nodes")
pipeline.run()


Expand Down Expand Up @@ -296,8 +288,6 @@ def test_bitwise_and_tensor_vgf_INT(test_data: input_t2):
qtol=0,
tosa_version="TOSA-1.0+INT",
)
pipeline.pop_stage("quantize")
pipeline.pop_stage("check.quant_nodes")
pipeline.run()


Expand All @@ -314,8 +304,6 @@ def test_bitwise_and_scalar_vgf_INT(test_data: input_t2):
qtol=0,
tosa_version="TOSA-1.0+INT",
)
pipeline.pop_stage("quantize")
pipeline.pop_stage("check.quant_nodes")
pipeline.run()


Expand Down Expand Up @@ -355,8 +343,6 @@ def test_bitwise_xor_tensor_tosa_INT(test_data: input_t2):
rtol=0,
qtol=0,
)
pipeline.pop_stage("quantize")
pipeline.pop_stage("check.quant_nodes")
pipeline.run()


Expand All @@ -371,8 +357,6 @@ def test_bitwise_xor_scalar_tosa_INT(test_data: input_t2):
rtol=0,
qtol=0,
)
pipeline.pop_stage("quantize")
pipeline.pop_stage("check.quant_nodes")
pipeline.run()


Expand Down Expand Up @@ -420,8 +404,6 @@ def test_bitwise_xor_tensor_u85_INT(test_data: input_t2):
rtol=0,
qtol=0,
)
pipeline.pop_stage("quantize")
pipeline.pop_stage("check.quant_nodes")
pipeline.run()


Expand All @@ -437,8 +419,6 @@ def test_bitwise_xor_scalar_u85_INT(test_data: input_t2):
rtol=0,
qtol=0,
)
pipeline.pop_stage("quantize")
pipeline.pop_stage("check.quant_nodes")
pipeline.run()


Expand Down Expand Up @@ -477,8 +457,6 @@ def test_bitwise_xor_tensor_vgf_INT(test_data: input_t2):
qtol=0,
tosa_version="TOSA-1.0+INT",
)
pipeline.pop_stage("quantize")
pipeline.pop_stage("check.quant_nodes")
pipeline.run()


Expand All @@ -495,8 +473,6 @@ def test_bitwise_xor_scalar_vgf_INT(test_data: input_t2):
qtol=0,
tosa_version="TOSA-1.0+INT",
)
pipeline.pop_stage("quantize")
pipeline.pop_stage("check.quant_nodes")
pipeline.run()


Expand Down Expand Up @@ -536,8 +512,6 @@ def test_bitwise_or_tensor_tosa_INT(test_data: input_t2):
rtol=0,
qtol=0,
)
pipeline.pop_stage("quantize")
pipeline.pop_stage("check.quant_nodes")
pipeline.run()


Expand All @@ -552,8 +526,6 @@ def test_bitwise_or_scalar_tosa_INT(test_data: input_t2):
rtol=0,
qtol=0,
)
pipeline.pop_stage("quantize")
pipeline.pop_stage("check.quant_nodes")
pipeline.run()


Expand Down Expand Up @@ -601,8 +573,6 @@ def test_bitwise_or_tensor_u85_INT(test_data: input_t2):
rtol=0,
qtol=0,
)
pipeline.pop_stage("quantize")
pipeline.pop_stage("check.quant_nodes")
pipeline.run()


Expand All @@ -618,8 +588,6 @@ def test_bitwise_or_scalar_u85_INT(test_data: input_t2):
rtol=0,
qtol=0,
)
pipeline.pop_stage("quantize")
pipeline.pop_stage("check.quant_nodes")
pipeline.run()


Expand Down Expand Up @@ -658,8 +626,6 @@ def test_bitwise_or_tensor_vgf_INT(test_data: input_t2):
qtol=0,
tosa_version="TOSA-1.0+INT",
)
pipeline.pop_stage("quantize")
pipeline.pop_stage("check.quant_nodes")
pipeline.run()


Expand All @@ -676,8 +642,6 @@ def test_bitwise_or_scalar_vgf_INT(test_data: input_t2):
qtol=0,
tosa_version="TOSA-1.0+INT",
)
pipeline.pop_stage("quantize")
pipeline.pop_stage("check.quant_nodes")
pipeline.run()


Expand Down
6 changes: 0 additions & 6 deletions backends/arm/test/ops/test_bitwise_not.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ def test_bitwise_not_tosa_INT(test_data: Tuple):
aten_op=aten_op,
exir_op=exir_op,
)
pipeline.pop_stage("quantize")
pipeline.pop_stage("check.quant_nodes")
pipeline.run()


Expand All @@ -87,8 +85,6 @@ def test_bitwise_not_u85_INT(test_data: Tuple):
aten_ops=aten_op,
exir_ops=exir_op,
)
pipeline.pop_stage("quantize")
pipeline.pop_stage("check.quant_nodes")
pipeline.run()


Expand All @@ -115,6 +111,4 @@ def test_bitwise_not_vgf_INT(test_data: Tuple):
exir_op,
tosa_version="TOSA-1.0+INT",
)
pipeline.pop_stage("quantize")
pipeline.pop_stage("check.quant_nodes")
pipeline.run()
12 changes: 8 additions & 4 deletions backends/arm/test/ops/test_eye.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ def test_eye_tosa_INT(test_data: test_data_t):
input_data(),
EyeAdd.aten_op,
)
pipeline.pop_stage("check.quant_nodes")
if pipeline.has_stage("check.quant_nodes"):
pipeline.pop_stage("check.quant_nodes")
pipeline.run()


Expand All @@ -82,7 +83,8 @@ def test_eye_u55_INT(test_data: test_data_t):
EyeAdd.aten_op,
use_to_edge_transform_and_lower=True,
)
pipeline.pop_stage("check.quant_nodes")
if pipeline.has_stage("check.quant_nodes"):
pipeline.pop_stage("check.quant_nodes")
pipeline.run()


Expand All @@ -96,7 +98,8 @@ def test_eye_u85_INT(test_data: test_data_t):
EyeAdd.aten_op,
use_to_edge_transform_and_lower=True,
)
pipeline.pop_stage("check.quant_nodes")
if pipeline.has_stage("check.quant_nodes"):
pipeline.pop_stage("check.quant_nodes")
pipeline.run()


Expand Down Expand Up @@ -132,7 +135,8 @@ def test_eye_vgf_INT(test_data: test_data_t):
EyeAdd.aten_op,
tosa_version="TOSA-1.0+INT",
)
pipeline.pop_stage("check.quant_nodes")
if pipeline.has_stage("check.quant_nodes"):
pipeline.pop_stage("check.quant_nodes")
pipeline.run()


Expand Down
1 change: 0 additions & 1 deletion backends/arm/test/ops/test_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ def test_full_like_tosa_INT(test_data: Tuple):
aten_op=[],
exir_op=exir_op,
)
pipeline.pop_stage("check.quant_nodes")
pipeline.run()


Expand Down
Loading
Loading