
    `i                         d dl Z d dlmZmZ  e            r"d dlZ e e j        dd                    Zd Znd Z	e	Zd Z
dS )    N)is_availablecheck_availableCUPY_TEST_GPU_LIMITz-1c                  .    t          j        j        | i |S )N)pytestmarkslowargskwargss     f/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/cupy/testing/_attr.pyr	   r	      s    {0000    c                  $    t          d           J )Nzpytest attributesr   r
   s     r   _dummy_callabler      s    +,,,ur   c                 @     t          d           d k     sJ  fd}|S )a{  Decorator to indicate number of GPUs required to run the test.

    Tests can be annotated with this decorator (e.g., ``@multi_gpu(2)``) to
    declare number of GPUs required to run. When running tests, if
    ``CUPY_TEST_GPU_LIMIT`` environment variable is set to value greater
    than or equals to 0, test cases that require GPUs more than the limit will
    be skipped.
    zmulti_gpu attribute   c                     t          j                            dt          cxk    ok     nc d                                        t           j                            |                     S )Nr   z{} GPUs required)reason)r   r   skipif
_gpu_limitformat	multi_gpu)fgpu_nums    r   _wrapperzmulti_gpu.<locals>._wrapper&   sq    {!!%%%%g%%%%%,,W55 " 7 7 %%a((* * 	*r   r   )r   r   s   ` r   r   r      sC     )*** w;;;;* * * * *
 Or   )oscupy.testing._pytest_implr   r   r   intgetenvr   r	   r   r    r   r   <module>r"      s    				 D C C C C C C C <>> MMMYRY4d;;<<J1 1 1 1   D    r   