calebwin / emu

The write-once-run-anywhere GPGPU library for Rust
https://calebwin.github.io/emu
MIT License
1.59k stars 53 forks source link

Benchmarks #34

Closed jon-chuang closed 4 years ago

jon-chuang commented 4 years ago

Could there be standard benchmarks that also compare against raw WebGPU peeformance? This is important for adoption.

calebwin commented 4 years ago

I'm working on documentation, tests, examples, a Crates.io release, and yes eventually benchmarks.

But I will say that - Emu is a transparent (not opaque) abstraction over WebGPU. This means that you can always convert between Emu data structures and the underlying WebGPU data structures at zero cost. This is also how Emu enables zero-copy interop between compute and graphics.

jon-chuang commented 4 years ago

I see. Is there a roadmap/plan for now? If it is as you say, I may be interested in using for a project.

However, what is the planned interoperability with wasm/wgpu for the web?

From what I understand, one now needs to write kernels in glsl? Is there a plan to get rid of this necessity with something like rlsl?

calebwin commented 4 years ago

Is there a roadmap/plan for now

I'm hoping to finish some of this (meaning documentation, tests, examples, etc.) by end of weekend (can't promise on actually making complicated benchmarks to compare to WebGPU since I'm not a WebGPU expert) and a Crates.io release as soon as wgpu-rs gets its next release (currently Emu just uses the latest git dependency).

what is the planned interoperability with wasm/wgpu for the web?

I am planning to support WASM compilation and I imagine once support lands in wgpu-rs (which should be soon, they already have working demos on Firefox Nightly) there shouldn't be much to change in Emu.

one now needs to write kernels in glsl? Is there a plan to get rid of this necessity with something like rlsl?

Not really. You need to write kernels in SPIR-V and there is high-level functionality that lets you more easily write stuff using GLSL since that's the most popular compile-to-SPIR-V language out there. Unfortunately, RLSL seems to be mostly dead right now. I was thinking about trying to create some sort of low-level language that compiles to SPIR-V but honestly I don't think GLSL is that bad of an option for now.