
    ˀh                    P    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      Z	y)    )annotations)TYPE_CHECKINGAny)Mapping)DeviceMemoryResourcec                  f    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Zy
)	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   c               8    || _         || _        ||d<   || _        y )Nr   )r   r   r   )selfr   r   r   kwargss        z/var/www/html/wine-match-dev/backend/winematch-backend/venv/lib/python3.12/site-packages/polars/lazyframe/engine_config.py__init__zGPUEngine.__init__1   s$     ."/    )
r   r
   r   z
Any | Noner   r   r   r   returnNone)__name__
__module____qualname____doc____annotations__r    r   r   r	   r	      ss    2 '008 :
 "&*#  $	
   
r   r	   N)

__future__r   typingr   r   collections.abcr   rmm.mrr   r	   r   r   r   <module>r"      s    " %'+2 2r   