Skip to content

Add sigmoid to one-to-one annotator in ArmQuantizer #6047

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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
1 change: 0 additions & 1 deletion backends/arm/quantizer/arm_quantizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@ class ArmQuantizer(Quantizer):
"add",
"sub",
"mul",
"sigmoid",
"mm",
"cat",
"one_to_one",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,5 @@ def decorator(annotator: AnnotatorType):
mm_annotator,
mul_annotator,
one_to_one_annotator,
sigmoid_annotator,
sub_annotator,
)
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def _annotate_one_to_one(
torch.ops.aten.log.default,
torch.ops.aten.reciprocal.default,
torch.ops.aten.rsqrt.default,
torch.ops.aten.sigmoid.default,
)
for node in gm.graph.nodes:
if node.op != "call_function" or node.target not in one_to_one_ops:
Expand Down

This file was deleted.

11 changes: 1 addition & 10 deletions backends/arm/test/ops/test_sigmoid.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,18 +155,12 @@ def test_sigmoid_tosa_BI(self, test_name: str, test_data: torch.Tensor):
def test_add_sigmoid_tosa_MI(self):
self._test_sigmoid_tosa_MI_pipeline(self.AddSigmoid(), (test_data_suite[0][1],))

@unittest.skip(
reason="Started to fails when PyTorch 2.5->2.6 https://github.com/pytorch/executorch/issues/5832"
)
def test_add_sigmoid_tosa_BI(self):
self._test_sigmoid_tosa_BI_pipeline(self.AddSigmoid(), (test_data_suite[0][1],))
self._test_sigmoid_tosa_BI_pipeline(self.AddSigmoid(), (test_data_suite[5][1],))

def test_sigmoid_add_tosa_MI(self):
self._test_sigmoid_tosa_MI_pipeline(self.SigmoidAdd(), (test_data_suite[0][1],))

@unittest.skip(
reason="Started to fails when PyTorch 2.5->2.6 https://github.com/pytorch/executorch/issues/5832"
)
def test_sigmoid_add_tosa_BI(self):
self._test_sigmoid_tosa_BI_pipeline(self.SigmoidAdd(), (test_data_suite[0][1],))

Expand All @@ -175,9 +169,6 @@ def test_sigmoid_add_sigmoid_tosa_MI(self):
self.SigmoidAddSigmoid(), (test_data_suite[4][1], test_data_suite[3][1])
)

@unittest.skip(
reason="Started to fails when PyTorch 2.5->2.6 https://github.com/pytorch/executorch/issues/5832"
)
def test_sigmoid_add_sigmoid_tosa_BI(self):
self._test_sigmoid_tosa_BI_pipeline(
self.SigmoidAddSigmoid(), (test_data_suite[4][1], test_data_suite[3][1])
Expand Down
Loading