polars.lazyframe.engine_config.GPUEngine#
- class polars.lazyframe.engine_config.GPUEngine(
- *,
- device: int | None = None,
- memory_resource: Any | None = None,
- raise_on_fail: bool = False,
- **kwargs: Any,
Configuration options for the GPU execution engine.
Use this if you want control over details of the execution.
- Parameters:
- deviceint, default None
Select the GPU used to run the query. If not provided, the query uses the current CUDA device.
- memory_resourcermm.mr.DeviceMemoryResource, default None
Provide a memory resource for GPU memory allocations.
Warning
If passing a
memory_resource
, you must ensure that it is valid for the selecteddevice
. See the RMM documentation for more details.- raise_on_failbool, default False
If True, do not fall back to the Polars CPU engine if the GPU engine cannot execute the query, but instead raise an error.
- __init__(
- *,
- device: int | None = None,
- memory_resource: Any | None = None,
- raise_on_fail: bool = False,
- **kwargs: Any,
Methods
__init__
(*[, device, memory_resource, ...])Attributes
device
Device on which to run query.
memory_resource
Memory resource to use for device allocations.
raise_on_fail
Whether unsupported queries should raise an error, rather than falling back to the CPU engine.
config
Additional configuration options for the engine.