+
     þÎjÝ%  ã                   óä   € ^ RI HtHtHtHtHtHtHt ^ RIH	t	 ^ RI
Ht ^ RIHtHtHt ^ RIt^ RIt^ RIt^ RIt]t]t ! R R]	4      t]P.                  ! 4       t ! R R	4      t ! R
 R4      tR tR# )é    )ÚbyrefÚc_charÚc_char_pÚc_intÚc_size_tÚc_void_pÚPOINTER)ÚIntEnum)Úconfig)Ú
NvrtcErrorÚNvrtcCompilationErrorÚNvrtcSupportErrorNc                   óF   € ] tR t^t^ t^t^t^t^t^t	^t
^t^t^	t^
t^tRtR# )ÚNvrtcResult© N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__ÚNVRTC_SUCCESSÚNVRTC_ERROR_OUT_OF_MEMORYÚ$NVRTC_ERROR_PROGRAM_CREATION_FAILUREÚNVRTC_ERROR_INVALID_INPUTÚNVRTC_ERROR_INVALID_PROGRAMÚNVRTC_ERROR_INVALID_OPTIONÚNVRTC_ERROR_COMPILATIONÚ%NVRTC_ERROR_BUILTIN_OPERATION_FAILUREÚ1NVRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATIONÚ/NVRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATIONÚ%NVRTC_ERROR_NAME_EXPRESSION_NOT_VALIDÚNVRTC_ERROR_INTERNAL_ERRORÚ__static_attributes__r   ó    ÚN/opt/data/home/.local/lib/python3.14/site-packages/numba/cuda/cudadrv/nvrtc.pyr   r      sI   † Ø€MØ !ÐØ+,Ð(Ø !ÐØ"#ÐØ!"ÐØÐØ,-Ð)Ø89Ð5Ø67Ð3Ø,.Ð)Ø!#Ôr#   r   c                   ó@   a € ] tR t^%t o RtR t]R 4       tR tRt	V t
R# )ÚNvrtcProgramzÑ
A class for managing the lifetime of nvrtcProgram instances. Instances of
the class own an nvrtcProgram; when an instance is deleted, the underlying
nvrtcProgram is destroyed using the appropriate NVRTC API.
c                ó   € Wn         W n        R # ©N)Ú_nvrtcÚ_handle)ÚselfÚnvrtcÚhandles   &&&r$   Ú__init__ÚNvrtcProgram.__init__+   s   € ØŒØŽr#   c                ó   € V P                   # r(   )r*   ©r+   s   &r$   r-   ÚNvrtcProgram.handle/   s   € à�|‰|Ðr#   c                ód   € V P                   '       d   V P                  P                  V 4       R # R # r(   )r*   r)   Údestroy_programr1   s   &r$   Ú__del__ÚNvrtcProgram.__del__3   s"   € Ø�<�<ˆ<Ø�K‰K×'Ñ'¨Ö-ñ r#   )r*   r)   N)r   r   r   r   Ú__doc__r.   Úpropertyr-   r5   r"   Ú__classdictcell__©Ú__classdict__s   @r$   r&   r&   %   s-   ø‡ € ñò
ð ñó ð÷.ð .r#   r&   c                   ó.  a € ] tR t^8t o RtR]]! ]4      ]! ]4      3R]]]	]	]]! ]	4      ]! ]	4      3R]]! ]4      3R]]]]! ]	4      3R]]]! ]
4      3R]]]	3R]]]! ]
4      3R	]]]	3R
]]]! ]
4      3R]]]	3/
tRtR tR tR tR tR tR tR tRtV tR# )ÚNVRTCa*  
Provides a Pythonic interface to the NVRTC APIs, abstracting away the C API
calls.

The sole instance of this class is a process-wide singleton, similar to the
NVVM interface. Initialization is protected by a lock and uses the standard
(for Numba) open_cudalib function to load the NVRTC library.
ÚnvrtcVersionÚnvrtcCreateProgramÚnvrtcDestroyProgramÚnvrtcCompileProgramÚnvrtcGetPTXSizeÚnvrtcGetPTXÚnvrtcGetCUBINSizeÚnvrtcGetCUBINÚnvrtcGetProgramLogSizeÚnvrtcGetProgramLogNc                ó2  € \         ;_uu_ 4        V P                  f¤   ^ RIHp \        P                  V 4      ;V n        p V! R4      pTP                  P                  4        FZ  w  rV\        Y54      pT^ ,          Tn        TR,          Tn        \        P                  ! T4      RTRT/R l4       p\        Y%T4       K\  	  R R R 4       V P                  #   \         d   pR T n        \        R4      ThR p?ii ; i  + '       g   i     T P                  # ; i)N)Úopen_cudalibr,   zNVRTC cannot be loaded:é   NNÚfuncÚnamec                 óú   € V ! V!  pV\         P                  8X  d   \        4       hV\         P                  8w  d*    \        V4      P                  pRV RV 2p\        V4      hR#   \
         d
    R T R2p L(i ; i)z"Unknown nvrtc_result (error code: Ú)zFailed to call z: N)r   r   r   r   rL   Ú
ValueErrorr   )rK   rL   ÚargsÚerrorÚ
error_nameÚmsgs   $$*   r$   Úchecked_callÚ#NVRTC.__new__.<locals>.checked_callx   s‘   € á $ d¡˜Ø ¤K×$GÑ$GÔGÜ"7Ó"9Ð9Ø"¤k×&?Ñ&?Ô?ðHÜ-8¸Ó-?×-DÑ-D 
ð %4°D°6¸¸J¸<Ð"H˜CÜ",¨S£/Ð1ñ @øô $.ô Hð/>Ø>C¸WÀAð/G¢
ðHús   ¼A& Á&A:Á9A:)Ú_nvrtc_lockÚ_NVRTC__INSTANCEÚnumba.cuda.cudadrv.libsrI   ÚobjectÚ__new__ÚOSErrorr   Ú_PROTOTYPESÚitemsÚgetattrÚrestypeÚargtypesÚ	functoolsÚwrapsÚsetattr)	ÚclsrI   ÚinstÚlibÚerL   ÚprotorK   rT   s	   &        r$   rZ   ÚNVRTC.__new__g   sû   € ßŽ[Ø�~‰~Ò%Ý@Ü(.¯©°sÓ(;Ð;�” ðMÙ& wÓ/�Cð $(×#3Ñ#3×#9Ñ#9Ö#;‘K�DÜ" 3Ó-�DØ#(¨¥8�D”LØ$)¨"¥I�D”Mä—_’_ TÓ*ð2°ð 2¸Dó 2ó +ð2ô ˜D¨Ö5ñ' $<÷ ð@ �~‰~Ðøô5 ô MØ%)�C”NÜ+Ð,DÓEÈ1ÐLûðMú÷ Ž[ð@ �~‰~Ðús0   �1C;ÁCÁ	A8C;ÃC8Ã C3Ã3C8Ã8C;Ã;D	c                ó¢   € \        4       p\        4       pV P                  \        V4      \        V4      4       VP                  VP                  3# )z2
Get the NVRTC version as a tuple (major, minor).
)r   r>   r   Úvalue)r+   ÚmajorÚminors   &  r$   Úget_versionÚNVRTC.get_versionŠ   s=   € ô “ˆÜ“ˆØ×Ñœ% ›,¬¨e«Ô5Ø�{‰{˜EŸK™KÐ'Ð'r#   c                ó   € \        V\        4      '       d   VP                  4       p\        V\        4      '       d   VP                  4       p\        4       pV P	                  \        V4      W^ RR4       \        W4      # )z0
Create an NVRTC program with managed lifetime.
N)Ú
isinstanceÚstrÚencodeÚnvrtc_programr?   r   r&   )r+   ÚsrcrL   r-   s   &&& r$   Úcreate_programÚNVRTC.create_program“   sb   € ô �cœ3×ÒØ—*‘*“,ˆCÜ�dœC× Ò Ø—;‘;“=ˆDä“ˆð
 	×Ñ¤ f£¨s¸!¸TÀ4ÔHÜ˜DÓ)Ð)r#   c                ó4  € V Uu. uF  q3P                  4       NK  	  ppV Uu. uF  p\        V4      NK  	  pp\        \        V4      ,          pV! V!  p V P                  VP                  \        V4      V4       R# u upi u upi   \
         d     R# i ; i)z¬
Compile an NVRTC program. Compilation may fail due to a user error in
the source; this function returns ``True`` if there is a compilation
error and ``False`` on success.
FT)rs   r   ÚlenrA   r-   r   )r+   ÚprogramÚoptionsÚoptÚencoded_optionsÚoption_pointersÚc_options_typeÚ	c_optionss   &&&     r$   Úcompile_programÚNVRTC.compile_program¤   sŠ   € ñ 4;Ó;±7¨CŸ:™:ž<±7ˆÐ;Ù4CÓD±O¨Sœ8 Cž=±OˆÐDÜ"¤S¨£\Õ1ˆÙ" OÑ4ˆ	ð	Ø×$Ñ$ W§^¡^´S¸³\À9ÔMÙùò <ùÚDøô %ô 	Úð	ús   …A>£BÁ&B ÂBÂBc                óN   € V P                  \        VP                  4      4       R# )z
Destroy an NVRTC program.
N)r@   r   r-   )r+   rz   s   &&r$   r4   ÚNVRTC.destroy_program¶   s   € ð 	× Ñ ¤ w§~¡~Ó!6Ö7r#   c                ó  € \        4       pV P                  VP                  \        V4      4       \        VP
                  ,          ! 4       pV P                  VP                  V4       VP
                  P                  4       # )z)
Get the compile log as a Python string.
)r   rF   r-   r   r   rk   rG   Údecode)r+   rz   Úlog_sizeÚlogs   &&  r$   Úget_compile_logÚNVRTC.get_compile_log¼   s[   € ô “:ˆØ×#Ñ# G§N¡N´E¸(³OÔDä˜Ÿ™Ö&Ó)ˆØ×Ñ §¡°Ô4à�y‰y×ÑÓ!Ð!r#   c                ó  € \        4       pV P                  VP                  \        V4      4       \        VP
                  ,          ! 4       pV P                  VP                  V4       VP
                  P                  4       # )z*
Get the compiled PTX as a Python string.
)r   rB   r-   r   r   rk   rC   r†   )r+   rz   Úptx_sizeÚptxs   &&  r$   Úget_ptxÚNVRTC.get_ptxÈ   s[   € ô “:ˆØ×Ñ˜WŸ^™^¬U°8«_Ô=ä˜Ÿ™Ö&Ó)ˆØ×Ñ˜Ÿ™¨Ô-à�y‰y×ÑÓ!Ð!r#   r   )r   r   r   r   r7   Únvrtc_resultr	   r   rt   r   r   r\   rW   rZ   rn   rv   r�   r4   r‰   rŽ   r"   r9   r:   s   @r$   r=   r=   8   s  ø‡ € ñð 	˜¡w¨u£~±w¸u³~ÐFð 	˜|¨]¸HÀhØ$¡g¨hÓ&7¹ÀÓ9JðLð 	 ©g°mÓ.DÐEð 	 ¨m¸UÙ '¨Ó 1ð 3ð 	˜L¨-¹ÀÓ9JÐKà˜ m°XÐ>ð 	˜l¨M¹7À8Ó;LÐMà˜,¨°xÐ@ð 	! <°Ù#*¨8Ó#4ð#6ð 	˜|¨]¸HÐEðA!€KðH €Jò!òF(ò*ò"ò$8ò
"÷
"ð 
"r#   r=   c                ó8  € \        4       pVP                  W4      pVw  rVRV V 2pR\        P                   2p\        P
                  P                  \        P
                  P                  \        4      4      p	\        P
                  P                  V	4      p
RV
 2pWxVRR.pVP                  WL4      pVP                  V4      pV'       d   RV RV 2p\        V4      hV'       d   RV RV 2p\        P                  ! V4       VP                  V4      pVV3# )aV  
Compile a CUDA C/C++ source to PTX for a given compute capability.

:param src: The source code to compile
:type src: str
:param name: The filename of the source (for information only)
:type name: str
:param cc: A tuple ``(major, minor)`` of the compute capability
:type cc: tuple
:return: The compiled PTX and compilation log
:rtype: tuple
z--gpu-architecture=compute_z-Iz-rdcÚtruez+NVRTC Compilation failure whilst compiling z:

z$NVRTC log messages whilst compiling )r=   rv   r   ÚCUDA_INCLUDE_PATHÚosÚpathÚdirnameÚabspathÚ__file__r�   r‰   r   ÚwarningsÚwarnrŽ   )ru   rL   Úccr,   rz   rl   rm   ÚarchÚincludeÚcudadrv_pathÚnumba_cuda_pathÚnumba_includer{   Úcompile_errorrˆ   rS   r�   s   &&&              r$   Úcompiler¢   Õ   s  € ô ‹G€EØ×"Ñ" 3Ó-€Gð �L€EØ(¨¨°¨wÐ7€DØ”6×+Ñ+Ð,Ð-€Gä—7‘7—?‘?¤2§7¡7§?¡?´8Ó#<Ó=€LÜ—g‘g—o‘o lÓ3€OØ˜Ð)Ð*€MØ˜m¨V°VÐ<€Gð ×)Ñ)¨'Ó;€Mð ×
Ñ
 Ó
(€C÷ Ø<¸T¸FÀ%ÈÀuÐMˆÜ˜‹oÐ÷ Ø5°d°V¸5ÀÀÐFˆÜ�Š�cÔà
�-‰-˜Ó
 €CØ�ˆ8€Or#   )Úctypesr   r   r   r   r   r   r	   Úenumr
   Ú
numba.corer   Únumba.cuda.cudadrv.errorr   r   r   ra   r”   Ú	threadingr™   rt   r�   r   ÚLockrV   r&   r=   r¢   r   r#   r$   Ú<module>r©      sp   ðß N× NÑ NÝ Ý ÷9ñ 9ó Û 	Û Û ð €ð €ô$�'ô $ð �nŠnÓ€÷.ñ .÷&Z"ñ Z"ôz/r#   