o
    ¹­§i…  ã                   @  sJ   d dl mZ d dlmZmZ erd dlmZ d dlmZ G dd„ dƒZ	dS )é    )Úannotations)ÚTYPE_CHECKINGÚAny)ÚMapping)ÚDeviceMemoryResourcec                   @  sN   e Zd ZU dZded< 	 ded< 	 ded< 	 ded	< 	 d
d
ddœddd„Zd
S )Ú	GPUEngineaq  
    Configuration options for the GPU execution engine.

    Use this if you want control over details of the execution.

    Parameters
    ----------
    device : int, default None
        Select the GPU used to run the query. If not provided, the
        query uses the current CUDA device.
    memory_resource : rmm.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
           <https://github.com/rapidsai/rmm?tab=readme-ov-file#multiple-devices>`_
           for more details.

    raise_on_fail : bool, 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.

    ú
int | NoneÚdevicezDeviceMemoryResource | NoneÚmemory_resourceÚboolÚraise_on_failzMapping[str, Any]ÚconfigNF)r	   r
   r   ú
Any | NoneÚkwargsr   ÚreturnÚNonec                K  s   || _ || _||d< || _d S )Nr   )r	   r
   r   )Úselfr	   r
   r   r   © r   úU/home/app/Keep/.python/lib/python3.10/site-packages/polars/lazyframe/engine_config.pyÚ__init__1   s   
zGPUEngine.__init__)
r	   r   r
   r   r   r   r   r   r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú__annotations__r   r   r   r   r   r      s   
 ûr   N)
Ú
__future__r   Útypingr   r   Úcollections.abcr   Zrmm.mrr   r   r   r   r   r   Ú<module>   s    