Skip to content
This repository was archived by the owner on Jul 1, 2025. It is now read-only.

[bugfix] Fix the NaN related test failure #2117

Merged

Conversation

tlepley-cadence
Copy link
Contributor

Description: Due to the usage for NaN in the runtime, -fno-finite-math-only is needed to disable -ffinite-math-only activated by -ffast-math, while benefiting from math optimizations.
Testing: after this fix, test CPU/InterpAndCPU.replaceNaN/0 doesn't fail anymore in our environment.

Documentation: N/A

Fixes #2073

Copy link
Contributor

@qcolombet qcolombet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@rdzhabarov rdzhabarov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@rdzhabarov rdzhabarov merged commit 31a09e7 into pytorch:master Dec 4, 2018
@tlepley-cadence tlepley-cadence deleted the cadence/tl/fix-NaN-failure branch December 5, 2018 08:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue using -ffast-math with NaN
4 participants