GPUAdapter
- class wgpu.GPUAdapter
Bases:
objectRepresents an abstract wgpu implementation.
An adapter represents both an instance of a hardware accelerator (e.g. GPU or CPU) and an implementation of WGPU on top of that accelerator.
The adapter is used to request a device object. The adapter object enumerates its capabilities (features) and limits.
If an adapter becomes unavailable, it becomes invalid. Once invalid, it never becomes valid again.
- property features: set
A set of feature names supported by the adapter.
- property info: GPUAdapterInfo
Information associated with this adapter.
- property limits: dict
A dict with limits for the adapter.
- request_device(*args, **kwargs)
Backwards compatible method for request_device_sync()
- request_device_async(**parameters)
Request a
GPUDevicefrom the adapter.- Parameters:
label (str) – A human-readable label. Optional.
required_features (list of str) – the features (extensions) that you need. Default [].
required_limits (dict) – the various limits that you need. Default {}.
default_queue (
structs.QueueDescriptor) – Descriptor for the default queue. Optional.
- request_device_sync(**parameters)
Sync version of
request_device_async().Provided by wgpu-py, but not compatible with WebGPU.
- property summary: str
A one-line summary of the info of this adapter (device, adapter_type, backend_type).