burn::backend::wgpu

Function init_device

pub fn init_device(setup: WgpuSetup, options: RuntimeOptions) -> WgpuDevice
Expand description

Create a WgpuDevice on an existing WgpuSetup. Useful when you want to share a device between CubeCL and other wgpu-dependent libraries.

§Note

Please do not to call on the same setup more than once.

This function generates a new, globally unique ID for the device every time it is called, even if called on the same device multiple times.