Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Burn WGPU Backend
Burn WGPU backend
This crate provides a WGPU backend for Burn using the wgpu.
The backend supports Vulkan, Metal, DirectX11/12, OpenGL, WebGPU.
Usage Example
⚠️ Warning
When using one of thewgpubackends, you may encounter compilation errors related to recursive type evaluation. This is due to complex type nesting within thewgpudependency chain.
To resolve this issue, add the following line at the top of yourmain.rsorlib.rsfile:The default recursion limit (128) is often just below the required depth (typically 130-150) due to deeply nested associated types and trait bounds.
Configuration
You can set BURN_WGPU_MAX_TASKS to a positive integer that determines how many computing tasks are
submitted in batches to the graphics API.
Alternative SPIR-V backend
When targeting Vulkan, the spirv feature flag can be enabled to enable the SPIR-V compiler
backend, which performs significantly better than WGSL. This is especially true for matrix
multiplication, where SPIR-V can make use of TensorCores and run at f16 precision. This isn't
currently supported by WGSL. The compiler can also be selected at runtime by setting the
corresponding generic parameter to either SpirV or Wgsl.
Platform Support
| Option | CPU | GPU | Linux | MacOS | Windows | Android | iOS | WASM |
|---|---|---|---|---|---|---|---|---|
| Metal | No | Yes | No | Yes | No | No | Yes | No |
| Vulkan | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No |
| OpenGL | No | Yes | Yes | Yes | Yes | Yes | Yes | No |
| WebGpu | No | Yes | No | No | No | No | No | Yes |
| Dx11/Dx12 | No | Yes | No | No | Yes | No | No | No |