Skip to content

Commit d6e25e2

Browse files
authored
Arm backend: Fix logging info in decomposition pass for asin (#12540)
Logging info about asin being approximated was placed before the if-statement in call_operator resulting in it being triggered for all ops, not just asin. Signed-off-by: Emma Kujala <[email protected]>
1 parent 373be8c commit d6e25e2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

backends/arm/_passes/decompose_asin_pass.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,11 @@ def _build_polynomial(
8585
return result
8686

8787
def call_operator(self, op, args, kwargs, meta):
88+
if op not in edge_asin_op:
89+
return super().call_operator(op, args, kwargs, meta)
8890
logging.info(
8991
f"Approximating asin. This may introduce small numerical errors. For details, see {__file__}."
9092
)
91-
if op not in edge_asin_op:
92-
return super().call_operator(op, args, kwargs, meta)
93-
9493
x = args[0]
9594
half = 0.5
9695
one = 1.0

0 commit comments

Comments
 (0)