GPUAdapter
- class wgpu.GPUAdapter
Bases:
object
Represents 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
A set of feature names supported by the adapter.
- property info
A dict with information about this adapter, such as the vendor and device name.
- property is_fallback_adapter
Whether this adapter runs on software (rather than dedicated hardware).
- property limits
A dict with limits for the adapter.
- request_device(*args, **kwargs)
Backwards compatible method for request_device_sync()
- async request_device_async(**parameters)
Request a
GPUDevice
from 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
A one-line summary of the info of this adapter (device, adapter_type, backend_type).