Skip to content

Materials and examples for using Futhark with WebGPU

Notifications You must be signed in to change notification settings

diku-dk/futhark-webgpu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 

Repository files navigation

futhark-webgpu

This repository is intended to coordinate maturation of the Futhark WebGPU backend, by containing examples and guides until we figure out how to make them part of Futhark proper.

Prerequisites

Browser (Chrome)

WebGPU should work in Chrome without enabling unsafe flags, as long as hardware acceleration is enabled.

Useful pages:

  • chrome://gpu
    • Verify that hardware acceleration is enabled and inspect GPU/WebGPU status.
  • chrome://flags/#enable-unsafe-webgpu
    • Not necessary if hardware acceleration is on (keep default unless you really need it).
  • chrome://flags/#force-high-performance-gpu
    • Optional: forces Chrome to prefer the discrete GPU. WebGPU can run on integrated graphics as well, so this is not required.

Emscripten (emcc) setup

Check installed Emscripten versions

From an emsdk checkout:

./emsdk list | grep -i installed

Known working version

emcc version 5.0.0 works for the current setup.

In order to confirm the emcc version:

emcc -v

Troubleshooting

Device lost / destroyed in Chrome

If when you try a webgpu demo, it shows:

  • Device lost ("destroyed"): Device was destroyed.

Steps that helped:

  • confirm hardware acceleration is enabled in chrome://gpu
  • do not enable #enable-unsafe-webgpu unless needed
  • optionally enable #force-high-performance-gpu on laptops if the integrated GPU driver is unstable

About

Materials and examples for using Futhark with WebGPU

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •