Skip to content

Revive the CTS job #7675

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

Draft
wants to merge 2 commits into
base: trunk
Choose a base branch
from
Draft

Revive the CTS job #7675

wants to merge 2 commits into from

Conversation

andyleiserson
Copy link
Contributor

Fixes #6838

Includes some functional changes to make it work, notably:

  • Makes access to GPUDevice.lost produce a promise (it did not seem to do so, before). But I don't know how to trigger resolution of the promise when device loss occurs.
  • Implements on_submitted_work_done in deno_webgpu similar to how mapAsync is implemented.
  • Removes an error that was raised when destroy() is called multiple times.

A pinned CTS version is specified in cts_runner/revision.txt. That version is quite old, but is not changed by this PR, because there is a problem running the latest version in deno. gpuweb/cts#4385 has the fix for that.

Testing
I tested the CTS job in my personal fork of wgpu. We can also verify that the CTS job runs on this PR (based on a label being set). The workflow_dispatch trigger only works once the workflow is merged to main.

Squash or Rebase? Squash

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy --tests. If applicable, add:
    • --target wasm32-unknown-unknown
  • Run cargo xtask test to run tests.
  • If this contains user-facing changes, add a CHANGELOG.md entry.

@andyleiserson andyleiserson requested review from crowlKats and a team as code owners May 7, 2025 20:51
@andyleiserson andyleiserson added the PR: run CTS PRs that should trigger the GitHub actions workflow for the WebGPU conformance test suite (CTS) label May 7, 2025
@andyleiserson andyleiserson force-pushed the cts branch 3 times, most recently from 27be211 to 2f220ec Compare May 7, 2025 21:11
jobs:
cts:
# For pull requests, run only run if we add the "PR: run CTS" label
if: "github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'PR: run CTS'))"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried a bunch of versions of this, and GitHub kept saying it was an error in the yaml syntax. But I'm not sure if this one is correct, or if it's interpreted as a non-null string that will always be true.

@andyleiserson
Copy link
Contributor Author

Clippy is probably on to something here:

error: usage of an `Arc` that is not `Send` and `Sync`
   --> deno_webgpu/adapter.rs:161:28
    |
161 |               error_handler: Arc::new(super::error::DeviceErrorHandler::new(
    |  ____________________________^
162 | |                 v8::Global::new(scope, resolver),
163 | |                 uncaptured_sender,
164 | |                 uncaptured_sender_is_closed_sender,
165 | |             )),
    | |______________^
    |
    = note: `Arc<DeviceErrorHandler>` is not `Send` and `Sync` as `DeviceErrorHandler` is neither `Send` nor `Sync`
    = help: if the `Arc` will not used be across threads replace it with an `Rc`
    = help: otherwise make `DeviceErrorHandler` `Send` and `Sync` or consider a wrapper type such as `Mutex`

@andyleiserson andyleiserson removed the PR: run CTS PRs that should trigger the GitHub actions workflow for the WebGPU conformance test suite (CTS) label May 7, 2025
@andyleiserson
Copy link
Contributor Author

I am going to mark this as a draft and open separate PRs for the functional changes.

@andyleiserson andyleiserson marked this pull request as draft May 12, 2025 15:58
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.

cts is not executed by ci workflow, cts_runner seems broken
1 participant