# Burn WGPU Backend
[Burn](https://github.com/burn-rs/burn) WGPU backend
[](https://crates.io/crates/burn-wgpu)
[](https://github.com/burn-rs/burn-wgpu/blob/master/README.md)
This crate provides a WGPU backend for [Burn](https://github.com/burn-rs/burn) using the
[wgpu](https://github.com/gfx-rs/wgpu).
The backend supports Vulkan, Metal, DirectX11/12, OpenGL, WebGPU.
## Usage Example
```rust
#[cfg(feature = "wgpu")]
mod wgpu {
use burn_autodiff::ADBackendDecorator;
use burn_wgpu::{AutoGraphicsApi, WgpuBackend, WgpuDevice};
use mnist::training;
pub fn run() {
let device = WgpuDevice::default();
training::run::<ADBackendDecorator<WgpuBackend<AutoGraphicsApi, f32, i32>>>(device);
}
}
```
## 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.