Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
introspect.cpython-313.pyc67 linesDownload Raw Back to __pycache__
1�

2z�j���SrS/rSSjrg)z!3Introspection helper functions.4�
opt_func_infoNc��^^�SSKnSSKJnJm UbNUR	U5nUR5VVs0sHupVUR
U5(dMXV_M! nnnOUnUbwUR	U5m0nUR5HNupV0n	UR5H&up�[UU4SjU555(dM"X9U6'M( U	(dMJX�U'MP U$UnU$s snnf)a�7Returns a dictionary containing the currently supported CPU dispatched8features for all optimized functions.9 10Parameters11----------12func_name : str (optional)13    Regular expression to filter by function name.14 15signature : str (optional)16    Regular expression to filter by data type.17 18Returns19-------20dict21    A dictionary where keys are optimized function names and values are22    nested dictionaries indicating supported targets based on data types.23 24Examples25--------26Retrieve dispatch information for functions named 'add' or 'sub' and27data types 'float64' or 'float32':28 29>>> import numpy as np30>>> dict = np.lib.introspect.opt_func_info(31...     func_name="add|abs", signature="float64|complex64"32... )33>>> import json34>>> print(json.dumps(dict, indent=2))   # may vary (architecture)35    {36      "absolute": {37        "dd": {38          "current": "SSE41",39          "available": "SSE41 baseline(SSE SSE2 SSE3)"40        },41        "Ff": {42          "current": "FMA3__AVX2",43          "available": "AVX512F FMA3__AVX2 baseline(SSE SSE2 SSE3)"44        },45        "Dd": {46          "current": "FMA3__AVX2",47          "available": "AVX512F FMA3__AVX2 baseline(SSE SSE2 SSE3)"48        }49      },50      "add": {51        "ddd": {52          "current": "FMA3__AVX2",53          "available": "FMA3__AVX2 baseline(SSE SSE2 SSE3)"54        },55        "FFF": {56          "current": "FMA3__AVX2",57          "available": "FMA3__AVX2 baseline(SSE SSE2 SSE3)"58        }59      }60    }61 62�N)�__cpu_targets_info__�dtypec3�># �UH>nTRU5=(d! TRT"U5R5v� M@ g7f)N)�search�name)�.0�cr�sig_patterns  ���ZD:\code\apps\devtools\python\user_packages\Python313\site-packages\numpy/lib/introspect.py�	<genexpr>� opt_func_info.<locals>.<genexpr>Us>�����"�� �&�&�q�)�N�[�-?�-?��a��
�
�-N�N�"�s�AA	)�re�numpy._core._multiarray_umathrr�compile�itemsr�any)
�	func_name�	signaturer�targets�func_pattern�k�v�matching_funcs�
matching_sigs�matching_chars�charsrrs
           @@r
rrs����t�T����z�z�)�,��$�]�]�_�63�,�T�Q��"�"�1�%�
�A�D�_�	�64��65!�����j�j��+���
�"�(�(�*�D�A��N�"#�'�'�)�����"����-4�5�)�#,��~�#1�a� �+���'�
����-66s�C �C )NN)�__doc__�__all__r��r
�<module>r#s����67��Vr"
codekingpro/portable-devtools · Team Ai