Ë
    øÿæiž  ã                   ó€   — d dl Z eZdZ ee j
                  d«      re j
                  j                  ZdZ G d„ de«      Zy)é    NFÚ_CUDAGreenContextTc                   ót   ‡ — e Zd ZdZed	dededefd„«       Zd
ˆ fd„Zd
ˆ fd„Z	de
j                  fˆ fd„Zˆ xZS )ÚGreenContextzyWrapper around a CUDA green context.

    .. warning::
       This API is in beta and may change in future releases.
    Únum_smsÚ	device_idÚreturnc                 óP   — t         st        d«      ‚t        j                  | |«      S )zÍCreate a CUDA green context.

        Arguments:
            num_sms (int): The number of SMs to use in the green context.
            device_id (int, optional): The device index of green context.
        z1PyTorch was not built with Green Context support!)Ú	SUPPORTEDÚRuntimeErrorÚ_GreenContextÚcreate)r   r   s     ún/Volumes/fast/ai/experiments/voice-extract-mac/.venv/lib/python3.12/site-packages/torch/cuda/green_contexts.pyr   zGreenContext.create   s&   € õ ÜÐRÓSÐSÜ×#Ñ# G¨YÓ7Ð7ó    c                 ó    •— t         ‰| �  «       S )z+Make the green context the current context.)ÚsuperÚset_context©ÚselfÚ	__class__s    €r   r   zGreenContext.set_context#   s   ø€ ä‰wÑ"Ó$Ð$r   c                 ó    •— t         ‰| �  «       S )zƒAssuming the green context is the current context, pop it from the
        context stack and restore the previous context.
        )r   Úpop_contextr   s    €r   r   zGreenContext.pop_context'   s   ø€ ô ‰wÑ"Ó$Ð$r   c                 ó    •— t         ‰| �  «       S )z1Return the CUDA Stream used by the green context.)r   ÚStreamr   s    €r   r   zGreenContext.Stream-   s   ø€ ä‰w‰~ÓÐr   )r   )r   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚstaticmethodÚintr   r   r   r   Útorchr   Ú__classcell__)r   s   @r   r   r      sP   ø„ ñð ñ	8˜ð 	8¨ð 	8°Mò 	8ó ð	8õ%õ%ð ˜Ÿ™÷  ñ  r   r   )r    Úobjectr   r
   ÚhasattrÚ_Cr   r   © r   r   Ú<module>r&      sC   ðÛ ð €Ø€	á
ˆ5�8‰8Ð(Ô)Ø—H‘H×.Ñ.€MØ€Iô
! �=õ ! r   