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

attemptGarbageCollection periodically (every N subcases) #4007

Merged
merged 2 commits into from
Oct 18, 2024

Conversation

kainino0x
Copy link
Collaborator

@kainino0x kainino0x commented Oct 17, 2024

Runs attemptGarbageCollection() after every N subcases (5000 by default)

The subcase counting is global so this introduces a little variance from run to run. Alternative would be: Attempt GC at the end of every case (this seems too often), plus attempt GC every N subcases within a case so it's more deterministic. But it's still not totally deterministic because the subcases are running concurrently.

For webgpu:shader,validation,expression,call,builtin,faceForward:* (26336 subcases) in Chrome (very rough because the numbers were not coming out very clean):

N without flag with --js-flags=--expose-gc
Infinity 2.9s 3.1s (no idea why this is slower)
5000 roughly same roughly same
1000 3.1s (7%) 3.25s (5%)
100 3.4s (17%) 4.1s (37%)

Issue: Next attempt at #4006 to fix OOMs seen in https://crbug.com/373485785


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.)
  • [not tested] Test have be tested with compatibility mode validation enabled and behave as expected. (If not passing, explain above.)

Requirements for reviewer sign-off:

  • [n/a] Tests are properly located in the test tree.
  • [n/a] Test descriptions allow a reader to "read only the test plans and evaluate coverage completeness", and accurately reflect the test code.
  • [n/a] 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.

@kainino0x kainino0x force-pushed the casegc branch 3 times, most recently from 22e1200 to 79589f6 Compare October 17, 2024 21:08
@kainino0x kainino0x changed the title attemptGarbageCollection during and after test cases attemptGarbageCollection periodically (every 250 subcases) Oct 17, 2024
@kainino0x kainino0x force-pushed the casegc branch 3 times, most recently from 245d3fa to 9c3ff9c Compare October 17, 2024 21:36
@kainino0x kainino0x changed the title attemptGarbageCollection periodically (every 250 subcases) attemptGarbageCollection periodically (every N subcases) Oct 18, 2024
@kainino0x kainino0x marked this pull request as ready for review October 18, 2024 02:29
@kainino0x kainino0x merged commit da76b20 into gpuweb:main Oct 18, 2024
1 check passed
@kainino0x kainino0x deleted the casegc branch October 18, 2024 03:44
teoxoy pushed a commit to mozilla/gpuweb-cts that referenced this pull request Oct 25, 2024
teoxoy pushed a commit to mozilla/gpuweb-cts that referenced this pull request Oct 25, 2024
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.

2 participants