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

Compat: make atomicCompareExchangeWeak tests handle limits #3235

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

greggman
Copy link
Contributor

@greggman greggman commented Jan 3, 2024


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.

@greggman greggman requested review from amaiorano, ben-clayton and shrekshao and removed request for amaiorano and ben-clayton January 3, 2024 21:38
Copy link
Contributor

@shrekshao shrekshao left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -339,6 +339,11 @@ struct __atomic_compare_exchange_result<T> {
const numInvocations = t.params.workgroupSize;
const scalarType = t.params.scalarType;

t.skipIf(
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: maybe filter out the params instead of skipping in test body?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the suggestion. I don't think I can filter these out before without a device since I'm comparing to device.limits.maxComputeWorkgroupSizeX. I could hard code those limits somewhere but it seems better to look them up in the one place that would be correct in the future.

Copy link
Contributor

@shrekshao shrekshao Jan 5, 2024

Choose a reason for hiding this comment

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

No problem for leaving it as is then

@greggman greggman force-pushed the compat-atomicCompareExchangeWeak branch from 86bb3da to 50920aa Compare January 5, 2024 23:13
@greggman greggman enabled auto-merge (rebase) January 5, 2024 23:13
@greggman greggman merged commit 0973e61 into gpuweb:main Jan 5, 2024
1 check passed
@greggman greggman deleted the compat-atomicCompareExchangeWeak branch November 1, 2024 18:05
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