Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poll on list or set determinism and deterministic FMA #92

Closed
ngzhian opened this issue Oct 14, 2022 · 12 comments
Closed

Poll on list or set determinism and deterministic FMA #92

ngzhian opened this issue Oct 14, 2022 · 12 comments

Comments

@ngzhian
Copy link
Member

ngzhian commented Oct 14, 2022

Please vote on the replies below with respective emoji reactions.

@ngzhian ngzhian changed the title Quick poll on list or set determinism and deterministic FMA Poll on list or set determinism and deterministic FMA Oct 14, 2022
@ngzhian
Copy link
Member Author

ngzhian commented Oct 14, 2022

Question 1:

  1. List determinism (current status) 😄
  2. Set determinism (implies deterministic FMA) ❤️
  3. Neutral 🚀

@ngzhian
Copy link
Member Author

ngzhian commented Oct 14, 2022

Question 2:

  1. Add deterministic FMA 👍
  2. Do not add deterministic FMA 👎
  3. Neutral (or it depends on the outcome of Q1) 🚀

@penzn
Copy link
Contributor

penzn commented Oct 14, 2022

Background: #86, #44, #5. #71.

@zeux
Copy link

zeux commented Oct 14, 2022

@ngzhian Just to double check... since there's no neutral option, people who are neutral on either decision should not leave any emoji, correct?

@penzn
Copy link
Contributor

penzn commented Oct 14, 2022

@ngzhian Just to double check... since there's no neutral option, people who are neutral on either decision should not leave any emoji, correct?

Maybe we need a neutral, we had this problem with bfloat16 vote 😉

@ngzhian
Copy link
Member Author

ngzhian commented Oct 14, 2022

@ngzhian Just to double check... since there's no neutral option, people who are neutral on either decision should not leave any emoji, correct?

Good point, I'll add a neural option to both questions.

@conrad-watt
Copy link
Contributor

conrad-watt commented Oct 14, 2022

Apologies for complicating things, but I would be (slightly) against adding deterministic fma if we voted for list non-determinism, so I've voted "neutral" in the second poll (edit: although maybe I should vote against?).

@Maratyszcza
Copy link
Collaborator

I’d like to point out that QFMA is not unique in that we may want to specialize code on its implementation, and if we go with set-non determinism, in addition to FMA we should add Sign Select, PSHUFB-style Swizzle, float/double to int conversions which produce INT32_MIN for out-of-range inputs, PMADDUSWB-flavor 2-wide integer dot product, and four variants of 4-wide integer dot product with accumulation.

@rossberg
Copy link
Member

I'd like to remark that the question of introducing list non-determinism has repercussions on Wasm at large, far beyond this proposal. So ultimately, it is a question that the full CG will have to weigh carefully. So it might make sense to at least think about a plan B.

@conrad-watt
Copy link
Contributor

Just to note again, I'm personally fine with list non-determinism, and I won't advocate for set non-determinism in the meeting if this comes at the expense of the phase 4 poll. I think the differences between the two are pretty slim, and I'm sympathetic to the argument that leaving a gap between spec and implementation practice (i.e. implementations are expected to always be "list"-style) is a hazard.

I think the bravery of this proposal comes from its facilitation of implementation-sniffing/specialised code, and this is true whether or not we go with list or set non-determinism (e.g. qfma testing would exist in both). I can imagine CG members wanting to pass comment on this general point (given potential feelings that Wasm/Web code should be platform-agnostic), but I worry that having a bikeshedding discussion on list vs set won't get to the heart of the debate.

@sunfishcode
Copy link
Member

In case it's of interest, this question of set nondeterminism vs list nondeterminism is the subject of the earlier fp_env proposal. It provides the consistent-within-a-run property while avoiding baking in a concept of list nondeterminism into the language semantics.

@penzn
Copy link
Contributor

penzn commented Oct 26, 2022

There is definitely a philosophical difference here, but I don't think that either way would make a practical difference with tooling or user code. Given that I prefer the set approach because it is closer to the core spec, but list can work as well.

@ngzhian ngzhian closed this as completed Feb 15, 2023
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

No branches or pull requests

7 participants