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

Add sample code for WebGPU interop #343

Open
huningxin opened this issue Feb 15, 2023 · 1 comment
Open

Add sample code for WebGPU interop #343

huningxin opened this issue Feb 15, 2023 · 1 comment

Comments

@huningxin
Copy link
Contributor

Split from #341, where @wacky6 mentioned

I feel some example code would help with the discussion (I'm not entirely familiar with WebGPU usage): what's the difference between CPU MLGraph.compute() vs. GPU MLGraph.compute() vs. GPU command encoder + WebGPU interop?

I'd agree.

There are samples for MLGraph.compute() (or MLContext.compute() in current spec) in the spec and explainer. Basically the CPU and GPU contexts share the same code path except setting corresponding device type when creating the context.

There is lack of sample of GPU command encoder + WebGPU interop. We prototyped the WebGPU interop before when investigating real-time video processing. The webgpu + webnn blur transformation sample could be a reference. But I'd agree we should add the sample code for WebGPU interop.

/cc @wchao1115

@a-sully
Copy link
Contributor

a-sully commented Feb 2, 2024

Shall we add the webgpu interop label to this issue?

Either that or close this issue, since the approach mentioned in this issue (using a GPU command encoder) is no longer being pursued (#546)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants