Sitelet https://github.com/gpuweb/gpuweb/pull/2777
Skip to content

Clarify that evaluations to inf/nan may yield undef value - #2777

Merged
kdashg merged 1 commit into
gpuweb:mainfrom
dneto0:issue-2776
May 31, 2022
Merged

kdashg merged 1 commit into
gpuweb:mainfrom
dneto0:issue-2776

Conversation

@dneto0

@dneto0 dneto0 commented Apr 20, 2022

Copy link
Copy Markdown
Contributor

Fixes: #2776

@dneto0
dneto0 requested a review from alan-baker April 20, 2022 17:36
@dneto0

dneto0 commented Apr 20, 2022

Copy link
Copy Markdown
Contributor Author

I'm not sure if this is the best way to say it. Feedback desired.

@github-actions

Copy link
Copy Markdown
Contributor

Previews, as seen when this build job started (03bf6a2):
WebGPU | IDL
WGSL
Explainer

@kdashg

kdashg commented Apr 26, 2022

Copy link
Copy Markdown
Contributor

We we want to split hairs here and go with "implementation-defined"? Is that even accurate?

@kdashg

kdashg commented Apr 26, 2022

Copy link
Copy Markdown
Contributor
WGSL meeting minutes 2022-04-26
  • AB: We should probably use the same language as e.g. OOB access.
  • BC: Concern with “impl defined” implies a consistent behavior, and we don’t have that.
  • MM: What is the granularity of this? E.g. can multiple runs have different results? Are results different within the same execution?
  • MM: “The value of an undefined value would not change from one line to the next” such that we don’t get e.g. undefined branchin.
  • JB: THis is something a user wants to know. Like “can I dupe this expr and have it have the same result”.
  • AB: I agree that this sounds useful but I’m not sure how I (or MM?) would implement it?
  • MM:
  • AB: I know how I’d do it in llvm, but not sure about it other backends.
  • MM: One solution: “For each expression that can produce UV, I will produce a value”, but if you want to rely on what spir-v has, I’m not sure what spir-v can guarantee w.r.t. UVs.
  • AB: I wouldn’t want to have to insert e.g. clamping code after every UV application. I would like to distinguish between cases where we can guarantee it, vs cases where the underlying system has UV issues.
  • MM: Less concerned about the portability than the ability for an author to get reasonable logical execution. E.g. skipping branches.
  • BC: Not sure if it’s possible to do better.
  • KG: Can we call it “arbitrary value”? Then we can rely on normal logical flow.
  • MM: Yes that’s cool what I’m asking for.
  • BC: Still not sure it’s implementable.
  • KG: Can you give us examples where even branches wouldn’t be able to safely give us arbitrary values?
  • BC: Yes I’ll find them.

@kdashg

kdashg commented May 13, 2022

Copy link
Copy Markdown
Contributor

I think I want to discuss #2888 first.

@kdashg

kdashg commented May 31, 2022

Copy link
Copy Markdown
Contributor
WGSL meeting minutes 2022-05-31
  • KG: Wanted to discuss undef value first, but don’t care anymore. Lets land if that’s tolerable and fixup afterwards. Can either land what we mean and then fix, or land better language and use here. Either order is fine with me.
  • DN: Either is fine with me. This is a net improvement.
  • KG: Let’s take this.

@kdashg
kdashg merged commit 382565f into gpuweb:main May 31, 2022
github-actions Bot added a commit that referenced this pull request May 31, 2022
SHA: 382565f
Reason: push, by @kdashg

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions Bot added a commit that referenced this pull request May 31, 2022
SHA: 382565f
Reason: push, by @kdashg

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions Bot added a commit that referenced this pull request May 31, 2022
SHA: 382565f
Reason: push, by @kdashg

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
jdarpinian pushed a commit to jdarpinian/gpuweb that referenced this pull request Aug 12, 2022
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.

wgsl: clarify that when inf/nan are not supported, that such evaluations produced undefined value of the given type

2 participants