§
    `ƒi×  ã                   óf   — 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
dS )
é    )Ú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   TNc                 óÔ   — |                      |¦  «        }|                      |¦  «        }|j                             | j        |j        |j        |j        |j        |j        ¦  «         dS )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          ú‹/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/triton/experimental/gluon/language/nvidia/blackwell/tma.pyr	   r	      ss   € ð ×Ò˜tÑ$Ô$€DØ×"Ò" 8Ñ,Ô,€HØÔ×-Ò-¨kÔ.@À)ÔBRÐT\ÔTcÐelÔesØ.4¬m¸T¼[ñJô Jð Jð Jð Jó    c                 ó’   — |                      |¦  «        }|j                             | j        |j        |j        |j        ¦  «         dS )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À9ÔCSÐU]ÔUdÐfiÔfpÑqÔqÐqÐqÐ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       sÂ   ðØ <Ð <Ð <Ð <Ð <Ð <ðð ð ð ð ð ð ð ð ð ð ð ð ð ðð ð €ð 	ðJð Jð Jñ 	„ðJð$ 	ðrð rð rñ 	„ðrð rð rr   