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: Add AbstractFloat round execution tests #3080

Merged
merged 4 commits into from
Nov 7, 2023

Conversation

zoddicus
Copy link
Contributor

Fixes #2509


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.

@zoddicus zoddicus added the wgsl label Oct 23, 2023
@zoddicus zoddicus self-assigned this Oct 23, 2023
@github-actions
Copy link

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

@github-actions
Copy link

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

dneto0
dneto0 previously requested changes Oct 24, 2023
Copy link
Contributor

@dneto0 dneto0 left a comment

Choose a reason for hiding this comment

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

I think the "large int value" case is not exercised the way it was intended.

abstract: () => {
return FP.abstract.generateScalarToIntervalCases(
[
reinterpretU64AsF64(0x8000_0000_0000_0000n), // https://github.com/gpuweb/cts/issues/2766
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a reinterpret cast, so this generates -0.0 in f64.

I don't think that's what you mean.

Copy link
Contributor

Choose a reason for hiding this comment

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

The point of 2766 was to test integers that are larger in magnitude than can fit inside the mantissa bits. So for f64 that would be something in excess of 2** 53 ish.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct, thanks for catching this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

arg... I updated the unittests, but not the CTS test itself 😮‍💨

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

@zoddicus zoddicus requested a review from dneto0 October 24, 2023 14:09
@zoddicus zoddicus force-pushed the addAFRoundTests branch 2 times, most recently from 3029762 to e66f317 Compare October 24, 2023 14:16
@github-actions
Copy link

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

@zoddicus
Copy link
Contributor Author

@dneto0 PTAL, I think this should be fixed now

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

@zoddicus zoddicus dismissed dneto0’s stale review November 7, 2023 19:26

I have addressed the concerns, but they are OOO for a week, so cannot confirm

@zoddicus zoddicus merged commit 248ce12 into gpuweb:main Nov 7, 2023
1 check passed
@zoddicus zoddicus deleted the addAFRoundTests branch November 7, 2023 19:40
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: AbstractFloat execution test for round builtin
3 participants