Spec-Zone.ru › Polars

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,
    monitoring: 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 selected device. 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,
) → None

Methods

__init__(*[, device, memory_resource, ...])

collect(lf, *, optimizations[, background, ...])

Execute lf, returning a DataFrame or 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 lf asynchronously.

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, ...)

See polars.LazyFrame.sink_batches().

sink_csv(lf, path, *, include_bom, ...)

See polars.LazyFrame.sink_csv().

sink_ipc(lf, path, *, compression, ...)

See polars.LazyFrame.sink_ipc().

sink_ndjson(lf, path, *, compression, ...)

See polars.LazyFrame.sink_ndjson().

sink_parquet(lf, path, *, compression, ...)

See polars.LazyFrame.sink_parquet().

Attributes

monitoring

Whether queries are monitored (None uses the configured default).

name

Name of the engine.

plan_engine

Engine name used to render query plans.

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.

© 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

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API