Bug 196107 - WIP: [Web GPU] Prototype compute pipeline with MSL
Summary: WIP: [Web GPU] Prototype compute pipeline with MSL
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Justin Fan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-03-21 13:07 PDT by Justin Fan
Modified: 2019-03-28 15:13 PDT (History)
6 users (show)

See Also:


Attachments
Patch (112.08 KB, patch)
2019-03-21 15:20 PDT, Justin Fan
no flags Details | Formatted Diff | Diff
Patch (110.00 KB, patch)
2019-03-21 16:04 PDT, Justin Fan
no flags Details | Formatted Diff | Diff
Patch (109.96 KB, patch)
2019-03-21 16:16 PDT, Justin Fan
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews105 for mac-highsierra-wk2 (3.05 MB, application/zip)
2019-03-21 18:44 PDT, EWS Watchlist
no flags Details
Patch (109.87 KB, patch)
2019-03-22 13:44 PDT, Justin Fan
no flags Details | Formatted Diff | Diff
Patch (110.52 KB, patch)
2019-03-22 14:40 PDT, Justin Fan
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews104 for mac-highsierra-wk2 (2.77 MB, application/zip)
2019-03-22 15:46 PDT, EWS Watchlist
no flags Details
Patch (110.64 KB, patch)
2019-03-22 15:58 PDT, Justin Fan
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews107 for mac-highsierra-wk2 (2.73 MB, application/zip)
2019-03-22 17:23 PDT, EWS Watchlist
no flags Details
Patch (109.96 KB, patch)
2019-03-23 17:15 PDT, Justin Fan
no flags Details | Formatted Diff | Diff
Crash log (36.62 KB, text/plain)
2019-03-25 16:19 PDT, Truitt Savell
no flags Details
Patch (66.11 KB, patch)
2019-03-27 16:08 PDT, Justin Fan
no flags Details | Formatted Diff | Diff
Patch (109.27 KB, patch)
2019-03-27 16:21 PDT, Justin Fan
no flags Details | Formatted Diff | Diff
Patch (109.36 KB, patch)
2019-03-28 14:04 PDT, Justin Fan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Fan 2019-03-21 13:07:28 PDT
[Web GPU] Prototype compute pipeline with MSL
Comment 1 Justin Fan 2019-03-21 13:08:48 PDT
<rdar://problem/46289650>
Comment 2 Justin Fan 2019-03-21 15:20:57 PDT
Created attachment 365629 [details]
Patch
Comment 3 Justin Fan 2019-03-21 16:04:26 PDT
Created attachment 365633 [details]
Patch
Comment 4 Justin Fan 2019-03-21 16:16:53 PDT
Created attachment 365635 [details]
Patch
Comment 5 Myles C. Maxfield 2019-03-21 16:22:07 PDT
Comment on attachment 365635 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=365635&action=review

> Source/WebCore/platform/graphics/gpu/GPUProgrammablePassEncoder.h:69
> +    virtual void setVertexBuffer(const MTLBuffer *, unsigned, unsigned) { }
> +    virtual void setFragmentBuffer(const MTLBuffer *, unsigned, unsigned) { }
> +    // Compute.
> +    virtual void setComputeBuffer(const MTLBuffer *, unsigned, unsigned) { }

https://github.com/gpuweb/gpuweb/commit/678d728f20730b03134509c75aaa4f197a3cb8df
Comment 6 Justin Fan 2019-03-21 16:27:44 PDT
(In reply to Myles C. Maxfield from comment #5)
> Comment on attachment 365635 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=365635&action=review
> 
> > Source/WebCore/platform/graphics/gpu/GPUProgrammablePassEncoder.h:69
> > +    virtual void setVertexBuffer(const MTLBuffer *, unsigned, unsigned) { }
> > +    virtual void setFragmentBuffer(const MTLBuffer *, unsigned, unsigned) { }
> > +    // Compute.
> > +    virtual void setComputeBuffer(const MTLBuffer *, unsigned, unsigned) { }
> 
> https://github.com/gpuweb/gpuweb/commit/
> 678d728f20730b03134509c75aaa4f197a3cb8df

I'm using a fat interface here so that setBindGroup can delegate behavior. If it's an error to set a bind group with a compute resource on a render pipeline or vv, we can add validation here.
Comment 7 EWS Watchlist 2019-03-21 18:44:42 PDT
Comment on attachment 365635 [details]
Patch

Attachment 365635 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/11607391

New failing tests:
webgpu/compute-squares.html
http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable.html
Comment 8 EWS Watchlist 2019-03-21 18:44:44 PDT
Created attachment 365662 [details]
Archive of layout-test-results from ews105 for mac-highsierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-highsierra-wk2  Platform: Mac OS X 10.13.6
Comment 9 Justin Fan 2019-03-22 13:44:55 PDT
Created attachment 365757 [details]
Patch
Comment 10 Justin Fan 2019-03-22 14:40:37 PDT
Created attachment 365760 [details]
Patch
Comment 11 EWS Watchlist 2019-03-22 15:46:28 PDT
Comment on attachment 365760 [details]
Patch

Attachment 365760 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/11617360

New failing tests:
imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-constructor.html
webgpu/compute-squares.html
Comment 12 EWS Watchlist 2019-03-22 15:46:30 PDT
Created attachment 365767 [details]
Archive of layout-test-results from ews104 for mac-highsierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-highsierra-wk2  Platform: Mac OS X 10.13.6
Comment 13 Justin Fan 2019-03-22 15:58:31 PDT
Created attachment 365768 [details]
Patch
Comment 14 EWS Watchlist 2019-03-22 17:23:35 PDT
Comment on attachment 365768 [details]
Patch

Attachment 365768 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/11618518

New failing tests:
webgpu/compute-squares.html
Comment 15 EWS Watchlist 2019-03-22 17:23:37 PDT
Created attachment 365785 [details]
Archive of layout-test-results from ews107 for mac-highsierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107  Port: mac-highsierra-wk2  Platform: Mac OS X 10.13.6
Comment 16 Justin Fan 2019-03-23 17:15:38 PDT
Created attachment 365821 [details]
Patch
Comment 17 WebKit Commit Bot 2019-03-23 18:35:19 PDT
Comment on attachment 365821 [details]
Patch

Clearing flags on attachment: 365821

Committed r243419: <https://trac.webkit.org/changeset/243419>
Comment 18 WebKit Commit Bot 2019-03-23 18:35:20 PDT
All reviewed patches have been landed.  Closing bug.
Comment 19 Truitt Savell 2019-03-25 14:04:54 PDT
It looks like the test webgpu/compute-squares.html 

is causing the Mac WK2 bots to crash and become unresponsive, requiring a reboot. 

using this run as an example: https://build.webkit.org/builders/Apple%20Mojave%20Release%20WK2%20%28Tests%29/builds/3301

when you look at the layout-test logs: https://build.webkit.org/builders/Apple%20Mojave%20Release%20WK2%20%28Tests%29/builds/3301/steps/layout-test/logs/stdio

webgpu/command-buffers.html is the last webgpu/ test to run successfully which is followed by the new webgpu/compute-squares.html test. After that point the bots become unresponsive and require reboot. All WK2 layout-tests logs show webgpu/command-buffers.html as the last test to run before the bot fails. 

I am going to roll out this change to confirm and get the bots functioning again.
Comment 20 Truitt Savell 2019-03-25 14:12:30 PDT
Reverted r243419 for reason:

Caused Mac WK2 testers to crash and become unresponsive.

Committed r243457: <https://trac.webkit.org/changeset/243457>
Comment 21 Truitt Savell 2019-03-25 16:19:01 PDT
Created attachment 365916 [details]
Crash log

Attaching a crash log I found on bot198 from today. only found one though the bot has frozen multiple times.
Comment 22 Justin Fan 2019-03-27 16:08:52 PDT
Created attachment 366124 [details]
Patch
Comment 23 Justin Fan 2019-03-27 16:21:23 PDT
Created attachment 366126 [details]
Patch
Comment 24 Justin Fan 2019-03-28 14:04:52 PDT
Created attachment 366201 [details]
Patch
Comment 25 WebKit Commit Bot 2019-03-28 15:13:29 PDT
Comment on attachment 366201 [details]
Patch

Clearing flags on attachment: 366201

Committed r243627: <https://trac.webkit.org/changeset/243627>
Comment 26 WebKit Commit Bot 2019-03-28 15:13:31 PDT
All reviewed patches have been landed.  Closing bug.