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

wgsl: Filter atan2 tests based on if const-eval or not #3089

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

zoddicus
Copy link
Contributor

Rewrites how test cases are generated for atan2, so that if running in const-eval unbounded results will not be generated, since those will cause compilation errors.

Fixes #3088


Requirements for PR author:

  • All missing test coverage is tracked with "TODO" or .unimplemented().
  • New helpers are /** documented */ and new helper files are found in helper_index.txt.
  • Test behaves as expected in a WebGPU implementation. (If not passing, explain above.)

Requirements for reviewer sign-off:

  • Tests are properly located in the test tree.
  • Test descriptions allow a reader to "read only the test plans and evaluate coverage completeness", and accurately reflect the test code.
  • Tests provide complete coverage (including validation control cases). Missing coverage MUST be covered by TODOs.
  • Helpers and types promote readability and maintainability.

When landing this PR, be sure to make any necessary issue status updates.

Rewrites how test cases are generated for atan2, so that if running in
const-eval unbounded results will not be generated, since those will
cause compilation errors.

Fixes gpuweb#3088
@zoddicus zoddicus added the wgsl label Oct 24, 2023
@zoddicus zoddicus self-assigned this Oct 24, 2023
@github-actions
Copy link

Previews, as seen when this build job started (f104bc2):
Run tests | View tsdoc

Copy link
Contributor

@jiangzhaoming jiangzhaoming left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks

@jiangzhaoming
Copy link
Contributor

Just wonder, but why I don't get error on constant cases with current implementation?

@zoddicus
Copy link
Contributor Author

Just wonder, but why I don't get error on constant cases with current implementation?

I think it is only some specific devices that have an issue with y == 0, or near 0 (and other boundary conditions). It is related to if they do FTZ and how they implement atan2. It is only recently with adding Android bots to Chrome that we regularly saw runs that were failing because of this.

That being said, this implies that some bots are being too tolerant of bad inputs, since these should have been failing in general. validation tests should be catching when const-eval is being too tolerant, but that coverage is yet to be implemented.

@zoddicus zoddicus merged commit 2405593 into gpuweb:main Oct 25, 2023
2 checks passed
@zoddicus zoddicus deleted the investigateAtan2CTS branch October 25, 2023 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wgsl: atan2 execution tests should filter test cases if doing const-eval
2 participants