Skip to content

Create pseudo async Create*PipelineAsync - #31194

Closed
sagudev wants to merge 24 commits into
servo:mainfrom
sagudev:wpu-fake-async
Closed

sagudev wants to merge 24 commits into
servo:mainfrom
sagudev:wpu-fake-async

Conversation

@sagudev

@sagudev sagudev commented Jan 26, 2024

Copy link
Copy Markdown
Member

Shader tests in CTS depends on CreateComputePipelineAsync.

I think having pseudo async functions is better than not having them at all.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • There are tests for these changes in WebGPU CTS

@sagudev sagudev added the A-content/webgpu The WebGPU implementation. label Jan 26, 2024
@sagudev sagudev added the T-webgpu Do a try run on Linux of the WebGPU CTS label Jan 29, 2024
@github-actions github-actions Bot removed the T-webgpu Do a try run on Linux of the WebGPU CTS label Jan 29, 2024
@github-actions

Copy link
Copy Markdown

🔨 Triggering try run (#7691818292) for WebGPU CTS

@github-actions

Copy link
Copy Markdown

Test results for linux-wpt-layout-2020 from try job (#7691818292):

Flaky unexpected result (24)
Stable unexpected results (9)
  • TIMEOUT [expected CRASH] /_webgpu/webgpu/cts.https.html?q=webgpu:api,validation,state,device_lost,destroy:createRenderPipelineAsync:
    • TIMEOUT [expected PASS] subtest: :valid=true;awaitLost=true Test timed out
    • NOTRUN [expected PASS] subtest: :valid=true;awaitLost=false
    • NOTRUN [expected PASS] subtest: :valid=false;awaitLost=true
    • NOTRUN [expected PASS] subtest: :valid=false;awaitLost=false
  • ERROR [expected CRASH] /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,expression,binary,i32_arithmetic:division_scalar_vector:
    • TIMEOUT [expected PASS] subtest: :inputSource="const";vectorize_rhs=2 Test timed out
    • NOTRUN [expected PASS] subtest: :inputSource="const";vectorize_rhs=3
    • NOTRUN [expected PASS] subtest: :inputSource="const";vectorize_rhs=4
    • NOTRUN [expected PASS] subtest: :inputSource="uniform";vectorize_rhs=2
    • NOTRUN [expected PASS] subtest: :inputSource="uniform";vectorize_rhs=3
    • NOTRUN [expected PASS] subtest: :inputSource="uniform";vectorize_rhs=4
    • NOTRUN [expected PASS] subtest: :inputSource="storage_r";vectorize_rhs=2
    • NOTRUN [expected PASS] subtest: :inputSource="storage_r";vectorize_rhs=3
    • NOTRUN [expected PASS] subtest: :inputSource="storage_r";vectorize_rhs=4
    • NOTRUN [expected PASS] subtest: :inputSource="storage_rw";vectorize_rhs=2
    • And 2 more unexpected results...
  • TIMEOUT /_webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,robust_access:linear_memory:*
    • FAIL [expected PASS] subtest: :addressSpace="private";access="write";containerType="array";shadowingMode="module-scope";isAtomic=false assert_unreached:

      • INFO: subcase: baseType="i32";type="array<i32,3>"
        OK
      • INFO: subcase: baseType="u32";type="array<u32,3>"
        OK
      • INFO: subcase: baseType="f32";type="array<f32,3>"
        OK
      • INFO: subcase: baseType="bool";type="array<bool,3>"
        OK
      • EXCEPTION: Unexpected validation error occurred: Parsing(ShaderError { source: "\nstruct Constants {\n zero: u32\n};\n@group(1) @binding(0) var<uniform> constants: Constants;\n\nstruct Result {\n value: u32\n};\n@group(1) @binding(1) var<storage, read_write> result: Result;\n\n\n\nstruct S {\n startCanary: array<u32, 10>,\n data: array<i32,3>,\n endCanary: array<u32, 10>,\n};var<private> s: S;\n\nvar<private> min = 0;\nvar<private> max = 0;\nvar<private> arrayLength = 0;\n\n\nfn runTest() -> u32 {\n \n _ = min;\n _ = max;\n _ = arrayLength;\n\n \n for (var i = 0u; i < 10u; i = i + 1u) {\n s.startCanary[i] = 0xFFFFFFFFu;\n s.endCanary[i] = 0xFFFFFFFFu;\n }\n {\n let index = (0u);\n s.data[index] = i32();\n }\n {\n let index = (3u - 1u);\n s.data[index] = i32();\n }\n {\n let index = (3u);\n s.data[index] = i32();\n }\n {\n let index = (1000000u);\n s.data[index] = i32();\n }\n {\n let index = (4294967295u);\n s.data[index] = i32();\n }\n {\n let index = (2147483647u);\n s.data[index] = i32();\n }\n {\n let index = (0u) + 0u;\n s.data[index] = i32();\n }\n {\n let index = (3u - 1u) + 0u;\n s.data[index] = i32();\n }\n {\n let index = (3u) + 0u;\n s.data[index] = i32();\n }\n {\n let index = (1000000u) + 0u;\n s.data[index] = i32();\n }\n {\n let index = (4294967295u) + 0u;\n s.data[index] = i32();\n }\n {\n let index = (2147483647u) + 0u;\n s.data[index] = i32();\n }\n {\n let index = (0u) + u32(constants.zero);\n s.data[index] = i32();\n }\n {\n let index = (3u - 1u) + u32(constants.zero);\n s.data[index] = i32();\n }\n {\n let index = (3u) + u32(constants.zero);\n s.data[index] = i32();\n }\n {\n let index = (1000000u) + u32(constants.zero);\n s.data[index] = i32();\n }\n {\n let index = (4294967295u) + u32(constants.zero);\n s.data[index] = i32();\n }\n {\n let index = (2147483647u) + u32(constants.zero);\n s.data[index] = i32();\n }\n {\n let index = (0);\n s.data[index] = i32();\n }\n {\n let index = (3 - 1);\n s.data[index] = i32();\n }\n {\n let index = (-1);\n s.data[index] = i32();\n }\n {\n let index = (3);\n s.data[index] = i32();\n }\n {\n let index = (-1000000);\n s.data[index] = i32();\n }\n {\n let index = (1000000);\n s.data[index] = i32();\n }\n {\n let index = (-2147483648);\n s.data[index] = i32();\n }\n {\n let index = (2147483647);\n s.data[index] = i32();\n }\n {\n let index = (0) + 0;\n s.data[index] = i32();\n }\n {\n let index = (3 - 1) + 0;\n s.data[index] = i32();\n }\n {\n let index = (-1) + 0;\n s.data[index] = i32();\n }\n {\n let index = (3) + 0;\n s.data[index] = i32();\n }\n {\n let index = (-1000000) + 0;\n s.data[index] = i32();\n }\n {\n let index = (1000000) + 0;\n s.data[index] = i32();\n }\n {\n let index = (-2147483648) + 0;\n s.data[index] = i32();\n }\n {\n let index = (2147483647) + 0;\n s.data[index] = i32();\n }\n {\n let index = (0) + i32(constants.zero);\n s.data[index] = i32();\n }\n {\n let index = (3 - 1) + i32(constants.zero);\n s.data[index] = i32();\n }\n {\n let index = (-1) + i32(constants.zero);\n s.data[index] = i32();\n }\n {\n let index = (3) + i32(constants.zero);\n s.data[index] = i32();\n }\n {\n let index = (-1000000) + i32(constants.zero);\n s.data[index] = i32();\n }\n {\n let index = (1000000) + i32(constants.zero);\n s.data[index] = i32();\n }\n {\n let index = (-2147483648) + i32(constants.zero);\n s.data[index] = i32();\n }\n {\n let index = (2147483647) + i32(constants.zero);\n s.data[index] = i32();\n }\n for (var i = 0u; i < 10u; i = i + 1u) {\n if (s.startCanary[i] != 0xFFFFFFFFu) {\n return 0x1001u;\n }\n if (s.endCanary[i] != 0xFFFFFFFFu) {\n return 0x1002u;\n }\n }\n return 0u;\n}\n\n@compute @workgroup_size(1)\nfn main() {\n _ = constants.zero; // Ensure constants buffer is statically-accessed\n result.value = runTest();\n}", label: None, inner: ParseError { message: "expected ':', found '='", labels: [(Span { start: 323, end: 324 }, "expected ':'")], notes: [] } })
        TestFailedButDeviceReusable@https://web-platform.test:8443/_webgpu/webgpu/webgpu/util/device_pool.js:20:1
        attemptEndTestScope@https://web-platform.test:8443/_webgpu/webgpu/webgpu/util/device_pool.js:404:13
        async*endTestScope@https://web-platform.test:8443/_webgpu/webgpu/webgpu/util/device_pool.js:356:41
        release@https://web-platform.test:8443/_webgpu/webgpu/webgpu/util/device_pool.js:68:20
        finalize/<@https://web-platform.test:8443/_webgpu/webgpu/webgpu/gpu_test.js:112:43

      Reached unreachable code

    • TIMEOUT [expected PASS] subtest: :addressSpace="private";access="write";containerType="array";shadowingMode="function-scope";isAtomic=false Test timed out
    • NOTRUN [expected PASS] subtest: :addressSpace="private";access="write";containerType="matrix";shadowingMode="none";isAtomic=false
  • TIMEOUT /webgpu/webgpu/cts.https.html?q=webgpu:shader,execution,zero_init:compute,zero_init:*
  • TIMEOUT /_webgpu/webgpu/cts.https.html?q=webgpu:web_platform,external_texture,video:importExternalTexture,compute:
    • TIMEOUT [expected NOTRUN] subtest: :videoName="four-colors-vp9-bt601.webm";sourceType="VideoFrame";dstColorSpace="srgb" Test timed out
  • TIMEOUT /_webgpu/webgpu/cts.https.html?q=webgpu:web_platform,external_texture,video:importExternalTexture,sample:
    • TIMEOUT [expected FAIL] subtest: :videoName="four-colors-vp9-bt601.webm";sourceType="VideoElement";dstColorSpace="srgb" Test timed out
    • NOTRUN [expected PASS] subtest: :videoName="four-colors-vp9-bt601.webm";sourceType="VideoFrame";dstColorSpace="display-p3"
    • NOTRUN [expected PASS] subtest: :videoName="four-colors-vp9-bt601.webm";sourceType="VideoFrame";dstColorSpace="srgb"
  • @github-actions

    Copy link
    Copy Markdown

    ⚠️ Try run (#7691818292) failed.

    @sagudev sagudev mentioned this pull request Jan 29, 2024
    5 tasks
    @sagudev
    sagudev force-pushed the wpu-fake-async branch 2 times, most recently from 4d9193a to ca236c1 Compare February 10, 2024 08:07
    @sagudev
    sagudev force-pushed the wpu-fake-async branch 2 times, most recently from 3de834c to 5a020e8 Compare February 18, 2024 07:18
    @sagudev
    sagudev force-pushed the wpu-fake-async branch 3 times, most recently from 2f8de65 to 43fbee8 Compare March 1, 2024 18:23
    @mrobinson

    Copy link
    Copy Markdown
    Member

    Can this be closed now?

    @mrobinson

    mrobinson commented Mar 18, 2024 •

    Copy link
    Copy Markdown
    Member

    Closing this as a duplicate of #31695.

    @mrobinson mrobinson closed this Mar 18, 2024
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Labels

    A-content/webgpu The WebGPU implementation.

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    2 participants