Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Question about min/max floating point reduction and NaNs #896

Open
WojciechMula opened this issue Jun 30, 2023 · 6 comments
Open

Question about min/max floating point reduction and NaNs #896

WojciechMula opened this issue Jun 30, 2023 · 6 comments

Comments

@WojciechMula
Copy link

Section "14.3.3. Vector Single-Width Floating-Point Max and Min Reductions" does not state explicitly how NaNs should be propagated. Is it valid to assume that NaNs behavior is the same as FMIN/FMAX -- similarly to floating-point sum reductions? (In SPIKE, the authors assumed no NaN-propagation, which is not in-line with RISC-V spec 2.2.)

@aswaterman
Copy link
Collaborator

It seems the spec didn't spell this out, but the behavior should be the same as for FMIN/FMAX.

Looks like this is wrong in Spike (but Spike's implementation of FMIN/FMAX is correct).

@aswaterman
Copy link
Collaborator

@WojciechMula
Copy link
Author

Thank you for the prompt answer!

@nick-knight
Copy link
Contributor

As discussed on the Spike repo, I do not see a problem.

@nick-knight
Copy link
Contributor

Please see #897 for a clarification.

@WojciechMula
Copy link
Author

That's great! Thank you very much

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants