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

Add AdapterLimitsGPUTest that sets all limits to the adapter's #3466

Merged
merged 1 commit into from
Mar 8, 2024

Conversation

greggman
Copy link
Contributor

@greggman greggman commented Mar 7, 2024

Note: I'm not sure how I refactored device_pool.ts is good but, the old code created one initial device with no descriptor the first time in acquire. It then created another of the type actually wanted by the user. That no longer works becauase the adapter is passed in and so if the first requestDevice succeeds, then the adapter has been used and can't be used for the second one.

Also, assuming this change is approved, I can (and should?) probably refactor LimitsTest to use this vs how it's doing it now. That would end up using cached devices.

Issue: #3363


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.)
  • Test have be tested with compatibility mode validation enabled and behave as expected. (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.

@greggman greggman requested a review from kainino0x March 7, 2024 23:20
Copy link
Collaborator

@kainino0x kainino0x left a comment

Choose a reason for hiding this comment

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

LGTM. This makes more sense than the thing that tried to get a device twice.

Note: I'm not sure how I refactored device_pool.ts is good
but, the old code created one initial device with no descriptor
the first time in acquire. It then created another of the type
actually wanted by the user. That no longer works becauase the
adapter is passed in and so if the first requestDevice succeeds,
then the adapter has been used and can't be used for the second
one.

Also, assuming this change is approved,  I can (and should?) probably
refactor LimitsTest to use this vs how it's doing it now. That
would end up using cached devices.
@greggman greggman enabled auto-merge (squash) March 8, 2024 04:56
@greggman greggman merged commit 0a68bf7 into gpuweb:main Mar 8, 2024
1 check passed
@ben-clayton
Copy link
Contributor

This change seems to be breaking a bunch of things with the node based test runner.

Test that use

  .beforeAllSubcases(t => {
    t.selectDeviceOrSkipTestCase({ requiredFeatures: ['shader-f16'] });
  })

Are now causing exceptions on devices that don't support shader-f16. This results in tests failing instead of being skipped.

I also get the impression that once a device is lost, all subsequent tests fail to reacquire a new device.

@greggman
Copy link
Contributor Author

greggman commented Mar 8, 2024

sorry about that. I'll fix assp

@greggman greggman deleted the use-max-limits branch March 8, 2024 17:51
ben-clayton added a commit to ben-clayton/cts that referenced this pull request Mar 18, 2024
This reverts commits:
* f71a834.
* 0a68bf7.

Revert "Add AdapterLimitsGPUTest that sets all limits to the adapter's (gpuweb#3466)"

This reverts commit 0a68bf7.
ben-clayton added a commit to ben-clayton/cts that referenced this pull request Mar 18, 2024
This reverts commits:
* f71a834.
* 0a68bf7.

Revert "Add AdapterLimitsGPUTest that sets all limits to the adapter's (gpuweb#3466)"

This reverts commit 0a68bf7.
ben-clayton added a commit to ben-clayton/cts that referenced this pull request Mar 18, 2024
This reverts commits:
* f71a834.
* 0a68bf7.

These changes have been idenitified as causing a large collection of CTS failures with 'webgpu:web_platform,copyToTexture,ImageBitmap' (and possibly others).
ben-clayton added a commit to ben-clayton/cts that referenced this pull request Mar 18, 2024
This reverts commits:
* f71a834.
* 0a68bf7.

These changes have been idenitified as causing a large collection of CTS failures with 'webgpu:web_platform,copyToTexture,ImageBitmap' (and possibly others).
ben-clayton added a commit that referenced this pull request Mar 18, 2024
This reverts commits:
* f71a834.
* 0a68bf7.

These changes have been idenitified as causing a large collection of CTS failures with 'webgpu:web_platform,copyToTexture,ImageBitmap' (and possibly others).
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.

3 participants