Ë
    xõpi×  ã                   óX   — d dl mZ d dlmZmZmZmZmZ g d¢Zedd„«       Z	edd„«       Z
y)	é    )Úbuiltin)Úasync_copy_global_to_sharedÚasync_copy_shared_to_globalÚ
store_waitÚtensor_descriptorÚtensor_descriptor_type)Úasync_gatherÚasync_scatterr   r   r   r   r   Nc                 ó   — |j                  |«      }|j                  |«      }|j                  j                  | j                  |j                  |j                  |j                  |j                  |j                  «       y)a,  
    Asynchronously gather elements from global memory to shared memory using TMA.

    Args:
        tensor_desc (tensor_descriptor): The tensor descriptor.
        x_offsets (tensor): 1D tensor of X offsets.
        y_offset (int): Scalar Y offset.
        barrier (shared_memory_descriptor): Barrier that will be signaled when the operation is complete.
        result (tensor_memory_descriptor): Result shared memory, must have NVMMASharedLayout.
        pred (bool): Scalar predicate. Operation is skipped if predicate is False. Defaults to True.
    N)Ú	to_tensorÚbuilderÚcreate_async_tma_gatherÚhandle)Útensor_descÚ	x_offsetsÚy_offsetÚbarrierÚresultÚpredÚ	_semantics          úy/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/triton/experimental/gluon/language/nvidia/blackwell/tma.pyr	   r	      sh   € ð ×Ñ˜tÓ$€DØ×"Ñ" 8Ó,€HØ×Ñ×-Ñ-¨k×.@Ñ.@À)×BRÑBRÐT\×TcÑTcÐel×esÑesØ.4¯m©m¸T¿[¹[õJó    c                 ó²   — |j                  |«      }|j                  j                  | j                  |j                  |j                  |j                  «       y)aW  
    Asynchronously scatter elements from shared memory to global memory using TMA.

    Args:
        tensor_desc (tensor_descriptor): The tensor descriptor.
        x_offsets (tensor): 1D tensor of X offsets.
        y_offset (int): Scalar Y offset.
        src (tensor_memory_descriptor): The source data, must be in NVMMASharedLayout.
    N)r   r   Úcreate_async_tma_scatterr   )r   r   r   Úsrcr   s        r   r
   r
   (   sH   € ð ×"Ñ" 8Ó,€HØ×Ñ×.Ñ.¨{×/AÑ/AÀ9×CSÑCSÐU]×UdÑUdÐfi×fpÑfpÕqr   )TN)N)Ú(triton.experimental.gluon.language._corer   Ú4triton.experimental.gluon.language.nvidia.hopper.tmar   r   r   r   r   Ú__all__r	   r
   © r   r   ú<module>r       sE   ðÝ <÷õ ò€ð 	òJó 	ðJð$ 	òró 	ñrr   