
    ]Dic                        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  S r\R                  " \	5      r
SrSr\R                  R                  \S5      r\c  \
R!                  S\ S35        \" 5       rO-\
R!                  S\ S35        \" 5       r\R%                  \5        S	r\" S
 \ 5       5      r\(       a*   \
R-                  S5        SSK7  \
R-                  S5        Sr\" S \ 5       5      r\(       a1  \(       d*   \
R-                  S5        SSK7  \
R-                  S5        SrS\;   r\(       a1  \(       d*   \
R-                  S5        SSK7  \
R-                  S5        SrS\;   r\(       a1  \(       d*   \
R-                  S5        SSK7  \
R-                  S5        Sr\(       d)   \
R-                  S5        SSK 7  \
R-                  S5        gg! \ a"  r\
R-                  S\< 35        S	r SrCGNSrCff = f! \ a!  r\
R-                  S\< 35        S	r SrCNSrCff = f! \ a!  r\
R-                  S\< 35        S	r SrCNSrCff = f! \ a!  r\
R-                  S\< 35        S	r SrCNSrCff = f! \! aB    SRE                  \" 5       5      r#S \# S!3r$\
RK                  \$5        \RL                  " S5         gf = f)"    N)Versionc                     S n SSK n[        UR                  5      [        S5      :  a  SSKJn  UR                  5        VVs1 s H  u  p4U(       d  M  UiM     nnnU " 5       (       a  UR                  S5        [        R                  " SS5      R                  S	5       H  nUR                  U5        M     U$ [        R                  " 5       S
:X  a-  [        R                  " SS/5      S   S:X  a  S1$  [!        5       $ [        R                  " 5       S:X  Gaa  SSKn[!        5       nSUR"                  R$                  R&                  R(                  S   R+                  SS5      ;   a  UR                  S5        SUR"                  R$                  R&                  R(                  S   R+                  SS5      ;   a  UR                  S5        SUR"                  R$                  R&                  R(                  S   R+                  SS5      ;   a  UR                  S5        U " 5       (       a  UR                  S5        [        R                  " SS5      R                  S	5       H  nUR                  U5        M     U$ [!        5       $ s  snnf )a  
Returns the set of supported CPU features, see
https://github.com/numpy/numpy/blob/master/numpy/core/src/common/npy_cpu_features.h
for the list of features that this set may contain per architecture.

Example:
>>> supported_instruction_sets()  # for x86
{"SSE2", "AVX2", "AVX512", ...}
>>> supported_instruction_sets()  # for PPC
{"VSX", "VSX2", ...}
>>> supported_instruction_sets()  # for ARM
{"NEON", "ASIMD", ...}
c                     [         R                  " 5       S:w  a  g[         R                  " 5       S:w  a  gSS Kn [	        U R
                  5      [	        S5      :  a  g SS Kn SU R                  R                  R                  R                  S   R                  SS5      R                  5       ;   $ ! [         a8    [        [        S	5      R!                  S 5      R#                  S
5      S-  5      s $ f = f)Naarch64FLinuxr   z2.0sveFeatures ctypes   i  @ )platformmachinesystemnumpyr   __version__numpy.distutils.cpuinfo	distutilscpuinfocpuinfogetsplitImportErrorbool
__import__CDLL	getauxval)r   s    T/var/www/html/Aiprofessor/professorTrac/lib/python3.13/site-packages/faiss/loader.pyis_sve_supported4supported_instruction_sets.<locals>.is_sve_supported    s    *??'5$$%7	Q*EOO3377<<Q?CCJPRSYY[[[ 	Q
 
8,11$7AA"EOPP	Qs   AB/ /?C10C1r   Nz1.19)__cpu_features__SVEFAISS_DISABLE_CPU_FEATURESr
   z, 	
Darwinz/usr/sbin/sysctlzhw.optional.avx2_01AVX2r   avx2flagsavx512AVX512avx512_fp16
AVX512_SPR)r   r   r   numpy._core._multiarray_umathr!   itemsaddosgetenvr   discardr   r   
subprocesscheck_outputr   setr   r   r   r   r   )r   r   r!   kv	supportedfresults           r   supported_instruction_setsr<      s   "Q* u  !WV_4B $4#9#9#;A#;41qQ#;	AMM% 7<BB:NAa  O H$""$68L#MNrRVYY8O Z" 5L 
	g	%&U__,,0055a8<<WbIIJJvu..2277:>>wKKJJx EOO3377<<Q?CCGRPPJJ|$JJu7<BB:NANN1 O5L5 Bs   JJFAISS_OPT_LEVELzEnvironment variable zK is not set, so let's pick the instruction set according to the current CPUzUsing z as an instruction set.Fc              #   H   #    U  H  nS UR                  5       ;   v   M     g7f)r-   Nupper.0xs     r   	<genexpr>rD   i   s     I8H1\QWWY.8H    "z&Loading faiss with AVX512-SPR support.   )*z2Successfully loaded faiss with AVX512-SPR support.Tz7Could not load library with AVX512-SPR support due to:
c              #   H   #    U  H  nS UR                  5       ;   v   M     g7f)r+   Nr?   rA   s     r   rD   rD   u   s     A0@1QWWY&0@rE   z"Loading faiss with AVX512 support.z.Successfully loaded faiss with AVX512 support.z3Could not load library with AVX512 support due to:
r'   z Loading faiss with AVX2 support.z,Successfully loaded faiss with AVX2 support.z1Could not load library with AVX2 support due to:
r"   zLoading faiss with SVE support.z+Successfully loaded faiss with SVE support.z0Could not load library with SVE support due to:
zLoading faiss.zSuccessfully loaded faiss.z, zNo module named 'faiss.swigfaiss' found. To fix this, you must do both of the following:
A) Set the correct FAISS_OPT_LEVEL value when executing 'cmake'.
B) Build the correct SWIG wrapper.

These are the supported instruction sets on your system:
a	  
- If 'AVX512_SPR' (case insensitive) is supported on your system, you can set the FAISS_OPT_LEVEL=avx512_spr to build the SWIG wrapper with 'AVX512-SPR' support.
You will have to build the 'swigfaiss_avx512_spr' target in this case.
- If 'AVX512' (case insensitive) is supported on your system, you can set the FAISS_OPT_LEVEL=avx512 to build the SWIG wrapper with 'AVX512' support.
You will have to build the 'swigfaiss_avx512' target in this case.
- If 'AVX2' (case sensitive) is supported on your system, you can set the FAISS_OPT_LEVEL=AVX2 to build the SWIG wrapper with 'AVX2' support.
You will have to build the 'swigfaiss_avx2' target in this case.
- If 'SVE' (case sensitive) is supported on your system, you can set the FAISS_OPT_LEVEL=SVE to build the SWIG wrapper with 'SVE' support.
You will have to build the 'swigfaiss_sve' target in this case.
- If none of the above instruction sets are supported on your system, you can execute 'cmake' without setting the FAISS_OPT_LEVEL variable and build the 'swigfaiss' target.)'r   r4   loggingr1   syspackaging.versionr   r<   	getLogger__name__loggerinstruction_setsopt_env_variable_nameenvironr   	opt_leveldebugr6   r0   loadedanyhas_AVX512_SPRr   swigfaiss_avx512_sprr   e
has_AVX512swigfaiss_avx512has_AVX2swigfaiss_avx2has_SVEswigfaiss_sve	swigfaissModuleNotFoundErrorjoinformatted_ins_setsmessageerrorexit     r   <module>rh      s      	 
 %FP 
		8	$  * JJNN0$7	
LL()>(? @Q Q R13
LL6)$;<=u#	I8HII<=+HI A0@AA
f89'DE %%F67%BC #
#
656$AB ,$% 01 S  NqeTU  J1%PQ  HNO  GuMN  '!YY'A'CDI "" #IJ 	D 	WO'ss   6)G =)G< :)H& 7)I ('I: G9G44G9<H#HH#&I,III7I22I7:AKK