Skip to content

Exclude 'Reciprocal' from Involution check - #1

Open
Nico-letta wants to merge 1 commit into
masterfrom
Nico-letta-patch-1
Open

Exclude 'Reciprocal' from Involution check#1
Nico-letta wants to merge 1 commit into
masterfrom
Nico-letta-patch-1

Conversation

@Nico-letta

Copy link
Copy Markdown
Owner

Description

Currently, the Grappler InvertInvolution sub-pass inside ArithmeticOptimizer, eliminates consecutive Reciprocal nodes from the execution graph. This causes an incorrect discrepancy between Eager mode and Graph mode/`tf.function. However, In floating-point arithmetic (IEEE 754), reciprocal is not a perfect involution due to rounding errors.

This PR fixes the issue by explicitly excluding the "Reciprocal" operation from the RemoveInvolution stage.

Related Issues

Fixes tensorflow#119429

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Grappler ArithmeticOptimizer incorrectly eliminates reciprocal(reciprocal(x)) as involution

1 participant