polars.lazyframe.engine_config.GPUEngine
-
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, monitoring: bool = False, **kwargs: Any, ) → NoneMethods
__init__(*[, device, memory_resource, ...])collect(lf, *, optimizations[, background, ...])Execute
lf, returning aDataFrameor a background query handle.collect_all(lfs, *, optimizations)Execute several queries, potentially in parallel.
collect_all_async(lfs, *, optimizations[, ...])Execute several queries asynchronously.
collect_async(lf, *, optimizations[, gevent])Execute
lfasynchronously.collect_batches(lf, *, optimizations[, ...])Execute
lf, yielding its result in batches.execute(lf, *, optimizations)Execute the query into a
QueryResult.sink_batches(lf, function, *, chunk_size, ...)sink_csv(lf, path, *, include_bom, ...)sink_ipc(lf, path, *, compression, ...)sink_ndjson(lf, path, *, compression, ...)sink_parquet(lf, path, *, compression, ...)Attributes
monitoringWhether queries are monitored (
Noneuses the configured default).nameName of the engine.
plan_engineEngine name used to render query plans.
deviceDevice on which to run query.
memory_resourceMemory resource to use for device allocations.
raise_on_failWhether unsupported queries should raise an error, rather than falling back to the CPU engine.
configAdditional configuration options for the engine.
class polars.lazyframe.engine_config.GPUEngine(
*,
device: int | None = None,
memory_resource: Any | None = None,
raise_on_fail: bool = False,
monitoring: bool = False,
**kwargs: Any,
)
© 2020 Ritchie Vink
© 2022 Polars contributors
Licensed under the MIT License.
https://docs.pola.rs/api/python/stable/reference/lazyframe/api/polars.lazyframe.engine_config.GPUEngine.html