Skip to main content Crate cubecl_wgpu Copy item path Source pub use wgpu ;AutoGraphicsApi Automatic graphics API based on OS. Dx12 DirectX 12 graphics API. Metal Metal graphics API. OpenGl OpenGL graphics API. RuntimeOptions The values that control how a WGPU Runtime will perform its calculations. Vulkan Vulkan graphics API. WebGpu WebGpu graphics API.WgpuDevice The device struct when using the wgpu backend. WgpuMemory The memory that can be allocated for wgpu. WgpuResource The memory resource that can be allocated for wgpu. WgpuRuntime Runtime that uses the wgpu crate. WgpuServer Wgpu compute server. WgpuSetup A complete setup used to run wgpu. WgpuStorage Buffer storage for wgpu. WgslCompiler Wgsl Compiler. AutoCompiler Compiler that dispatches to the most appropriate shader language backend for the active
wgpu backend. AutoRepresentation Owned compiled kernel representation matching the variants of AutoCompiler . AutoRepresentationRef Borrowed counterpart of AutoRepresentation , useful when only read access is needed. Backend Backends supported by wgpu. CompilerInfo MemoryConfiguration High level configuration of memory management. ParamsTransfer WgpuBackend The graphics API a WgpuDevice comes up on, which also settles the
shader compiler it is fed: SPIR-V on Vulkan, MSL on Metal, WGSL elsewhere. WgpuCompilerInitError An explicitly selected wgpu compiler cannot serve the selected graphics backend or device. WgpuDeviceKind Which of a machine’s wgpu devices, leaving the graphics API aside. WgpuInitError A recoverable failure while acquiring or registering a wgpu runtime. GraphicsApi The basic trait to specify which graphics API to use as Backend. WgpuCompiler Extension trait implemented by every compiler usable with the wgpu runtime. init_device Create a WgpuDevice on an existing WgpuSetup .
Useful when you want to share a device between CubeCL and other wgpu-dependent libraries. init_device_with_api Import a setup with an explicitly selected graphics API. init_setup Like init_setup_async , but synchronous.
On wasm, it is necessary to use init_setup_async instead. init_setup_async Initialize a client on the given device with the given options.
This function is useful to configure the runtime options
or to pick a different graphics API. try_init_device Register an existing setup without changing its enabled GPU capabilities. try_init_device_with_api Register an existing setup with an explicitly selected graphics API. try_init_setup Fallible synchronous initialization. Use try_init_setup_async on wasm. try_init_setup_async Initialize the selected runtime, returning acquisition or registration failures. PipelineEntry Compiler kind and info used when compiling a specific kernel. Used to determine parameter passing strategies.
What a launch needs from a compiled kernel: the pipeline, the parameter
strategy, and the per-buffer IO the taint bookkeeping stages from. The IO
rides in the cache because on a hit nothing else of the compilation
survives.