Firefox Graphics
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Help
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Getting WebGPU CTS actually working Live reporting of the current progress of [Bug 1720941, AKA `webgpu-cts`](https://bugzilla.mozilla.org/show_bug.cgi?id=1720941). ## 2023-01-19 Kickoff meeting :::spoiler * Context: * CTS is implemented in `gpuweb` upstream in a similar fashion to WebGL, which writes test cases as individual HTML files that has shared JS logic for common setup and teardown. * Manual test runs can be performed with an HTML page that loads the above test case HTML files in an `iframe`. * A CTS runner against the Deno ecosystem is located in the `cts_runner` folder in `wgpu` upstream. This currently _does not work_. :confused: * Kelsey leads us on a tour of WebGL's current Mochitest implementation. It uses a tree of generated HTML files that wrap their correspondent upstream CTS files/cases. :::spoiler * These are generated by running [`generate-wrappers-and-manifest.py`](https://searchfox.org/mozilla-central/source/dom/canvas/test/webgl-conf/generate-wrappers-and-manifest.py), which uses the following: * Inputs: * A big tree of test cases from Khronos upstream (which we put into [our fork](https://github.com/FirefoxGraphics/khronos-webgl))! `00_test_list.txt` files that list the more `txt` files (branch nodes) and HTML test case files (leaf nodes) * Example: the [root `00_test_list.txt` file in our checkout](https://searchfox.org/mozilla-central/source/dom/canvas/test/webgl-conf/checkout/00_test_list.txt) * Corresponds to [this Khronos upstream file](https://github.com/FirefoxGraphics/khronos-webgl/blob/main/sdk/tests/00_test_list.txt). * By default, all test cases are naively expected to pass as-is. [`mochitext-errata.ini`](https://searchfox.org/mozilla-central/source/dom/canvas/test/webgl-conf/mochitest-errata.ini) lists exceptions (`skip-if`, `fail-if`, etc.). * Outputs: * [`generated-mochitest.ini`](https://searchfox.org/mozilla-central/source/dom/canvas/test/webgl-conf/generated-mochitest.ini) becomes the final description of test cases for Mochitest to run. * HTML files * All of these cases is registered via [`dom/canvas/moz.build`](https://searchfox.org/mozilla-central/source/dom/canvas/moz.build#38). * The wrapping logic does the following: * Example upstream test case: <https://searchfox.org/mozilla-central/source/dom/canvas/test/webgl-conf/checkout/conformance/buffers/buffer-bind-test.html> * `mochitest-single.html`: Uses the extensible `window.webglTestHarness` object to report up to the `iframe` ::: * Should we try to run the CTS with Deno as the back end first? Or try for full Fx integration? * @jgilbert: We should just go straight for Fx integration right now. WebGPU is already written, we just need to test it. * Next steps: - [ ] Actually get the CTS running against Firefox. - [ ] @ErichDonGubler to run the CTS manually first. - [ ] Validate that `wgpu.rs` examples actually run in a nightly or local build of Firefox first (with the right prefs. set). - [x] `dom.webgpu.enabled` should be `true`. - [x] Identify smoke-ish tests in the CTS that we can use to start getting interesting breakages in more advanced tests. * Erich: This might also be interesting for aggregate statistics! - [ ] Low-priority: see if there's an easy way to get stats from a run of tests against Fx. - [ ] Break down later: generate Mochitest test cases from [the CTS](https://github.com/gpuweb/cts) a la WebGL. - [ ] Don't try to de-dupe with the existing WebGL Mochitest implementation. Just dupe it and make adaptations to WebGPU. * What else? ::: ## 2023-01-30 Analysis of the CTS :::spoiler Erich's exhaustive tree-shaped notes on failures ``` webgpu api operation adapter requestAdapter: fails on [1] requestDevice default: fails on [1], seems like a foundational blocker invalid: FREEZES features unknown: passes known: fails on [1], seems like a foundational blocker limits unknown: fails on [7] supported: fails on [1], seems like a foundational blocker limit better_than_supported: fails on [1] supported: fails on [?] buffers: fails on [?] compute_pipeline: fails on [3] device lost not_lost_on_gc: passes lost_on_destroy: fails same_object: fails labels: fails, not implemented yet memory_allocation: not implemented yet memory_sync buffer: fails on [1] and [2] texture: fails on [1] pipeline: not implemented yet [1]: unable to fulfill requested features and limits [2]: this.queue.onSubmittedWorkDone is not a function [3]: EXCEPTION: GPUDevice.createComputePipelineAsync: 'layout' member of GPUPipelineDescriptorBase is not an object. [4]: EXCEPTION: navigator.gpu.getPreferredCanvasFormat is not a function [5]: EXCEPTION: Video never became ready [6]: EXCEPTION: adapter.requestAdapterInfo is not a function [7]: EXPECTATION FAILED: THREW NotSupportedError, instead of OperationError: NotVSupportedError: Unable to instantiate a Device ``` Failure bugs filed: 1. [1812353](https://bugzilla.mozilla.org/show_bug.cgi?id=1812353): seems particularly wide-ranging in what it's blocking 2. [1814088](https://bugzilla.mozilla.org/show_bug.cgi?id=1814088) 3. [1814090](https://bugzilla.mozilla.org/show_bug.cgi?id=1814090) 4. [1814091](https://bugzilla.mozilla.org/show_bug.cgi?id=1814091) 5. [1814094](https://bugzilla.mozilla.org/show_bug.cgi?id=1814094) 6. [1814101](https://bugzilla.mozilla.org/show_bug.cgi?id=1814101) 7. [1814098](https://bugzilla.mozilla.org/show_bug.cgi?id=1814098) Freeze bug: [1812352](https://bugzilla.mozilla.org/show_bug.cgi?id=1812352) ::: ## 2023-01-31 How tests are organized The easiest way to start explaining how CTS organizes tests in [`src/`](https://github.com/gpuweb/cts/tree/bd8450c3aaa35a48346674d2ecec98854882a7cd/src) is to show an example of a test case path: ```bash webgpu:api,operations,adapter,requestAdapterInfo:limits,unknown: # \____/ \_______________________________________/ \____________/ # | | | # | | Test case name / # | | # | | # | \ Test group path # | # \ Test suite name ``` :::spoiler * Individual _test suites_ are top-level child directories inside of the `src/` folder. This is represented in a test case path as the first colon-terminated segment in each test case path (i.e., `webgpu:…`). * Each test suite contains a `listing.ts` that returns a tree of _test groups_ as a module export. * The tree of test groups is populated by recursively searching for: * Directories, which become branch nodes. * `*.spec.{js,ts}` files, which become leaf nodes containing test groups. * `README.txt` files annotate the branch node associated with its parent directory with a description. * Each test group is represented in a test case path as a comma-separated, colon-terminated path correspondent to discovered file path, (i.e., `…api,operations,adapter,requestAdapterInfo:…`) * Each test group is a set of _test cases_ defined programmatically in a TypeScript file with a name of the form `*.spec.{js,ts}`. These are represented in a test case path as a final colon-terminated component, i.e., `…limits,unknown:`. * N.B. that many tests conventionally use commas to further distinguish related concepts (such as running many similar tests with different parameters), but the commas are part of the string name in source, rather than an artifact of other structure. Globbing is permitted as a final component after another component boundary (`:` or `,`), i.e., `webgpu:*`, or `webgpu:api,operations,device,*`. ::: ## 2023-02-02 First `try` build! @jimblandy has recommended that @ErichDonGubler go forward with targeting WPT test cases. ## 2023-02-17 WPT tests running, but need chunking :::spoiler Since last update, the following interesting things have happened: * Asked: Is stuff in `dom/webgpu/mochitest/` actually valuable to keep, with these CTS tests? [Asked](https://matrix.to/#/!AQDMTeppDxxlzBSBzM:mozilla.org/$JfKho4W9mdA-sRGcDl3n066w3xHHEnLh7AEn0NS1MCs?via=mozilla.org&via=matrix.org), waiting for an answer. A from Kelsey: Don't worry about this for now. - [x] Useful WPT execution was blocked on [1814745](https://bugzilla.mozilla.org/show_bug.cgi?id=1814745), because the `dom.webgpu.enabled` pref. was only set dynamically. Now it's fixed. Thanks, Kelsey! ::: ## 2023-02-22 More bugs filed! :::spoiler - [x] In `/webgpu/webgpu/web_platform/reftests/canvas_clear.https.html`: ``` JavaScript error: https://web-platform.test:8443/webgpu/webgpu/web_platform/reftests/canvas_clear.html.js, line 18: TypeError: GPUCommandEncoder.beginRenderPass: Missing required 'loadValue' member of GPURenderPassColorAttachment. ``` - [x] In `/webgpu/webgpu/web_platform/reftests/canvas_complex_bgra8unorm_copy.https.html`: ``` JavaScript error: https://web-platform.test:8443/webgpu/webgpu/web_platform/reftests/canvas_complex.html.js, line 34: TypeError: can't access property "height", ctx.canvas is undefined ``` - [x] In `webgpu:api,validation,buffer,mapping:mapAsync,state,mappingPending:*`: ``` Unhandled rejection: mapAsync rejected unexpectedly with: Error: mapAsync unexpectedly passed assert@http://127.0.0.1:5000/webgpu/common/util/util.js:37:11 testMapAsyncCall@http://127.0.0.1:5000/webgpu/webgpu/api/validation/buffer/mapping.spec.js:48:15 ``` - [x] In `webgpu:web_platform,canvas,getCurrentTexture:multiple_frames:*`: ``` Unhandled rejection: level (0) too large for base size (undefinedxundefined) assert@http://127.0.0.1:5000/webgpu/common/util/util.js:37:11 physicalMipSize@http://127.0.0.1:5000/webgpu/webgpu/util/texture/base.js:42:13 getTextureCopyLayout@http://127.0.0.1:5000/webgpu/webgpu/util/texture/layout.js:42:34 expectSingleColor@http://127.0.0.1:5000/webgpu/webgpu/gpu_test.js:441:100 frameCheck@http://127.0.0.1:5000/webgpu/webgpu/web_platform/canvas/getCurrentTexture.spec.js:157:13 ``` - [x] `webgpu/webgpu/web_platform/reftests/canvas_colorspace_bgra8unorm.https.html` fails ref test - [x] `webgpu/webgpu/web_platform/reftests/canvas_colorspace_rgba8unorm.https.html` fails ref test ::: ## Current status - [ ] Contact CI folks about potentially adding a significant amount of time to WPT tests in Taskcluster - [x] Joel Mahar - [ ] RyanVM - [ ] Review CTS integration in Phabricator; tip of changes can be found at [D169953](https://phabricator.services.mozilla.com/D169953). - [x] Work around current failures with test case expectation management, just like the failures we were already expecting anyway. Fun fact: `./mach wpt … --log-wptreport $report_json_path` and `./mach wpt-update $report_json_path` are great! - [x] Consolidate vendoring workflow between Python and Rust, leaning towards all Rust - [x] Use regex-based chunking, not HTML parsing and emitting (which is subject to the correctness of a lot of layers we don't need). - [x] Figure out how to keep `wpt` chunks that handle `webgpu` tests from timing out. - Run all tasks from `!talos !asan !tsan 'opt-web-platform-tests` and `!talos !asan !tsan 'debug-web-platform-tests`. - Latest build of interest: <https://treeherder.mozilla.org/jobs?repo=try&revision=b04a0f2b7ca23a0c9ea7371c32d61eb649ba01f5> - [x] Add more chunks? - [ ] ~~Figure out how to profile and weigh longer execution times with chunks?~~ Only gonna do this if Joel or RyanVM actually have an objection. - [x] Make sure we don't actually change `testing/web-platform/{meta,tests}` ([context](https://matrix.to/#/!AQDMTeppDxxlzBSBzM:mozilla.org/$wRyahPAWa9YAFY_JVfDj4dYTpye5LoOH9GxeoiScfPI?via=mozilla.org&via=matrix.org)); use `testing/web-platform/mozilla/{meta,tests}`, leave other stuff alone. - [ ] ~~Replace expanded result groups with a single `expected: FAIL` or whatever applies, if possible~~ - 2023-03-06: Tried this recently, naively applying `expected: FAIL` on an entire section was too naive. Not sure how to make it pass yet. - 2023-03-06: Nah, just skip this. This shouldn't block shipping.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully