This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Math] Change regex to match fp value on different target.
ClosedPublic

Authored by jacquesguan on Sep 28 2022, 8:23 PM.

Diff Detail

Event Timeline

jacquesguan created this revision.Sep 28 2022, 8:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 28 2022, 8:23 PM
jacquesguan requested review of this revision.Sep 28 2022, 8:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 28 2022, 8:23 PM

The issue in question is not a precision issue, but a printing one. For some reason, the value is normalized differently to print as 8.414710e-01 instead of the expected 0.841471e+00, but this is the same value. We need to fix that. Completely removing the values defines the purpose of this test IMO, we will be only checking that the folding happened, but not longer that it happened _correctly_.

Why the result is printed as 0.84 vs. 8.40 is due to precision. Without support for float matching in FileCheck, the only option is to regex the position of the period.

Please fix this soon @jacquesguan . It's not good to be having failures on HEAD

Refactor regex.

ftynse accepted this revision.Oct 11 2022, 3:58 AM
This revision is now accepted and ready to land.Oct 11 2022, 3:58 AM
Mogball accepted this revision.Oct 11 2022, 10:52 AM
jacquesguan retitled this revision from [mlir][Math] remove some value check to avoid test failed. to [mlir][Math] Change regex to match fp value on different target..Oct 11 2022, 11:14 PM
jacquesguan edited the summary of this revision. (Show Details)