ó
    ýZhÝœ  ã                   óÐ  • S SK rS SKrS SKrS SKrS SKrS SKJrJrJ	r	J
r
JrJr  S SKJrJr  S SKJr  S SKJr  S SKJr  S SKJrJr  S SKJr  S S	KJr  S S
KJrJr  S SK J!r!  S SK"J#r#  S SK$J%r%  S SK&J'r'J(r(  S SK)J
r*  S SK+J,r,  S SK+J-r-  S SK.J/r/  / SQr0 " S S\Rb                  5      r2 " S S\35      r4 " S S5      r5 " S S\5      r6 " S S\5      r7 " S S\\Rb                  5      r8g) é    N)ÚconfigÚ	serializeÚsigutilsÚtypesÚtypingÚutils)ÚCacheÚ	CacheImpl)Úglobal_compiler_lock)Ú
Dispatcher)ÚNumbaPerformanceWarning)ÚPurposeÚtypeof)Úget_current_device)Úwrap_arg)Úcompile_cudaÚCUDACompiler)Údriver)Úget_context)Úcuda_target)Úmissing_launch_config_msgÚnormalize_kernel_dimensions)r   ©Úcuda)Ú_dispatcher)Úwarn)ÚhsinÚhcosÚhlogÚhlog10Úhlog2ÚhexpÚhexp10Úhexp2ÚhsqrtÚhrsqrtÚhfloorÚhceilÚhrcpÚhrintÚhtruncÚhdivc                   ó4  ^ • \ rS rSrSr\   SU 4S jj5       r\S 5       r\S 5       r	S r
\S 5       r\S 5       r\U 4S	 j5       rS
 rS r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       rS rS rS rS rSS jrSS jrSS jrS rSrU =r$ )Ú_Kernelé(   zx
CUDA Kernel specialized for a given set of argument types. When called, this
object launches the kernel on the device.
c                 óN  >• U(       a  [        S5      e[        TU ]	  5         SU l        S U l        Xl        X l        X@l        XPl        U=(       d    / U l	        UU
(       a  SOSS.n[        5       R                  n[        U R
                  [        R                  U R                  U R                  UUUUUS9	nUR                  nU R
                  R                   nUR"                  nUR$                  nUR'                  UR(                  UR*                  XEUUUU	5      u  nnU(       d  / nSUR-                  5       ;   U l        U R.                  (       a  SUl        [2         Vs/ s H  nS	U 3UR-                  5       ;   d  M  UPM      nnU(       aq  [4        R6                  R9                  [4        R6                  R;                  [<        5      5      n[4        R6                  R?                  US
5      nURA                  U5        U H  nURC                  U5        M     URD                  U l#        URH                  U l$        URJ                  U l&        UU l'        URP                  U l(        Xðl        UR*                  U l        URR                  U l)        / U l*        / U l+        / U l,        g s  snf )Nz,Cannot compile a device function as a kernelFé   r   )ÚfastmathÚopt©ÚdebugÚlineinfoÚinliner2   Únvvm_optionsÚccÚcudaCGGetIntrinsicHandleTÚ__numba_wrapper_zcpp_function_wrappers.cu)-ÚRuntimeErrorÚsuperÚ__init__Ú
objectmodeÚentry_pointÚpy_funcÚargtypesr5   r6   Ú
extensionsr   Úcompute_capabilityr   r   ÚvoidÚtarget_contextÚ__code__Úco_filenameÚco_firstlinenoÚprepare_cuda_kernelÚlibraryÚfndescÚget_asm_strÚcooperativeÚneeds_cudadevrtÚcuda_fp16_math_funcsÚosÚpathÚdirnameÚabspathÚ__file__ÚjoinÚappendÚadd_linking_fileÚnameÚ
entry_nameÚ	signatureÚtype_annotationÚ_type_annotationÚ_codelibraryÚcall_helperÚenvironmentÚ_referenced_environmentsÚliftedÚreload_init)ÚselfrA   rB   Úlinkr5   r6   r7   r2   rC   Úmax_registersr3   Údevicer8   r9   ÚcresÚtgt_ctxÚcodeÚfilenameÚlinenumÚlibÚkernelÚfnÚresÚbasedirÚfunctions_cu_pathÚfilepathÚ	__class__s                             €Úd/home/gothic/public_html/Fooocus/fooocus_env/lib64/python3.13/site-packages/numba/cuda/dispatcher.pyr>   Ú_Kernel.__init__.   sI  ø€ ö
 ÜÐMÓNÐNä‰ÑÔð  ˆŒð  ˆÔàŒØ ŒØŒ
Ø ŒØ$×*¨ˆŒð !Þ‘1 ñ
ˆô
  Ó!×4Ñ4ˆÜ˜DŸL™L¬%¯*©*°d·m±mØ"&§*¡*Ø%-Ø#)Ø%-Ø)5Ø!ñ#ˆð ×%Ñ%ˆØ�|‰|×$Ñ$ˆØ×#Ñ#ˆØ×%Ñ%ˆØ×1Ñ1°$·,±,ÀÇÁØ27À<Ø2:¸GØ2?óA‰ˆˆVö
 ØˆDð 6¸¿¹Ó9JÑJˆÔà××Ø"&ˆCÔå0ó BÒ0�bØ% b TÐ*¨c¯o©oÓ.?Ñ?÷ Ñ0ˆð Bö ä—g‘g—o‘o¤b§g¡g§o¡o´hÓ&?Ó@ˆGÜ "§¡§¡¨WØ-Gó!IÐà�K‰KÐ)Ô*ãˆHØ× Ñ  Ö*ñ ð !Ÿ+™+ˆŒØŸ™ˆŒØ $× 4Ñ 4ˆÔØˆÔØ×+Ñ+ˆÔð &ÔØ—k‘kˆŒØ×+Ñ+ˆÔØ(*ˆÔ%ØˆŒØˆÕùò;Bs   Å J"Å?J"c                 ó   • U R                   $ ©N)r^   ©rd   s    ru   rK   Ú_Kernel.library‹   s   € à× Ñ Ð ó    c                 ó   • U R                   $ rx   )r]   ry   s    ru   r\   Ú_Kernel.type_annotation�   s   € à×$Ñ$Ð$r{   c                 ó   • U R                   $ rx   )ra   ry   s    ru   Ú_find_referenced_environmentsÚ%_Kernel._find_referenced_environments“   s   € Ø×,Ñ,Ð,r{   c                 ó6   • U R                   R                  5       $ rx   )rF   Úcodegenry   s    ru   r‚   Ú_Kernel.codegen–   s   € à×"Ñ"×*Ñ*Ó,Ð,r{   c                 ó@   • [        U R                  R                  5      $ rx   )Útupler[   Úargsry   s    ru   Úargument_typesÚ_Kernel.argument_typesš   s   € ä�T—^‘^×(Ñ(Ó)Ð)r{   c	                 óÀ   >• U R                  U 5      n	[        X	]  5         SU	l        Xl        X)l        X9l        SU	l        XIl        XYl	        Xil
        Xyl        X‰l        U	$ )ú
Rebuild an instance.
N)Ú__new__r=   r>   r@   rN   rZ   r[   r]   r^   r5   r6   r_   rC   )ÚclsrN   rY   r[   Úcodelibraryr5   r6   r_   rC   Úinstancert   s             €ru   Ú_rebuildÚ_Kernel._rebuildž   sb   ø€ ð —;‘;˜sÓ#ˆäˆcÑ%Ô'à#ˆÔØ*ÔØ"ÔØ&ÔØ$(ˆÔ!Ø +ÔØŒØ$ÔØ*ÔØ(ÔØˆr{   c                 óÂ   • [        U R                  U R                  U R                  U R                  U R
                  U R                  U R                  U R                  S9$ )z×
Reduce the instance for serialization.
Compiled definitions are serialized in PTX form.
Type annotation are discarded.
Thread, block and shared memory configuration are serialized.
Stream information is discarded.
)rN   rY   r[   r�   r5   r6   r_   rC   )	ÚdictrN   rZ   r[   r^   r5   r6   r_   rC   ry   s    ru   Ú_reduce_statesÚ_Kernel._reduce_states´   sL   € ô  × 0Ñ 0°t·±Ø"Ÿn™n¸$×:KÑ:KØŸ*™*¨t¯}©}Ø $× 0Ñ 0¸T¿_¹_ñNð 	Nr{   c                 ó8   • U R                   R                  5         g)z'
Force binding to current CUDA context
N)r^   Ú
get_cufuncry   s    ru   ÚbindÚ_Kernel.bindÁ   s   € ð 	×Ñ×$Ñ$Õ&r{   c                 ó^   • U R                   R                  5       R                  R                  $ )z>
The number of registers used by each thread for this kernel.
)r^   r–   ÚattrsÚregsry   s    ru   Úregs_per_threadÚ_Kernel.regs_per_threadÇ   s%   € ð
 × Ñ ×+Ñ+Ó-×3Ñ3×8Ñ8Ð8r{   c                 ó^   • U R                   R                  5       R                  R                  $ )z4
The amount of constant memory used by this kernel.
)r^   r–   rš   Úconstry   s    ru   Úconst_mem_sizeÚ_Kernel.const_mem_sizeÎ   ó%   € ð
 × Ñ ×+Ñ+Ó-×3Ñ3×9Ñ9Ð9r{   c                 ó^   • U R                   R                  5       R                  R                  $ )z=
The amount of shared memory used per block for this kernel.
)r^   r–   rš   Úsharedry   s    ru   Úshared_mem_per_blockÚ_Kernel.shared_mem_per_blockÕ   s%   € ð
 × Ñ ×+Ñ+Ó-×3Ñ3×:Ñ:Ð:r{   c                 ó^   • U R                   R                  5       R                  R                  $ )z*
The maximum allowable threads per block.
)r^   r–   rš   Ú
maxthreadsry   s    ru   Úmax_threads_per_blockÚ_Kernel.max_threads_per_blockÜ   s%   € ð
 × Ñ ×+Ñ+Ó-×3Ñ3×>Ñ>Ð>r{   c                 ó^   • U R                   R                  5       R                  R                  $ )z=
The amount of local memory used per thread for this kernel.
)r^   r–   rš   Úlocalry   s    ru   Úlocal_mem_per_threadÚ_Kernel.local_mem_per_threadã   r¢   r{   c                 ó6   • U R                   R                  5       $ )z&
Returns the LLVM IR for this kernel.
)r^   Úget_llvm_strry   s    ru   Úinspect_llvmÚ_Kernel.inspect_llvmê   s   € ð × Ñ ×-Ñ-Ó/Ð/r{   c                 ó4   • U R                   R                  US9$ )z'
Returns the PTX code for this kernel.
)r9   )r^   rM   )rd   r9   s     ru   Úinspect_asmÚ_Kernel.inspect_asmð   s   € ð × Ñ ×,Ñ,°Ð,Ð3Ð3r{   c                 ó6   • U R                   R                  5       $ )z^
Returns the CFG of the SASS for this kernel.

Requires nvdisasm to be available on the PATH.
)r^   Úget_sass_cfgry   s    ru   Úinspect_sass_cfgÚ_Kernel.inspect_sass_cfgö   s   € ð × Ñ ×-Ñ-Ó/Ð/r{   c                 ó6   • U R                   R                  5       $ )zX
Returns the SASS code for this kernel.

Requires nvdisasm to be available on the PATH.
)r^   Úget_sassry   s    ru   Úinspect_sassÚ_Kernel.inspect_sassþ   s   € ð × Ñ ×)Ñ)Ó+Ð+r{   c                 óô   • U R                   c  [        S5      eUc  [        R                  n[	        U R
                  < SU R                  < 3US9  [	        SUS9  [	        U R                   US9  [	        SUS9  g)úº
Produce a dump of the Python source of this function annotated with the
corresponding Numba IR and type information. The dump is written to
*file*, or *sys.stdout* if *file* is *None*.
Nz Type annotation is not availableÚ ©ÚfilezP--------------------------------------------------------------------------------zP================================================================================)r]   Ú
ValueErrorÚsysÚstdoutÚprintrZ   r‡   )rd   rÂ   s     ru   Úinspect_typesÚ_Kernel.inspect_types  sg   € ð × Ñ Ñ(ÜÐ?Ó@Ð@à‰<Ü—:‘:ˆDä˜Ÿœ¨$×*=Ó*=Ð>ÀTÒJÜˆh˜TÒ"Üˆd×#Ñ#¨$Ò/Üˆh˜TÓ"r{   c                 óþ   • [        5       nU R                  R                  5       n[        U[        5      (       a  [
        R                  " S U5      nUR                  UUU5      nUR                  R                  nXV-  $ )a•  
Calculates the maximum number of blocks that can be launched for this
kernel in a cooperative grid in the current context, for the given block
and dynamic shared memory sizes.

:param blockdim: Block dimensions, either as a scalar for a 1D block, or
                 a tuple for 2D or 3D blocks.
:param dynsmemsize: Dynamic shared memory size in bytes.
:return: The maximum number of blocks in the grid.
c                 ó
   • X-  $ rx   © )ÚxÚys     ru   Ú<lambda>Ú5_Kernel.max_cooperative_grid_blocks.<locals>.<lambda>&  s   € °Q²Ur{   )
r   r^   r–   Ú
isinstancer…   Ú	functoolsÚreduceÚ$get_active_blocks_per_multiprocessorrg   ÚMULTIPROCESSOR_COUNT)rd   ÚblockdimÚdynsmemsizeÚctxÚcufuncÚactive_per_smÚsm_counts          ru   Úmax_cooperative_grid_blocksÚ#_Kernel.max_cooperative_grid_blocks  sr   € ô ‹mˆØ×"Ñ"×-Ñ-Ó/ˆä�h¤×&Ñ&Ü ×'Ò'Ñ(:¸HÓEˆHØ×@Ñ@ÀØAIØALóNˆð —:‘:×2Ñ2ˆØÑ'Ð'r{   c                 óF  ^• U R                   R                  5       mU R                  (       a{  TR                  S-   nTR                  R                  U5      u  pxU[        R                  " [        R                  5      :X  d   e[        R                  " 5       n	UR                  SUS9  / n
/ n[        U R                  U5       H  u  pÍU R                  XÍXJU5        M     [        R                  (       a   [        R                  R!                  S5      nOS nU=(       a    UR"                  =(       d    Un[        R$                  " TR"                  /UQUQUPUPUP7SU R&                  06  U R                  (       Ga  [        R(                  " [        R*                  " W	5      WW5        U	R,                  S:w  aÑ  U4S jnS Vs/ s H  nU" SU-   5      PM     nnS Vs/ s H  nU" SU-   5      PM     nnU	R,                  nU R.                  R1                  U5      u  nnnUc  S	nO4Uu  nnn[2        R4                  R7                  U5      nS
U< SU< SU< S3nU< SU< SU< 3nU(       a  U< SUS   < 34USS  -   nOU4nU" U6 eU
 H
  nU" 5         M     g s  snf s  snf )NÚ__errcode__r   )ÚstreamrN   c                 óú   >• TR                   R                  TR                  < SU < S35      u  p[        R                  " 5       n[
        R                  " [        R                  " U5      X5        UR                  $ )NÚ__)	ÚmoduleÚget_global_symbolrY   ÚctypesÚc_intr   Údevice_to_hostÚ	addressofÚvalue)rY   ÚmemÚszÚvalrØ   s       €ru   Úload_symbolÚ#_Kernel.launch.<locals>.load_symbolS  s\   ø€ Ø$Ÿm™m×=Ñ=Ø?E¿{¼{Û?Cð?Eó F‘G�Cô !Ÿ,š,›.�CÜ×)Ò)¬&×*:Ò*:¸3Ó*?ÀÔIØŸ9™9Ð$r{   ÚzyxÚtidÚctaidÚ zIn function z, file z, line z, ztid=z ctaid=z: é   )r^   r–   r5   rY   râ   rã   rä   Úsizeofrå   ÚmemsetÚzipr‡   Ú_prepare_argsr   ÚUSE_NV_BINDINGÚbindingÚCUstreamÚhandleÚlaunch_kernelrN   ræ   rç   rè   r_   Úget_exceptionrQ   rR   rT   )rd   r†   ÚgriddimrÕ   rß   Ú	sharedmemÚexcnameÚexcmemÚexcszÚexcvalÚretrÚ
kernelargsÚtÚvÚzero_streamÚstream_handlerì   Úirï   rð   rj   ÚexcclsÚexc_argsÚlocÚlocinfoÚsymrs   ÚlinenoÚprefixÚwbrØ   s                                 @ru   ÚlaunchÚ_Kernel.launch-  sk  ø€ à×"Ñ"×-Ñ-Ó/ˆà�:�:Ø—k‘k MÑ1ˆGØ"ŸM™M×;Ñ;¸GÓD‰MˆFØœFŸMšM¬&¯,©,Ó7Ó7Ð7Ð7Ü—\’\“^ˆFØ�M‰M˜! FˆMÑ+ð ˆàˆ
Ü˜×+Ñ+¨TÖ2‰DˆAØ×Ñ˜q V°:Ö>ñ 3ô × × Ü Ÿ.™.×1Ñ1°!Ó4‰KàˆKà×0 6§=¡=×?°Kˆô 	×Ò˜VŸ]™]ð 	;Ø%ð	;à&ð	;ð 'ð	;ð +ð		;ð
 (ò	;ð *.×)9Ñ)9ò	;ð �:�:ˆ:Ü×!Ò!¤&×"2Ò"2°6Ó":¸FÀEÔJØ�|‰|˜qÓ õ%ñ 8=Ó=²u°!‘{ 5¨1¡9Ö-±u�Ð=Ù;@ÓAº5°a™ W¨q¡[Ö1¹5�ÐAØ—|‘|�Ø(,×(8Ñ(8×(FÑ(FÀtÓ(LÑ%�˜ #à‘;Ø ‘Gà,/Ñ)�C˜ 6Ü!Ÿw™wŸ™¨xÓ8‘HÛFIÛFNÛFLðO�Gó 18»ºeÐD�ÞÛ,2°H¸Q³KÐ @ÐBØ   ˜ñ %‘Hð  &˜w�HÙ˜hÐ'Ð'ó ˆBÙŽDò ùò/ >ùÚAs   ÇJÇJc                 ó<  • [        U R                  5       H  nUR                  UUUUS9u  pM     [        U[        R
                  5      (       Ga¦  [        U5      R                  XC5      n[        R                  n[        R                  " S5      n	[        R                  " S5      n
U" UR                  5      nU" UR                  R                  5      n[        R                  " U5      n[        R                   (       a  [#        U5      n[        R                  " U5      nUR%                  U	5        UR%                  U
5        UR%                  U5        UR%                  U5        UR%                  U5        ['        UR(                  5       H'  nUR%                  U" UR*                  U   5      5        M)     ['        UR(                  5       H'  nUR%                  U" UR,                  U   5      5        M)     g[        U[        R.                  5      (       a+  [1        [        SU-  5      " U5      nUR%                  U5        gU[        R2                  :X  aY  [        R4                  " [6        R2                  " U5      R9                  [6        R:                  5      5      nUR%                  U5        gU[        R<                  :X  a(  [        R>                  " U5      nUR%                  U5        gU[        R@                  :X  a(  [        RB                  " U5      nUR%                  U5        gU[        RD                  :X  a1  [        RF                  " [#        U5      5      nUR%                  U5        gU[        RH                  :X  a_  UR%                  [        RB                  " URJ                  5      5        UR%                  [        RB                  " URL                  5      5        gU[        RN                  :X  a_  UR%                  [        R>                  " URJ                  5      5        UR%                  [        R>                  " URL                  5      5        g[        U[        RP                  [        RR                  45      (       aC  UR%                  [        RT                  " UR9                  [6        RV                  5      5      5        g[        U[        RX                  5      (       al  [        U5      R                  XC5      nURZ                  n[        R                   (       a  [        R                  " [#        U5      5      nUR%                  U5        g[        U[        R\                  5      (       aD  [_        U5      [_        U5      :X  d   e[a        X5       H  u  nnU Rc                  UUX4U5        M     g[        U[        Rd                  5      (       a*   U Rc                  UR                  URf                  X4U5        g[i        X5      e! [h         a    [i        X5      ef = f)z6
Convert arguments to ctypes and append to kernelargs
)rß   r  r   zc_%sN)5ÚreversedrC   Úprepare_argsrÐ   r   ÚArrayr   Ú	to_devicerä   Ú	c_ssize_tÚc_void_pÚsizeÚdtypeÚitemsizer   Údevice_pointerr÷   ÚintrW   ÚrangeÚndimÚshapeÚstridesÚIntegerÚgetattrÚfloat16Úc_uint16ÚnpÚviewÚuint16Úfloat64Úc_doubleÚfloat32Úc_floatÚbooleanÚc_uint8Ú	complex64ÚrealÚimagÚ
complex128Ú
NPDatetimeÚNPTimedeltaÚc_int64Úint64ÚRecordÚdevice_ctypes_pointerÚ	BaseTupleÚlenrõ   rö   Ú
EnumMemberrè   ÚNotImplementedError)rd   Útyrë   rß   r  r  Ú	extensionÚdevaryÚc_intpÚmeminfoÚparentÚnitemsr  ÚptrÚdataÚaxÚcvalÚdevrecr  r  s                       ru   rö   Ú_Kernel._prepare_argsu  sA  € ô " $§/¡/Ö2ˆIØ×,Ñ,ØØØØð	 -ð ‰GˆB‘ñ 3ô �bœ%Ÿ+™+×&Ò&Ü˜c“]×,Ñ,¨TÓ:ˆFä×%Ñ%ˆFä—o’o aÓ(ˆGÜ—_’_ QÓ'ˆFÙ˜FŸK™KÓ(ˆFÙ˜fŸl™l×3Ñ3Ó4ˆHä×'Ò'¨Ó/ˆCä×$×$Ü˜#“h�ä—?’? 3Ó'ˆDà×Ñ˜gÔ&Ø×Ñ˜fÔ%Ø×Ñ˜fÔ%Ø×Ñ˜hÔ'Ø×Ñ˜dÔ#Ü˜FŸK™KÖ(�Ø×!Ñ!¡&¨¯©°bÑ)9Ó":Ö;ñ )ä˜FŸK™KÖ(�Ø×!Ñ!¡&¨¯©¸Ñ);Ó"<Ö=ò )ô ˜œEŸM™M×*Ñ*Üœ6 6¨B¡;Ô/°Ó4ˆDØ×Ñ˜dÕ#à”5—=‘=Ó Ü—?’?¤2§:¢:¨c£?×#7Ñ#7¼¿	¹	Ó#BÓCˆDØ×Ñ˜dÕ#à”5—=‘=Ó Ü—?’? 3Ó'ˆDØ×Ñ˜dÕ#à”5—=‘=Ó Ü—>’> #Ó&ˆDØ×Ñ˜dÕ#à”5—=‘=Ó Ü—>’>¤# c£(Ó+ˆDØ×Ñ˜dÕ#à”5—?‘?Ó"Ø×ÑœfŸnšn¨S¯X©XÓ6Ô7Ø×ÑœfŸnšn¨S¯X©XÓ6Õ7à”5×#Ñ#Ó#Ø×ÑœfŸošo¨c¯h©hÓ7Ô8Ø×ÑœfŸošo¨c¯h©hÓ7Õ8ä˜œU×-Ñ-¬u×/@Ñ/@ÐA×BÑBØ×ÑœfŸnšn¨S¯X©X´b·h±hÓ-?Ó@ÕAä˜œEŸL™L×)Ñ)Ü˜c“]×,Ñ,¨TÓ:ˆFØ×.Ñ.ˆCÜ×$×$Ü—o’o¤c¨#£hÓ/�Ø×Ñ˜cÕ"ä˜œEŸO™O×,Ñ,Ü�r“7œc #›hÓ&Ð&Ð&Ü˜Bž‘��1Ø×"Ñ" 1 a¨°zÖBò %ô ˜œE×,Ñ,×-Ñ-ð3Ø×"Ñ"Ø—H‘H˜cŸi™i¨°zõô & bÓ.Ð.øô	 'ó 3Ü)¨"Ó2Ð2ð3ús   ×(X ØX)r^   ra   r]   rB   r_   rN   r5   rZ   r@   r`   rC   rL   rb   r6   r?   rA   rc   r[   rF   )	NFFFFNNTFrx   )r   ©r   r   ) Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r>   ÚpropertyrK   r\   r   r‚   r‡   Úclassmethodr�   r“   r—   rœ   r    r¥   r©   r­   r±   r´   r¸   r¼   rÇ   rÛ   r  rö   Ú__static_attributes__Ú__classcell__©rt   s   @ru   r.   r.   (   s1  ø† ñð
 Ø;@ØJNØ6;öZó ðZðx ñ!ó ð!ð ñ%ó ð%ò-ð ñ-ó ð-ð ñ*ó ð*ð ôó ðò*Nò'ð ñ9ó ð9ð ñ:ó ð:ð ñ;ó ð;ð ñ?ó ð?ð ñ:ó ð:ò0ò4ò0ò,ô#ô"(ô,F÷P\/ð \/r{   r.   c                   ó&   • \ rS rSrS rS rS rSrg)ÚForAlliÔ  c                 óh   • US:  a  [        SU-  5      eXl        X l        X0l        X@l        XPl        g )Nr   z0Can't create ForAll with negative task count: %s)rÃ   Ú
dispatcherÚntasksÚthread_per_blockrß   rþ   )rd   rZ  r[  Útpbrß   rþ   s         ru   r>   ÚForAll.__init__Õ  s;   € Ø�A‹:ÜÐOØ%ñ&ó 'ð 'à$ŒØŒØ #ÔØŒØ"�r{   c                 ó.  • U R                   S:X  a  g U R                  R                  (       a  U R                  nOU R                  R                  " U6 nU R	                  U5      nU R                   U-   S-
  U-  nX$X0R
                  U R                  4   " U6 $ )Nr   rò   )r[  rZ  ÚspecializedÚ
specializeÚ_compute_thread_per_blockrß   rþ   )rd   r†   r`  rÕ   rý   s        ru   Ú__call__ÚForAll.__call__ß  sŠ   € Ø�;‰;˜!ÓØà�?‰?×&×&ØŸ/™/‰KàŸ/™/×4Ò4°dÐ;ˆKØ×1Ñ1°+Ó>ˆØ—;‘; Ñ)¨AÑ-°(Ñ:ˆà H¯k©kØŸ>™>ð*ò +Ø,0ð2ð 	2r{   c                 ó  • U R                   nUS:w  a  U$ [        5       n[        [        UR                  R                  5       5      5      n[        UR                  R                  5       SU R                  SS9nUR                  " S0 UD6u  pbU$ )Nr   i   )ÚfuncÚb2d_funcÚmemsizeÚblocksizelimitrË   )r\  r   ÚnextÚiterÚ	overloadsÚvaluesr’   r^   r–   rþ   Úget_max_potential_block_size)rd   rZ  r]  r×   rn   ÚkwargsÚ_s          ru   rb  Ú ForAll._compute_thread_per_blockí  s‡   € Ø×#Ñ#ˆà�!‹8ØˆJô “-ˆCô œ$˜z×3Ñ3×:Ñ:Ó<Ó=Ó>ˆFÜØ×(Ñ(×3Ñ3Ó5ØØŸ™Ø#ñ	ˆFð ×5Ò5Ñ?¸Ñ?‰FˆAØˆJr{   )rZ  r[  rþ   rß   r\  N)rM  rN  rO  rP  r>   rc  rb  rT  rË   r{   ru   rX  rX  Ô  s   † ò#ò2õr{   rX  c                   ó    • \ rS rSrS rS rSrg)Ú_LaunchConfigurationi  c                 óÒ   • Xl         X l        X0l        X@l        XPl        [
        R                  (       a4  SnUS   US   -  US   -  nXv:  a  SU S3n[        [        U5      5        g g g )Né€   r   rò   é   z
Grid size zB will likely result in GPU under-utilization due to low occupancy.)	rZ  rý   rÕ   rß   rþ   r   ÚCUDA_LOW_OCCUPANCY_WARNINGSr   r   )	rd   rZ  rý   rÕ   rß   rþ   Úmin_grid_sizeÚ	grid_sizeÚmsgs	            ru   r>   Ú_LaunchConfiguration.__init__  sy   € Ø$ŒØŒØ ŒØŒØ"Œä×-×-ð  ˆMØ ™
 W¨Q¡ZÑ/°'¸!±*Ñ<ˆIØÓ(Ø# I ;ð /Að A�äÔ,¨SÓ1Õ2ð )ð .r{   c                 óŽ   • U R                   R                  XR                  U R                  U R                  U R
                  5      $ rx   )rZ  Úcallrý   rÕ   rß   rþ   ©rd   r†   s     ru   rc  Ú_LaunchConfiguration.__call__  s4   € Ø�‰×#Ñ# D¯,©,¸¿¹Ø$(§K¡K°·±óAð 	Ar{   )rÕ   rZ  rý   rþ   rß   N)rM  rN  rO  rP  r>   rc  rT  rË   r{   ru   rs  rs    s   † ò3õ.Ar{   rs  c                   ó&   • \ rS rSrS rS rS rSrg)ÚCUDACacheImpli  c                 ó"   • UR                  5       $ rx   )r“   )rd   rn   s     ru   rÒ   ÚCUDACacheImpl.reduce   s   € Ø×$Ñ$Ó&Ð&r{   c                 ó.   • [         R                  " S0 UD6$ )NrË   )r.   r�   )rd   rF   Úpayloads      ru   ÚrebuildÚCUDACacheImpl.rebuild#  s   € Ü×ÒÑ* 'Ñ*Ð*r{   c                 ó   • g)NTrË   )rd   rh   s     ru   Úcheck_cachableÚCUDACacheImpl.check_cachable&  s   € ð r{   rË   N)rM  rN  rO  rP  rÒ   r†  r‰  rT  rË   r{   ru   r�  r�    s   † ò'ò+õr{   r�  c                   ó0   ^ • \ rS rSrSr\rU 4S jrSrU =r	$ )Ú	CUDACachei1  zK
Implements a cache that saves and loads CUDA kernels and compile results.
c                 ót   >• SSK Jn  U" S5         [        TU ]  X5      sS S S 5        $ ! , (       d  f       g = f)Nr   )Útarget_overrider   )Únumba.core.target_extensionrŽ  r=   Úload_overload)rd   ÚsigrF   rŽ  rt   s       €ru   r�  ÚCUDACache.load_overload7  s*   ø€ õ 	@Ù˜VÕ$Ü‘7Ñ(¨Ó=÷ %×$×$ús   �)©
7rË   )
rM  rN  rO  rP  rQ  r�  Ú_impl_classr�  rT  rU  rV  s   @ru   rŒ  rŒ  1  s   ø† ñð  €K÷>ó >r{   rŒ  c                   ód  ^ • \ rS rSrSrSr\r\4U 4S jjr	\
S 5       rS r\R                  " SS9S$S	 j5       rS
 rS%S jr\
S 5       rS rS rS rS rS r\
S 5       rS&S jrS&S jrS&S jrS&S jrS&S jrS rS&S jrS r S r!S&S jr"S&S jr#S&S jr$S&S jr%S&S  jr&\'S! 5       r(S" r)S#r*U =r+$ )'ÚCUDADispatcheri@  az  
CUDA Dispatcher object. When configured and called, the dispatcher will
specialize itself for the given arguments (if no suitable specialized
version already exists) & compute capability, and launch on the device
associated with the current context.

Dispatcher objects are not to be constructed by the user, but instead are
created using the :func:`numba.cuda.jit` decorator.
Fc                 ó>   >• [         TU ]  XUS9  SU l        0 U l        g )N)ÚtargetoptionsÚpipeline_classF)r=   r>   Ú_specializedÚspecializations)rd   rA   r—  r˜  rt   s       €ru   r>   ÚCUDADispatcher.__init__R  s.   ø€ Ü‰Ñ˜Ø(6ð 	ñ 	8ð "ˆÔð  "ˆÕr{   c                 ó.   • [         R                  " U 5      $ rx   )Ú
cuda_typesr•  ry   s    ru   Ú_numba_type_ÚCUDADispatcher._numba_type_b  s   € ä×(Ò(¨Ó.Ð.r{   c                 ó8   • [        U R                  5      U l        g rx   )rŒ  rA   Ú_cachery   s    ru   Úenable_cachingÚCUDADispatcher.enable_cachingf  s   € Ü §¡Ó-ˆ�r{   ru  )Úmaxsizec                 ó6   • [        X5      u  p[        XX#U5      $ rx   )r   rs  )rd   rý   rÕ   rß   rþ   s        ru   Ú	configureÚCUDADispatcher.configurei  s   € ä7¸ÓJÑˆÜ# D°8ÀYÓOÐOr{   c                 óT   • [        U5      S;  a  [        S5      eU R                  " U6 $ )N)rv  r1   é   z.must specify at least the griddim and blockdim)r<  rÃ   r¦  r~  s     ru   Ú__getitem__ÚCUDADispatcher.__getitem__n  s)   € Üˆt‹9˜IÓ%ÜÐMÓNÐNØ�~Š~˜tÐ$Ð$r{   c                 ó   • [        XX#US9$ )aÃ  Returns a 1D-configured dispatcher for a given number of tasks.

This assumes that:

- the kernel maps the Global Thread ID ``cuda.grid(1)`` to tasks on a
  1-1 basis.
- the kernel checks that the Global Thread ID is upper-bounded by
  ``ntasks``, and does nothing if it is not.

:param ntasks: The number of tasks.
:param tpb: The size of a block. An appropriate value is chosen if this
            parameter is not supplied.
:param stream: The stream on which the configured dispatcher will be
               launched.
:param sharedmem: The number of bytes of dynamic shared memory required
                  by the kernel.
:return: A configured dispatcher, ready to launch on a set of
         arguments.)r]  rß   rþ   )rX  )rd   r[  r]  rß   rþ   s        ru   ÚforallÚCUDADispatcher.foralls  s   € ô( �d¨ÀiÑPÐPr{   c                 ó8   • U R                   R                  S5      $ )aã  
A list of objects that must have a `prepare_args` function. When a
specialized kernel is called, each argument will be passed through
to the `prepare_args` (from the last object in this list to the
first). The arguments to `prepare_args` are:

- `ty` the numba type of the argument
- `val` the argument value itself
- `stream` the CUDA stream used for the current call to the kernel
- `retr` a list of zero-arg functions that you may want to append
  post-call cleanup work to.

The `prepare_args` function must return a tuple `(ty, val)`, which
will be passed in turn to the next right-most `extension`. After all
the extensions have been called, the resulting `(ty, val)` will be
passed into Numba's default argument marshalling logic.
rC   )r—  Úgetry   s    ru   rC   ÚCUDADispatcher.extensions‰  s   € ð& ×!Ñ!×%Ñ% lÓ3Ð3r{   c                 ó    • [        [        5      erx   )rÃ   r   )rd   r†   ro  s      ru   rc  ÚCUDADispatcher.__call__ž  s   € äÔ2Ó3Ð3r{   c                 óè   • U R                   (       a-  [        [        U R                  R	                  5       5      5      nO![
        R                  R                  " U /UQ76 nUR                  XX4U5        g)z:
Compile if necessary and invoke this kernel with *args*.
N)	r`  rj  rk  rl  rm  r   r   Ú
_cuda_callr  )rd   r†   rý   rÕ   rß   rþ   rn   s          ru   r}  ÚCUDADispatcher.call¢  sT   € ð ××Üœ$˜tŸ~™~×4Ñ4Ó6Ó7Ó8‰Fä ×+Ñ+×6Ò6°tÐC¸dÒCˆFà�‰�d X°yÕAr{   c                 ó’   • U(       a   eU Vs/ s H  o0R                  U5      PM     nnU R                  [        U5      5      $ s  snf rx   )Útypeof_pyvalÚcompiler…   )rd   r†   ÚkwsÚarB   s        ru   Ú_compile_for_argsÚ CUDADispatcher._compile_for_args­  s>   € æˆˆwÙ26Ó7²$¨Q×%Ñ% aÖ(±$ˆÐ7Ø�|‰|œE (›OÓ,Ð,ùò 8s   ŽAc                 óê   •  [        U[        R                  5      $ ! [         aL    [        R
                  " U5      (       a/  [        [        R                  " USS9[        R                  5      s $ e f = f)NF)Úsync)r   r   ÚargumentrÃ   r   Úis_cuda_arrayÚas_cuda_array)rd   rë   s     ru   r¸  ÚCUDADispatcher.typeof_pyval³  sf   € ð		Ü˜#œw×/Ñ/Ó0Ð0øÜó 	Ü×!Ò! #×&Ñ&ô œd×0Ò0°¸5ÑAÜ%×.Ñ.ó0ò 0ð ð	ús   ‚ œAA2Á0A2c                 óŒ  ^ • T R                   (       a  [        S5      e[        5       R                  n[	        U 4S jU 5       5      nT R
                  R                  X#45      nU(       a  U$ T R                  n[        T R                  US9nUR                  U5        UR                  5         SUl        UT R
                  X#4'   U$ )zL
Create a new instance of this dispatcher specialized for the given
*args*.
zDispatcher already specializedc              3   óF   >#   • U  H  nTR                  U5      v •  M     g 7frx   )r¸  )Ú.0r»  rd   s     €ru   Ú	<genexpr>Ú,CUDADispatcher.specialize.<locals>.<genexpr>Ê  s   øé € Ð<²t°!˜×*Ñ*¨1×-Ð-²tùs   ƒ!)r—  T)r`  r<   r   rD   r…   rš  r°  r—  r•  rA   r¹  Údisable_compiler™  )rd   r†   r9   rB   Úspecializationr—  s   `     ru   ra  ÚCUDADispatcher.specializeÁ  s²   ø€ ð
 ××ÜÐ?Ó@Ð@äÓ!×4Ñ4ˆÜÔ<±tÓ<Ó<ˆà×-Ñ-×1Ñ1°2°.ÓAˆÞØ!Ð!à×*Ñ*ˆÜ'¨¯©Ø6CñEˆà×Ñ˜xÔ(Ø×&Ñ&Ô(Ø&*ˆÔ#Ø-;ˆ×Ñ˜R˜\Ñ*ØÐr{   c                 ó   • U R                   $ )z.
True if the Dispatcher has been specialized.
)r™  ry   s    ru   r`  ÚCUDADispatcher.specializedÙ  s   € ð
 × Ñ Ð r{   c                 óZ  • Ub#  U R                   UR                     R                  $ U R                  (       a6  [	        [        U R                   R                  5       5      5      R                  $ U R                   R                  5        VVs0 s H  u  p#X#R                  _M     snn$ s  snnf )a‘  
Returns the number of registers used by each thread in this kernel for
the device in the current context.

:param signature: The signature of the compiled kernel to get register
                  usage for. This may be omitted for a specialized
                  kernel.
:return: The number of registers used by the compiled variant of the
         kernel for the given signature and current device.
)rl  r†   rœ   r`  rj  rk  rm  Úitems©rd   r[   r‘  Úoverloads       ru   Úget_regs_per_threadÚ"CUDADispatcher.get_regs_per_threadà  s’   € ð Ñ Ø—>‘> )§.¡.Ñ1×AÑAÐAØ××Üœ˜TŸ^™^×2Ñ2Ó4Ó5Ó6×FÑFÐFð *.¯©×)=Ñ)=Ô)?ôAÚ)?™˜ð ×1Ñ1Ò1Ù)?òAð Aùó Aó   ÂB'c                 óZ  • Ub#  U R                   UR                     R                  $ U R                  (       a6  [	        [        U R                   R                  5       5      5      R                  $ U R                   R                  5        VVs0 s H  u  p#X#R                  _M     snn$ s  snnf )a±  
Returns the size in bytes of constant memory used by this kernel for
the device in the current context.

:param signature: The signature of the compiled kernel to get constant
                  memory usage for. This may be omitted for a
                  specialized kernel.
:return: The size in bytes of constant memory allocated by the
         compiled variant of the kernel for the given signature and
         current device.
)rl  r†   r    r`  rj  rk  rm  rÏ  rÐ  s       ru   Úget_const_mem_sizeÚ!CUDADispatcher.get_const_mem_sizeó  s’   € ð Ñ Ø—>‘> )§.¡.Ñ1×@Ñ@Ð@Ø××Üœ˜TŸ^™^×2Ñ2Ó4Ó5Ó6×EÑEÐEð *.¯©×)=Ñ)=Ô)?ôAÚ)?™˜ð ×0Ñ0Ò0Ù)?òAð Aùó ArÔ  c                 óZ  • Ub#  U R                   UR                     R                  $ U R                  (       a6  [	        [        U R                   R                  5       5      5      R                  $ U R                   R                  5        VVs0 s H  u  p#X#R                  _M     snn$ s  snnf )a†  
Returns the size in bytes of statically allocated shared memory
for this kernel.

:param signature: The signature of the compiled kernel to get shared
                  memory usage for. This may be omitted for a
                  specialized kernel.
:return: The amount of shared memory allocated by the compiled variant
         of the kernel for the given signature and current device.
)rl  r†   r¥   r`  rj  rk  rm  rÏ  rÐ  s       ru   Úget_shared_mem_per_blockÚ'CUDADispatcher.get_shared_mem_per_block  ó’   € ð Ñ Ø—>‘> )§.¡.Ñ1×FÑFÐFØ××Üœ˜TŸ^™^×2Ñ2Ó4Ó5Ó6×KÑKÐKð *.¯©×)=Ñ)=Ô)?ôAÚ)?™˜ð ×6Ñ6Ò6Ù)?òAð Aùó ArÔ  c                 óZ  • Ub#  U R                   UR                     R                  $ U R                  (       a6  [	        [        U R                   R                  5       5      5      R                  $ U R                   R                  5        VVs0 s H  u  p#X#R                  _M     snn$ s  snnf )aØ  
Returns the maximum allowable number of threads per block
for this kernel. Exceeding this threshold will result in
the kernel failing to launch.

:param signature: The signature of the compiled kernel to get the max
                  threads per block for. This may be omitted for a
                  specialized kernel.
:return: The maximum allowable threads per block for the compiled
         variant of the kernel for the given signature and current
         device.
)rl  r†   r©   r`  rj  rk  rm  rÏ  rÐ  s       ru   Úget_max_threads_per_blockÚ(CUDADispatcher.get_max_threads_per_block  s’   € ð Ñ Ø—>‘> )§.¡.Ñ1×GÑGÐGØ××Üœ˜TŸ^™^×2Ñ2Ó4Ó5Ó6×LÑLÐLð *.¯©×)=Ñ)=Ô)?ôAÚ)?™˜ð ×7Ñ7Ò7Ù)?òAð Aùó ArÔ  c                 óZ  • Ub#  U R                   UR                     R                  $ U R                  (       a6  [	        [        U R                   R                  5       5      5      R                  $ U R                   R                  5        VVs0 s H  u  p#X#R                  _M     snn$ s  snnf )ay  
Returns the size in bytes of local memory per thread
for this kernel.

:param signature: The signature of the compiled kernel to get local
                  memory usage for. This may be omitted for a
                  specialized kernel.
:return: The amount of local memory allocated by the compiled variant
         of the kernel for the given signature and current device.
)rl  r†   r­   r`  rj  rk  rm  rÏ  rÐ  s       ru   Úget_local_mem_per_threadÚ'CUDADispatcher.get_local_mem_per_thread/  rÛ  rÔ  c                 ó,  • U R                   (       a  U R                  [        U5      5        U R                  R                  nSR                  U5      n[        R                  " XCU R                  S9n[        R                  " U R                  5      nXVX4$ )z¸
Get a typing.ConcreteTemplate for this dispatcher and the given
*args* and *kws* types.  This allows resolution of the return type.

A (template, pysig, args, kws) tuple is returned.
zCallTemplate({0}))ÚkeyÚ
signatures)Ú_can_compileÚcompile_devicer…   rA   rM  Úformatr   Úmake_concrete_templateÚnopython_signaturesr   Úpysignature)rd   r†   rº  Ú	func_namerY   Úcall_templateÚpysigs          ru   Úget_call_templateÚ CUDADispatcher.get_call_templateB  s{   € ð ××Ø×Ñ¤ d£Ô,ð —L‘L×)Ñ)ˆ	Ø"×)Ñ)¨)Ó4ˆä×5Ò5Ø¨D×,DÑ,DñFˆä×!Ò! $§,¡,Ó/ˆà TÐ.Ð.r{   c                 ó¬  • XR                   ;  Ga"  U R                     U R                  R                  S5      nU R                  R                  S5      nU R                  R                  S5      nU R                  R                  S5      nU R                  R                  S5      (       a  SOSUS.n[	        5       R
                  n[        U R                  X!UUUUUUS	9	n	X�R                   U'   U	R                  R                  U	R                  U	R                  U	R                  /5        S
S
S
5        U	$ U R                   U   n	U	$ ! , (       d  f       W	$ = f)z®Compile the device function for the given argument types.

Each signature is compiled once by caching the compiled function inside
this object.

Returns the `CompileResult`.
r5   r6   r7   r2   r3   r1   r   )r3   r2   r4   N)rl  Ú_compiling_counterr—  r°  r   rD   r   rA   rF   Úinsert_user_functionr@   rL   rK   )
rd   r†   Úreturn_typer5   r6   r7   r2   r8   r9   rh   s
             ru   ræ  ÚCUDADispatcher.compile_device]  s6  € ð —~‘~Ô%Ø×(Ó(à×*Ñ*×.Ñ.¨wÓ7�Ø×-Ñ-×1Ñ1°*Ó=�Ø×+Ñ+×/Ñ/°Ó9�Ø×-Ñ-×1Ñ1°*Ó=�ð !%× 2Ñ 2× 6Ñ 6°u× =Ñ =™1À1Ø (ñ �ô
 (Ó)×<Ñ<�Ü# D§L¡L°+Ø*/Ø-5Ø+1Ø-5Ø1=Ø')ñ+�ð (,—‘˜tÑ$à×#Ñ#×8Ñ8¸×9IÑ9IØ9=¿¹Ø:>¿,¹,¸ôI÷- )ð8 ˆð —>‘> $Ñ'ˆDàˆ÷9 )Ô(ð8 ˆús   �DEÅ
Ec                 ó€   • U Vs/ s H  o3R                   PM     nnU R                  XASS9  XR                  U'   g s  snf )NTr   )Ú_codeÚ_insertrl  )rd   rn   rB   r»  Úc_sigs        ru   Úadd_overloadÚCUDADispatcher.add_overload„  s9   € Ù"*Ó+¢(˜Q—”¡(ˆÐ+Ø�‰�U¨ˆÑ.Ø#)�‰�xÒ ùò ,s   …;c                 óÂ  • [         R                  " U5      u  p#Ub  U[        R                  :X  d   eU R                  (       a,  [        [        U R                  R                  5       5      5      $ U R                  R                  U5      nUb  U$ U R                  R                  XR                  5      nUb  U R                  U==   S-  ss'   OU R                  U==   S-  ss'   U R                  (       d  [!        S5      e[#        U R$                  U40 U R&                  D6nUR)                  5         U R                  R+                  X5        U R-                  XB5        U$ )zg
Compile and bind to the current context a version of this kernel
specialized for the given signature.
rò   zCompilation disabled)r   Únormalize_signaturer   Únoner`  rj  rk  rl  rm  r°  r¡  r�  Ú	targetctxÚ_cache_hitsÚ_cache_missesrå  r<   r.   rA   r—  r—   Úsave_overloadrù  )rd   r‘  rB   ró  rn   s        ru   r¹  ÚCUDADispatcher.compile‰  s!  € ô
 !)× <Ò <¸SÓ AÑˆØÑ" k´U·Z±ZÓ&?Ð?Ð?ð ××Üœ˜TŸ^™^×2Ñ2Ó4Ó5Ó6Ð6à—^‘^×'Ñ'¨Ó1ˆFØÑ!Ø�ð —‘×*Ñ*¨3·±Ó?ˆàÑØ×Ñ˜SÓ! QÑ&Ô!ð ×Ñ˜sÓ# qÑ(Ó#Ø×$×$Ü"Ð#9Ó:Ð:ä˜TŸ\™\¨8ÑJ°t×7IÑ7IÑJˆFà�K‰KŒMØ�K‰K×%Ñ% cÔ2à×Ñ˜&Ô+àˆr{   c                 ó  • U R                   R                  S5      nUbK  U(       a'  U R                  U   R                  R	                  5       $ U R                  U   R                  5       $ U(       aG  U R                  R                  5        VVs0 s H  u  p4X4R                  R	                  5       _M!     snn$ U R                  R                  5        VVs0 s H  u  p4X4R                  5       _M     snn$ s  snnf s  snnf )zË
Return the LLVM IR for this kernel.

:param signature: A tuple of argument types.
:return: The LLVM IR for the given signature, or a dict of LLVM IR
         for all previously-encountered signatures.

rg   )r—  r°  rl  rK   r°   r±   rÏ  )rd   r[   rg   r‘  rÑ  s        ru   r±   ÚCUDADispatcher.inspect_llvm­  sì   € ð ×#Ñ#×'Ñ'¨Ó1ˆØÑ ÞØ—~‘~ iÑ0×8Ñ8×EÑEÓGÐGà—~‘~ iÑ0×=Ñ=Ó?Ð?æà-1¯^©^×-AÑ-AÔ-CôEÚ-C™M˜Cð ×-Ñ-×:Ñ:Ó<Ò<Ù-CòEð Eð .2¯^©^×-AÑ-AÔ-CôEÚ-C™M˜Cð ×2Ñ2Ó4Ò4Ù-CòEð EùóEùóEs   Â&C5ÃC;c                 ó2  • [        5       R                  nU R                  R                  S5      nUbM  U(       a(  U R                  U   R
                  R                  U5      $ U R                  U   R                  U5      $ U(       aH  U R                  R                  5        VVs0 s H   u  pEXER
                  R                  U5      _M"     snn$ U R                  R                  5        VVs0 s H  u  pEXER                  U5      _M     snn$ s  snnf s  snnf )zû
Return this kernel's PTX assembly code for for the device in the
current context.

:param signature: A tuple of argument types.
:return: The PTX code for the given signature, or a dict of PTX codes
         for all previously-encountered signatures.
rg   )	r   rD   r—  r°  rl  rK   rM   r´   rÏ  )rd   r[   r9   rg   r‘  rÑ  s         ru   r´   ÚCUDADispatcher.inspect_asmÄ  s  € ô  Ó!×4Ñ4ˆØ×#Ñ#×'Ñ'¨Ó1ˆØÑ ÞØ—~‘~ iÑ0×8Ñ8×DÑDÀRÓHÐHà—~‘~ iÑ0×<Ñ<¸RÓ@Ð@æà-1¯^©^×-AÑ-AÔ-CôEÚ-C™M˜Cð ×-Ñ-×9Ñ9¸"Ó=Ò=Ù-CòEð Eð .2¯^©^×-AÑ-AÔ-CôEÚ-C™M˜Cð ×1Ñ1°"Ó5Ò5Ù-CòEð EùóEùóEs   Â$'DÃ,Dc                 ó  • U R                   R                  S5      (       a  [        S5      eUb  U R                  U   R	                  5       $ U R                  R                  5        VVs0 s H  u  p#X#R	                  5       _M     snn$ s  snnf )aK  
Return this kernel's CFG for the device in the current context.

:param signature: A tuple of argument types.
:return: The CFG for the given signature, or a dict of CFGs
         for all previously-encountered signatures.

The CFG for the device in the current context is returned.

Requires nvdisasm to be available on the PATH.
rg   z'Cannot get the CFG of a device function)r—  r°  r<   rl  r¸   rÏ  ©rd   r[   r‘  Údefns       ru   r¸   ÚCUDADispatcher.inspect_sass_cfgÜ  s‡   € ð ×Ñ×!Ñ! (×+Ñ+ÜÐHÓIÐIàÑ Ø—>‘> )Ñ,×=Ñ=Ó?Ð?ð &*§^¡^×%9Ñ%9Ô%;ô=Ú%;™	˜ð ×.Ñ.Ó0Ò0Ù%;ò=ð =ùó =ó   Á)B	c                 ó  • U R                   R                  S5      (       a  [        S5      eUb  U R                  U   R	                  5       $ U R                  R                  5        VVs0 s H  u  p#X#R	                  5       _M     snn$ s  snnf )ag  
Return this kernel's SASS assembly code for for the device in the
current context.

:param signature: A tuple of argument types.
:return: The SASS code for the given signature, or a dict of SASS codes
         for all previously-encountered signatures.

SASS for the device in the current context is returned.

Requires nvdisasm to be available on the PATH.
rg   z(Cannot inspect SASS of a device function)r—  r°  r<   rl  r¼   rÏ  r  s       ru   r¼   ÚCUDADispatcher.inspect_sassñ  s‡   € ð ×Ñ×!Ñ! (×+Ñ+ÜÐIÓJÐJàÑ Ø—>‘> )Ñ,×9Ñ9Ó;Ð;ð &*§^¡^×%9Ñ%9Ô%;ô=Ú%;™	˜ð ×*Ñ*Ó,Ò,Ù%;ò=ð =ùó =r  c                 óŽ   • Uc  [         R                  nU R                  R                  5        H  u  p#UR	                  US9  M     g)r¿   NrÁ   )rÄ   rÅ   rl  rÏ  rÇ   )rd   rÂ   rp  r	  s       ru   rÇ   ÚCUDADispatcher.inspect_types  s<   € ð ‰<Ü—:‘:ˆDà—~‘~×+Ñ+Ö-‰GˆAØ×Ñ DÐÓ)ò .r{   c                 ó   • U " X5      nU$ )rŠ   rË   )rŒ   rA   r—  rŽ   s       ru   r�   ÚCUDADispatcher._rebuild  s   € ñ
 �wÓ.ˆØˆr{   c                 ó>   • [        U R                  U R                  S9$ )zL
Reduce the instance for serialization.
Compiled definitions are discarded.
)rA   r—  )r’   rA   r—  ry   s    ru   r“   ÚCUDADispatcher._reduce_states  s    € ô
 ˜DŸL™LØ"&×"4Ñ"4ñ6ð 	6r{   )r¡  r™  rš  rL  )r   r   r   rx   ),rM  rN  rO  rP  rQ  Ú
_fold_argsr   Útargetdescrr   r>   rR  rž  r¢  rÑ   Ú	lru_cacher¦  rª  r­  rC   rc  r}  r¼  r¸  ra  r`  rÒ  rÖ  rÙ  rÝ  rà  rî  ræ  rù  r¹  r±   r´   r¸   r¼   rÇ   rS  r�   r“   rT  rU  rV  s   @ru   r•  r•  @  s  ø† ñð €Jà€Kà>J÷ "ð  ñ/ó ð/ò.ð ×Ò Ñ%óPó &ðPò%ô
Qð, ñ4ó ð4ò(4ò	Bò-òòð0 ñ!ó ð!ôAô&Aô(Aô&Aô*Aò&/ô6%òN*ò
"ôHEô.Eô0=ô*=ô,
*ð ñó ð÷6ð 6r{   r•  )9Únumpyr(  rQ   rÄ   rä   rÑ   Ú
numba.corer   r   r   r   r   r   Únumba.core.cachingr	   r
   Únumba.core.compiler_lockr   Únumba.core.dispatcherr   Únumba.core.errorsr   Únumba.core.typing.typeofr   r   Únumba.cuda.apir   Únumba.cuda.argsr   Únumba.cuda.compilerr   r   Únumba.cuda.cudadrvr   Únumba.cuda.cudadrv.devicesr   Únumba.cuda.descriptorr   Únumba.cuda.errorsr   r   Ú
numba.cudar�  Únumbar   r   Úwarningsr   rP   ÚReduceMixinr.   ÚobjectrX  rs  r�  rŒ  r•  rË   r{   ru   Ú<module>r*     s°   ðÛ Û 	Û 
Û Û ç H× Hß /Ý 9Ý ,Ý 5ß 4å -Ý $ß :Ý %Ý 2Ý -÷<å *å Ý å ò*Ð ôi/ˆi×#Ñ#ô i/ôX+ˆVô +÷\Añ Aô:�Iô ô$>�ô >ôa6�Z ×!6Ñ!6õ a6r{   