Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +1 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/__init__.py +64 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/__init__.pyi +4 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/__init__.cpython-310.pyc +0 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/_shell_utils.cpython-310.pyc +0 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/armccompiler.cpython-310.pyc +0 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/ccompiler.cpython-310.pyc +0 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/ccompiler_opt.cpython-310.pyc +0 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/conv_template.cpython-310.pyc +0 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/core.cpython-310.pyc +0 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/cpuinfo.cpython-310.pyc +0 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/exec_command.cpython-310.pyc +0 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/extension.cpython-310.pyc +0 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/from_template.cpython-310.pyc +0 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/fujitsuccompiler.cpython-310.pyc +0 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/intelccompiler.cpython-310.pyc +0 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/lib2def.cpython-310.pyc +0 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/line_endings.cpython-310.pyc +0 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/log.cpython-310.pyc +0 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/mingw32ccompiler.cpython-310.pyc +0 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/misc_util.cpython-310.pyc +0 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/msvc9compiler.cpython-310.pyc +0 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/msvccompiler.cpython-310.pyc +0 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/npy_pkg_config.cpython-310.pyc +0 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/numpy_distribution.cpython-310.pyc +0 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/pathccompiler.cpython-310.pyc +0 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/system_info.cpython-310.pyc +0 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/unixccompiler.cpython-310.pyc +0 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/_shell_utils.py +87 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_asimd.c +27 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_asimddp.c +16 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_asimdfhm.c +19 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_asimdhp.c +15 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_avx.c +20 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_avx2.c +20 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_avx512_clx.c +22 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_avx512_cnl.c +24 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_avx512_icl.c +26 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_avx512_knl.c +25 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_avx512_knm.c +30 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_avx512_skx.c +26 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_avx512_spr.c +26 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_avx512cd.c +20 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_avx512f.c +20 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_f16c.c +22 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/extra_avx512bw_mask.c +18 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/extra_avx512dq_mask.c +16 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/extra_avx512f_reduce.c +41 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/extra_vsx3_half_double.c +12 -0
- pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/extra_vsx4_mma.c +21 -0
.gitattributes
CHANGED
|
@@ -51,3 +51,4 @@ pythonProject/.venv/Lib/site-packages/diffusers/loaders/__pycache__/lora_pipelin
|
|
| 51 |
pythonProject/.venv/Lib/site-packages/diffusers/utils/__pycache__/dummy_torch_and_transformers_objects.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
|
| 52 |
pythonProject/.venv/Lib/site-packages/functorch/_C.cp310-win_amd64.pyd filter=lfs diff=lfs merge=lfs -text
|
| 53 |
pythonProject/.venv/Lib/site-packages/huggingface_hub/inference/__pycache__/_client.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 51 |
pythonProject/.venv/Lib/site-packages/diffusers/utils/__pycache__/dummy_torch_and_transformers_objects.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
|
| 52 |
pythonProject/.venv/Lib/site-packages/functorch/_C.cp310-win_amd64.pyd filter=lfs diff=lfs merge=lfs -text
|
| 53 |
pythonProject/.venv/Lib/site-packages/huggingface_hub/inference/__pycache__/_client.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
|
| 54 |
+
pythonProject/.venv/Lib/site-packages/numpy/fft/_pocketfft_umath.cp310-win_amd64.pyd filter=lfs diff=lfs merge=lfs -text
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/__init__.py
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
An enhanced distutils, providing support for Fortran compilers, for BLAS,
|
| 3 |
+
LAPACK and other common libraries for numerical computing, and more.
|
| 4 |
+
|
| 5 |
+
Public submodules are::
|
| 6 |
+
|
| 7 |
+
misc_util
|
| 8 |
+
system_info
|
| 9 |
+
cpu_info
|
| 10 |
+
log
|
| 11 |
+
exec_command
|
| 12 |
+
|
| 13 |
+
For details, please see the *Packaging* and *NumPy Distutils User Guide*
|
| 14 |
+
sections of the NumPy Reference Guide.
|
| 15 |
+
|
| 16 |
+
For configuring the preference for and location of libraries like BLAS and
|
| 17 |
+
LAPACK, and for setting include paths and similar build options, please see
|
| 18 |
+
``site.cfg.example`` in the root of the NumPy repository or sdist.
|
| 19 |
+
|
| 20 |
+
"""
|
| 21 |
+
|
| 22 |
+
import warnings
|
| 23 |
+
|
| 24 |
+
# Must import local ccompiler ASAP in order to get
|
| 25 |
+
# customized CCompiler.spawn effective.
|
| 26 |
+
from . import ccompiler
|
| 27 |
+
from . import unixccompiler
|
| 28 |
+
|
| 29 |
+
from .npy_pkg_config import *
|
| 30 |
+
|
| 31 |
+
warnings.warn("\n\n"
|
| 32 |
+
" `numpy.distutils` is deprecated since NumPy 1.23.0, as a result\n"
|
| 33 |
+
" of the deprecation of `distutils` itself. It will be removed for\n"
|
| 34 |
+
" Python >= 3.12. For older Python versions it will remain present.\n"
|
| 35 |
+
" It is recommended to use `setuptools < 60.0` for those Python versions.\n"
|
| 36 |
+
" For more details, see:\n"
|
| 37 |
+
" https://numpy.org/devdocs/reference/distutils_status_migration.html \n\n",
|
| 38 |
+
DeprecationWarning, stacklevel=2
|
| 39 |
+
)
|
| 40 |
+
del warnings
|
| 41 |
+
|
| 42 |
+
# If numpy is installed, add distutils.test()
|
| 43 |
+
try:
|
| 44 |
+
from . import __config__
|
| 45 |
+
# Normally numpy is installed if the above import works, but an interrupted
|
| 46 |
+
# in-place build could also have left a __config__.py. In that case the
|
| 47 |
+
# next import may still fail, so keep it inside the try block.
|
| 48 |
+
from numpy._pytesttester import PytestTester
|
| 49 |
+
test = PytestTester(__name__)
|
| 50 |
+
del PytestTester
|
| 51 |
+
except ImportError:
|
| 52 |
+
pass
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
def customized_fcompiler(plat=None, compiler=None):
|
| 56 |
+
from numpy.distutils.fcompiler import new_fcompiler
|
| 57 |
+
c = new_fcompiler(plat=plat, compiler=compiler)
|
| 58 |
+
c.customize()
|
| 59 |
+
return c
|
| 60 |
+
|
| 61 |
+
def customized_ccompiler(plat=None, compiler=None, verbose=1):
|
| 62 |
+
c = ccompiler.new_compiler(plat=plat, compiler=compiler, verbose=verbose)
|
| 63 |
+
c.customize('')
|
| 64 |
+
return c
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/__init__.pyi
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Any
|
| 2 |
+
|
| 3 |
+
# TODO: remove when the full numpy namespace is defined
|
| 4 |
+
def __getattr__(name: str) -> Any: ...
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/__init__.cpython-310.pyc
ADDED
|
Binary file (1.98 kB). View file
|
|
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/_shell_utils.cpython-310.pyc
ADDED
|
Binary file (3.02 kB). View file
|
|
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/armccompiler.cpython-310.pyc
ADDED
|
Binary file (955 Bytes). View file
|
|
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/ccompiler.cpython-310.pyc
ADDED
|
Binary file (20.2 kB). View file
|
|
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/ccompiler_opt.cpython-310.pyc
ADDED
|
Binary file (73.5 kB). View file
|
|
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/conv_template.cpython-310.pyc
ADDED
|
Binary file (8.29 kB). View file
|
|
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/core.cpython-310.pyc
ADDED
|
Binary file (4.77 kB). View file
|
|
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/cpuinfo.cpython-310.pyc
ADDED
|
Binary file (29.6 kB). View file
|
|
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/exec_command.cpython-310.pyc
ADDED
|
Binary file (9.18 kB). View file
|
|
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/extension.cpython-310.pyc
ADDED
|
Binary file (2.87 kB). View file
|
|
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/from_template.cpython-310.pyc
ADDED
|
Binary file (7.25 kB). View file
|
|
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/fujitsuccompiler.cpython-310.pyc
ADDED
|
Binary file (989 Bytes). View file
|
|
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/intelccompiler.cpython-310.pyc
ADDED
|
Binary file (3.55 kB). View file
|
|
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/lib2def.cpython-310.pyc
ADDED
|
Binary file (3.35 kB). View file
|
|
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/line_endings.cpython-310.pyc
ADDED
|
Binary file (2.08 kB). View file
|
|
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/log.cpython-310.pyc
ADDED
|
Binary file (3.02 kB). View file
|
|
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/mingw32ccompiler.cpython-310.pyc
ADDED
|
Binary file (13.6 kB). View file
|
|
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/misc_util.cpython-310.pyc
ADDED
|
Binary file (74.2 kB). View file
|
|
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/msvc9compiler.cpython-310.pyc
ADDED
|
Binary file (2.21 kB). View file
|
|
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/msvccompiler.cpython-310.pyc
ADDED
|
Binary file (2.46 kB). View file
|
|
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/npy_pkg_config.cpython-310.pyc
ADDED
|
Binary file (12.2 kB). View file
|
|
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/numpy_distribution.cpython-310.pyc
ADDED
|
Binary file (802 Bytes). View file
|
|
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/pathccompiler.cpython-310.pyc
ADDED
|
Binary file (933 Bytes). View file
|
|
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/system_info.cpython-310.pyc
ADDED
|
Binary file (89.9 kB). View file
|
|
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/__pycache__/unixccompiler.cpython-310.pyc
ADDED
|
Binary file (3.42 kB). View file
|
|
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/_shell_utils.py
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Helper functions for interacting with the shell, and consuming shell-style
|
| 3 |
+
parameters provided in config files.
|
| 4 |
+
"""
|
| 5 |
+
import os
|
| 6 |
+
import shlex
|
| 7 |
+
import subprocess
|
| 8 |
+
|
| 9 |
+
__all__ = ['WindowsParser', 'PosixParser', 'NativeParser']
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
class CommandLineParser:
|
| 13 |
+
"""
|
| 14 |
+
An object that knows how to split and join command-line arguments.
|
| 15 |
+
|
| 16 |
+
It must be true that ``argv == split(join(argv))`` for all ``argv``.
|
| 17 |
+
The reverse neednt be true - `join(split(cmd))` may result in the addition
|
| 18 |
+
or removal of unnecessary escaping.
|
| 19 |
+
"""
|
| 20 |
+
@staticmethod
|
| 21 |
+
def join(argv):
|
| 22 |
+
""" Join a list of arguments into a command line string """
|
| 23 |
+
raise NotImplementedError
|
| 24 |
+
|
| 25 |
+
@staticmethod
|
| 26 |
+
def split(cmd):
|
| 27 |
+
""" Split a command line string into a list of arguments """
|
| 28 |
+
raise NotImplementedError
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
class WindowsParser:
|
| 32 |
+
"""
|
| 33 |
+
The parsing behavior used by `subprocess.call("string")` on Windows, which
|
| 34 |
+
matches the Microsoft C/C++ runtime.
|
| 35 |
+
|
| 36 |
+
Note that this is _not_ the behavior of cmd.
|
| 37 |
+
"""
|
| 38 |
+
@staticmethod
|
| 39 |
+
def join(argv):
|
| 40 |
+
# note that list2cmdline is specific to the windows syntax
|
| 41 |
+
return subprocess.list2cmdline(argv)
|
| 42 |
+
|
| 43 |
+
@staticmethod
|
| 44 |
+
def split(cmd):
|
| 45 |
+
import ctypes # guarded import for systems without ctypes
|
| 46 |
+
try:
|
| 47 |
+
ctypes.windll
|
| 48 |
+
except AttributeError:
|
| 49 |
+
raise NotImplementedError
|
| 50 |
+
|
| 51 |
+
# Windows has special parsing rules for the executable (no quotes),
|
| 52 |
+
# that we do not care about - insert a dummy element
|
| 53 |
+
if not cmd:
|
| 54 |
+
return []
|
| 55 |
+
cmd = 'dummy ' + cmd
|
| 56 |
+
|
| 57 |
+
CommandLineToArgvW = ctypes.windll.shell32.CommandLineToArgvW
|
| 58 |
+
CommandLineToArgvW.restype = ctypes.POINTER(ctypes.c_wchar_p)
|
| 59 |
+
CommandLineToArgvW.argtypes = (ctypes.c_wchar_p, ctypes.POINTER(ctypes.c_int))
|
| 60 |
+
|
| 61 |
+
nargs = ctypes.c_int()
|
| 62 |
+
lpargs = CommandLineToArgvW(cmd, ctypes.byref(nargs))
|
| 63 |
+
args = [lpargs[i] for i in range(nargs.value)]
|
| 64 |
+
assert not ctypes.windll.kernel32.LocalFree(lpargs)
|
| 65 |
+
|
| 66 |
+
# strip the element we inserted
|
| 67 |
+
assert args[0] == "dummy"
|
| 68 |
+
return args[1:]
|
| 69 |
+
|
| 70 |
+
|
| 71 |
+
class PosixParser:
|
| 72 |
+
"""
|
| 73 |
+
The parsing behavior used by `subprocess.call("string", shell=True)` on Posix.
|
| 74 |
+
"""
|
| 75 |
+
@staticmethod
|
| 76 |
+
def join(argv):
|
| 77 |
+
return ' '.join(shlex.quote(arg) for arg in argv)
|
| 78 |
+
|
| 79 |
+
@staticmethod
|
| 80 |
+
def split(cmd):
|
| 81 |
+
return shlex.split(cmd, posix=True)
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
if os.name == 'nt':
|
| 85 |
+
NativeParser = WindowsParser
|
| 86 |
+
elif os.name == 'posix':
|
| 87 |
+
NativeParser = PosixParser
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_asimd.c
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifdef _MSC_VER
|
| 2 |
+
#include <Intrin.h>
|
| 3 |
+
#endif
|
| 4 |
+
#include <arm_neon.h>
|
| 5 |
+
|
| 6 |
+
int main(int argc, char **argv)
|
| 7 |
+
{
|
| 8 |
+
float *src = (float*)argv[argc-1];
|
| 9 |
+
float32x4_t v1 = vdupq_n_f32(src[0]), v2 = vdupq_n_f32(src[1]);
|
| 10 |
+
/* MAXMIN */
|
| 11 |
+
int ret = (int)vgetq_lane_f32(vmaxnmq_f32(v1, v2), 0);
|
| 12 |
+
ret += (int)vgetq_lane_f32(vminnmq_f32(v1, v2), 0);
|
| 13 |
+
/* ROUNDING */
|
| 14 |
+
ret += (int)vgetq_lane_f32(vrndq_f32(v1), 0);
|
| 15 |
+
#ifdef __aarch64__
|
| 16 |
+
{
|
| 17 |
+
double *src2 = (double*)argv[argc-1];
|
| 18 |
+
float64x2_t vd1 = vdupq_n_f64(src2[0]), vd2 = vdupq_n_f64(src2[1]);
|
| 19 |
+
/* MAXMIN */
|
| 20 |
+
ret += (int)vgetq_lane_f64(vmaxnmq_f64(vd1, vd2), 0);
|
| 21 |
+
ret += (int)vgetq_lane_f64(vminnmq_f64(vd1, vd2), 0);
|
| 22 |
+
/* ROUNDING */
|
| 23 |
+
ret += (int)vgetq_lane_f64(vrndq_f64(vd1), 0);
|
| 24 |
+
}
|
| 25 |
+
#endif
|
| 26 |
+
return ret;
|
| 27 |
+
}
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_asimddp.c
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifdef _MSC_VER
|
| 2 |
+
#include <Intrin.h>
|
| 3 |
+
#endif
|
| 4 |
+
#include <arm_neon.h>
|
| 5 |
+
|
| 6 |
+
int main(int argc, char **argv)
|
| 7 |
+
{
|
| 8 |
+
unsigned char *src = (unsigned char*)argv[argc-1];
|
| 9 |
+
uint8x16_t v1 = vdupq_n_u8(src[0]), v2 = vdupq_n_u8(src[1]);
|
| 10 |
+
uint32x4_t va = vdupq_n_u32(3);
|
| 11 |
+
int ret = (int)vgetq_lane_u32(vdotq_u32(va, v1, v2), 0);
|
| 12 |
+
#ifdef __aarch64__
|
| 13 |
+
ret += (int)vgetq_lane_u32(vdotq_laneq_u32(va, v1, v2, 0), 0);
|
| 14 |
+
#endif
|
| 15 |
+
return ret;
|
| 16 |
+
}
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_asimdfhm.c
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifdef _MSC_VER
|
| 2 |
+
#include <Intrin.h>
|
| 3 |
+
#endif
|
| 4 |
+
#include <arm_neon.h>
|
| 5 |
+
|
| 6 |
+
int main(int argc, char **argv)
|
| 7 |
+
{
|
| 8 |
+
float16_t *src = (float16_t*)argv[argc-1];
|
| 9 |
+
float *src2 = (float*)argv[argc-2];
|
| 10 |
+
float16x8_t vhp = vdupq_n_f16(src[0]);
|
| 11 |
+
float16x4_t vlhp = vdup_n_f16(src[1]);
|
| 12 |
+
float32x4_t vf = vdupq_n_f32(src2[0]);
|
| 13 |
+
float32x2_t vlf = vdup_n_f32(src2[1]);
|
| 14 |
+
|
| 15 |
+
int ret = (int)vget_lane_f32(vfmlal_low_f16(vlf, vlhp, vlhp), 0);
|
| 16 |
+
ret += (int)vgetq_lane_f32(vfmlslq_high_f16(vf, vhp, vhp), 0);
|
| 17 |
+
|
| 18 |
+
return ret;
|
| 19 |
+
}
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_asimdhp.c
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifdef _MSC_VER
|
| 2 |
+
#include <Intrin.h>
|
| 3 |
+
#endif
|
| 4 |
+
#include <arm_neon.h>
|
| 5 |
+
|
| 6 |
+
int main(int argc, char **argv)
|
| 7 |
+
{
|
| 8 |
+
float16_t *src = (float16_t*)argv[argc-1];
|
| 9 |
+
float16x8_t vhp = vdupq_n_f16(src[0]);
|
| 10 |
+
float16x4_t vlhp = vdup_n_f16(src[1]);
|
| 11 |
+
|
| 12 |
+
int ret = (int)vgetq_lane_f16(vabdq_f16(vhp, vhp), 0);
|
| 13 |
+
ret += (int)vget_lane_f16(vabd_f16(vlhp, vlhp), 0);
|
| 14 |
+
return ret;
|
| 15 |
+
}
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_avx.c
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
|
| 2 |
+
/*
|
| 3 |
+
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
|
| 4 |
+
* whether or not the build options for those features are specified.
|
| 5 |
+
* Therefore, we must test #definitions of CPU features when option native/host
|
| 6 |
+
* is enabled via `--cpu-baseline` or through env var `CFLAGS` otherwise
|
| 7 |
+
* the test will be broken and leads to enable all possible features.
|
| 8 |
+
*/
|
| 9 |
+
#ifndef __AVX__
|
| 10 |
+
#error "HOST/ARCH doesn't support AVX"
|
| 11 |
+
#endif
|
| 12 |
+
#endif
|
| 13 |
+
|
| 14 |
+
#include <immintrin.h>
|
| 15 |
+
|
| 16 |
+
int main(int argc, char **argv)
|
| 17 |
+
{
|
| 18 |
+
__m256 a = _mm256_add_ps(_mm256_loadu_ps((const float*)argv[argc-1]), _mm256_loadu_ps((const float*)argv[1]));
|
| 19 |
+
return (int)_mm_cvtss_f32(_mm256_castps256_ps128(a));
|
| 20 |
+
}
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_avx2.c
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
|
| 2 |
+
/*
|
| 3 |
+
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
|
| 4 |
+
* whether or not the build options for those features are specified.
|
| 5 |
+
* Therefore, we must test #definitions of CPU features when option native/host
|
| 6 |
+
* is enabled via `--cpu-baseline` or through env var `CFLAGS` otherwise
|
| 7 |
+
* the test will be broken and leads to enable all possible features.
|
| 8 |
+
*/
|
| 9 |
+
#ifndef __AVX2__
|
| 10 |
+
#error "HOST/ARCH doesn't support AVX2"
|
| 11 |
+
#endif
|
| 12 |
+
#endif
|
| 13 |
+
|
| 14 |
+
#include <immintrin.h>
|
| 15 |
+
|
| 16 |
+
int main(int argc, char **argv)
|
| 17 |
+
{
|
| 18 |
+
__m256i a = _mm256_abs_epi16(_mm256_loadu_si256((const __m256i*)argv[argc-1]));
|
| 19 |
+
return _mm_cvtsi128_si32(_mm256_castsi256_si128(a));
|
| 20 |
+
}
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_avx512_clx.c
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
|
| 2 |
+
/*
|
| 3 |
+
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
|
| 4 |
+
* whether or not the build options for those features are specified.
|
| 5 |
+
* Therefore, we must test #definitions of CPU features when option native/host
|
| 6 |
+
* is enabled via `--cpu-baseline` or through env var `CFLAGS` otherwise
|
| 7 |
+
* the test will be broken and leads to enable all possible features.
|
| 8 |
+
*/
|
| 9 |
+
#ifndef __AVX512VNNI__
|
| 10 |
+
#error "HOST/ARCH doesn't support CascadeLake AVX512 features"
|
| 11 |
+
#endif
|
| 12 |
+
#endif
|
| 13 |
+
|
| 14 |
+
#include <immintrin.h>
|
| 15 |
+
|
| 16 |
+
int main(int argc, char **argv)
|
| 17 |
+
{
|
| 18 |
+
/* VNNI */
|
| 19 |
+
__m512i a = _mm512_loadu_si512((const __m512i*)argv[argc-1]);
|
| 20 |
+
a = _mm512_dpbusd_epi32(a, _mm512_setzero_si512(), a);
|
| 21 |
+
return _mm_cvtsi128_si32(_mm512_castsi512_si128(a));
|
| 22 |
+
}
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_avx512_cnl.c
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
|
| 2 |
+
/*
|
| 3 |
+
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
|
| 4 |
+
* whether or not the build options for those features are specified.
|
| 5 |
+
* Therefore, we must test #definitions of CPU features when option native/host
|
| 6 |
+
* is enabled via `--cpu-baseline` or through env var `CFLAGS` otherwise
|
| 7 |
+
* the test will be broken and leads to enable all possible features.
|
| 8 |
+
*/
|
| 9 |
+
#if !defined(__AVX512VBMI__) || !defined(__AVX512IFMA__)
|
| 10 |
+
#error "HOST/ARCH doesn't support CannonLake AVX512 features"
|
| 11 |
+
#endif
|
| 12 |
+
#endif
|
| 13 |
+
|
| 14 |
+
#include <immintrin.h>
|
| 15 |
+
|
| 16 |
+
int main(int argc, char **argv)
|
| 17 |
+
{
|
| 18 |
+
__m512i a = _mm512_loadu_si512((const __m512i*)argv[argc-1]);
|
| 19 |
+
/* IFMA */
|
| 20 |
+
a = _mm512_madd52hi_epu64(a, a, _mm512_setzero_si512());
|
| 21 |
+
/* VMBI */
|
| 22 |
+
a = _mm512_permutex2var_epi8(a, _mm512_setzero_si512(), a);
|
| 23 |
+
return _mm_cvtsi128_si32(_mm512_castsi512_si128(a));
|
| 24 |
+
}
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_avx512_icl.c
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
|
| 2 |
+
/*
|
| 3 |
+
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
|
| 4 |
+
* whether or not the build options for those features are specified.
|
| 5 |
+
* Therefore, we must test #definitions of CPU features when option native/host
|
| 6 |
+
* is enabled via `--cpu-baseline` or through env var `CFLAGS` otherwise
|
| 7 |
+
* the test will be broken and leads to enable all possible features.
|
| 8 |
+
*/
|
| 9 |
+
#if !defined(__AVX512VPOPCNTDQ__) || !defined(__AVX512BITALG__) || !defined(__AVX512VPOPCNTDQ__)
|
| 10 |
+
#error "HOST/ARCH doesn't support IceLake AVX512 features"
|
| 11 |
+
#endif
|
| 12 |
+
#endif
|
| 13 |
+
|
| 14 |
+
#include <immintrin.h>
|
| 15 |
+
|
| 16 |
+
int main(int argc, char **argv)
|
| 17 |
+
{
|
| 18 |
+
__m512i a = _mm512_loadu_si512((const __m512i*)argv[argc-1]);
|
| 19 |
+
/* VBMI2 */
|
| 20 |
+
a = _mm512_shrdv_epi64(a, a, _mm512_setzero_si512());
|
| 21 |
+
/* BITLAG */
|
| 22 |
+
a = _mm512_popcnt_epi8(a);
|
| 23 |
+
/* VPOPCNTDQ */
|
| 24 |
+
a = _mm512_popcnt_epi64(a);
|
| 25 |
+
return _mm_cvtsi128_si32(_mm512_castsi512_si128(a));
|
| 26 |
+
}
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_avx512_knl.c
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
|
| 2 |
+
/*
|
| 3 |
+
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
|
| 4 |
+
* whether or not the build options for those features are specified.
|
| 5 |
+
* Therefore, we must test #definitions of CPU features when option native/host
|
| 6 |
+
* is enabled via `--cpu-baseline` or through env var `CFLAGS` otherwise
|
| 7 |
+
* the test will be broken and leads to enable all possible features.
|
| 8 |
+
*/
|
| 9 |
+
#if !defined(__AVX512ER__) || !defined(__AVX512PF__)
|
| 10 |
+
#error "HOST/ARCH doesn't support Knights Landing AVX512 features"
|
| 11 |
+
#endif
|
| 12 |
+
#endif
|
| 13 |
+
|
| 14 |
+
#include <immintrin.h>
|
| 15 |
+
|
| 16 |
+
int main(int argc, char **argv)
|
| 17 |
+
{
|
| 18 |
+
int base[128]={};
|
| 19 |
+
__m512d ad = _mm512_loadu_pd((const __m512d*)argv[argc-1]);
|
| 20 |
+
/* ER */
|
| 21 |
+
__m512i a = _mm512_castpd_si512(_mm512_exp2a23_pd(ad));
|
| 22 |
+
/* PF */
|
| 23 |
+
_mm512_mask_prefetch_i64scatter_pd(base, _mm512_cmpeq_epi64_mask(a, a), a, 1, _MM_HINT_T1);
|
| 24 |
+
return base[0];
|
| 25 |
+
}
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_avx512_knm.c
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
|
| 2 |
+
/*
|
| 3 |
+
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
|
| 4 |
+
* whether or not the build options for those features are specified.
|
| 5 |
+
* Therefore, we must test #definitions of CPU features when option native/host
|
| 6 |
+
* is enabled via `--cpu-baseline` or through env var `CFLAGS` otherwise
|
| 7 |
+
* the test will be broken and leads to enable all possible features.
|
| 8 |
+
*/
|
| 9 |
+
#if !defined(__AVX5124FMAPS__) || !defined(__AVX5124VNNIW__) || !defined(__AVX512VPOPCNTDQ__)
|
| 10 |
+
#error "HOST/ARCH doesn't support Knights Mill AVX512 features"
|
| 11 |
+
#endif
|
| 12 |
+
#endif
|
| 13 |
+
|
| 14 |
+
#include <immintrin.h>
|
| 15 |
+
|
| 16 |
+
int main(int argc, char **argv)
|
| 17 |
+
{
|
| 18 |
+
__m512i a = _mm512_loadu_si512((const __m512i*)argv[argc-1]);
|
| 19 |
+
__m512 b = _mm512_loadu_ps((const __m512*)argv[argc-2]);
|
| 20 |
+
|
| 21 |
+
/* 4FMAPS */
|
| 22 |
+
b = _mm512_4fmadd_ps(b, b, b, b, b, NULL);
|
| 23 |
+
/* 4VNNIW */
|
| 24 |
+
a = _mm512_4dpwssd_epi32(a, a, a, a, a, NULL);
|
| 25 |
+
/* VPOPCNTDQ */
|
| 26 |
+
a = _mm512_popcnt_epi64(a);
|
| 27 |
+
|
| 28 |
+
a = _mm512_add_epi32(a, _mm512_castps_si512(b));
|
| 29 |
+
return _mm_cvtsi128_si32(_mm512_castsi512_si128(a));
|
| 30 |
+
}
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_avx512_skx.c
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
|
| 2 |
+
/*
|
| 3 |
+
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
|
| 4 |
+
* whether or not the build options for those features are specified.
|
| 5 |
+
* Therefore, we must test #definitions of CPU features when option native/host
|
| 6 |
+
* is enabled via `--cpu-baseline` or through env var `CFLAGS` otherwise
|
| 7 |
+
* the test will be broken and leads to enable all possible features.
|
| 8 |
+
*/
|
| 9 |
+
#if !defined(__AVX512VL__) || !defined(__AVX512BW__) || !defined(__AVX512DQ__)
|
| 10 |
+
#error "HOST/ARCH doesn't support SkyLake AVX512 features"
|
| 11 |
+
#endif
|
| 12 |
+
#endif
|
| 13 |
+
|
| 14 |
+
#include <immintrin.h>
|
| 15 |
+
|
| 16 |
+
int main(int argc, char **argv)
|
| 17 |
+
{
|
| 18 |
+
__m512i aa = _mm512_abs_epi32(_mm512_loadu_si512((const __m512i*)argv[argc-1]));
|
| 19 |
+
/* VL */
|
| 20 |
+
__m256i a = _mm256_abs_epi64(_mm512_extracti64x4_epi64(aa, 1));
|
| 21 |
+
/* DQ */
|
| 22 |
+
__m512i b = _mm512_broadcast_i32x8(a);
|
| 23 |
+
/* BW */
|
| 24 |
+
b = _mm512_abs_epi16(b);
|
| 25 |
+
return _mm_cvtsi128_si32(_mm512_castsi512_si128(b));
|
| 26 |
+
}
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_avx512_spr.c
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
|
| 2 |
+
/*
|
| 3 |
+
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
|
| 4 |
+
* whether or not the build options for those features are specified.
|
| 5 |
+
* Therefore, we must test #definitions of CPU features when option native/host
|
| 6 |
+
* is enabled via `--cpu-baseline` or through env var `CFLAGS` otherwise
|
| 7 |
+
* the test will be broken and leads to enable all possible features.
|
| 8 |
+
*/
|
| 9 |
+
#if !defined(__AVX512FP16__)
|
| 10 |
+
#error "HOST/ARCH doesn't support Sapphire Rapids AVX512FP16 features"
|
| 11 |
+
#endif
|
| 12 |
+
#endif
|
| 13 |
+
|
| 14 |
+
#include <immintrin.h>
|
| 15 |
+
|
| 16 |
+
int main(int argc, char **argv)
|
| 17 |
+
{
|
| 18 |
+
/* clang has a bug regarding our spr coode, see gh-23730. */
|
| 19 |
+
#if __clang__
|
| 20 |
+
#error
|
| 21 |
+
#endif
|
| 22 |
+
__m512h a = _mm512_loadu_ph((void*)argv[argc-1]);
|
| 23 |
+
__m512h temp = _mm512_fmadd_ph(a, a, a);
|
| 24 |
+
_mm512_storeu_ph((void*)(argv[argc-1]), temp);
|
| 25 |
+
return 0;
|
| 26 |
+
}
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_avx512cd.c
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
|
| 2 |
+
/*
|
| 3 |
+
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
|
| 4 |
+
* whether or not the build options for those features are specified.
|
| 5 |
+
* Therefore, we must test #definitions of CPU features when option native/host
|
| 6 |
+
* is enabled via `--cpu-baseline` or through env var `CFLAGS` otherwise
|
| 7 |
+
* the test will be broken and leads to enable all possible features.
|
| 8 |
+
*/
|
| 9 |
+
#ifndef __AVX512CD__
|
| 10 |
+
#error "HOST/ARCH doesn't support AVX512CD"
|
| 11 |
+
#endif
|
| 12 |
+
#endif
|
| 13 |
+
|
| 14 |
+
#include <immintrin.h>
|
| 15 |
+
|
| 16 |
+
int main(int argc, char **argv)
|
| 17 |
+
{
|
| 18 |
+
__m512i a = _mm512_lzcnt_epi32(_mm512_loadu_si512((const __m512i*)argv[argc-1]));
|
| 19 |
+
return _mm_cvtsi128_si32(_mm512_castsi512_si128(a));
|
| 20 |
+
}
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_avx512f.c
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
|
| 2 |
+
/*
|
| 3 |
+
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
|
| 4 |
+
* whether or not the build options for those features are specified.
|
| 5 |
+
* Therefore, we must test #definitions of CPU features when option native/host
|
| 6 |
+
* is enabled via `--cpu-baseline` or through env var `CFLAGS` otherwise
|
| 7 |
+
* the test will be broken and leads to enable all possible features.
|
| 8 |
+
*/
|
| 9 |
+
#ifndef __AVX512F__
|
| 10 |
+
#error "HOST/ARCH doesn't support AVX512F"
|
| 11 |
+
#endif
|
| 12 |
+
#endif
|
| 13 |
+
|
| 14 |
+
#include <immintrin.h>
|
| 15 |
+
|
| 16 |
+
int main(int argc, char **argv)
|
| 17 |
+
{
|
| 18 |
+
__m512i a = _mm512_abs_epi32(_mm512_loadu_si512((const __m512i*)argv[argc-1]));
|
| 19 |
+
return _mm_cvtsi128_si32(_mm512_castsi512_si128(a));
|
| 20 |
+
}
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/cpu_f16c.c
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
|
| 2 |
+
/*
|
| 3 |
+
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
|
| 4 |
+
* whether or not the build options for those features are specified.
|
| 5 |
+
* Therefore, we must test #definitions of CPU features when option native/host
|
| 6 |
+
* is enabled via `--cpu-baseline` or through env var `CFLAGS` otherwise
|
| 7 |
+
* the test will be broken and leads to enable all possible features.
|
| 8 |
+
*/
|
| 9 |
+
#ifndef __F16C__
|
| 10 |
+
#error "HOST/ARCH doesn't support F16C"
|
| 11 |
+
#endif
|
| 12 |
+
#endif
|
| 13 |
+
|
| 14 |
+
#include <emmintrin.h>
|
| 15 |
+
#include <immintrin.h>
|
| 16 |
+
|
| 17 |
+
int main(int argc, char **argv)
|
| 18 |
+
{
|
| 19 |
+
__m128 a = _mm_cvtph_ps(_mm_loadu_si128((const __m128i*)argv[argc-1]));
|
| 20 |
+
__m256 a8 = _mm256_cvtph_ps(_mm_loadu_si128((const __m128i*)argv[argc-2]));
|
| 21 |
+
return (int)(_mm_cvtss_f32(a) + _mm_cvtss_f32(_mm256_castps256_ps128(a8)));
|
| 22 |
+
}
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/extra_avx512bw_mask.c
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#include <immintrin.h>
|
| 2 |
+
/**
|
| 3 |
+
* Test BW mask operations due to:
|
| 4 |
+
* - MSVC has supported it since vs2019 see,
|
| 5 |
+
* https://developercommunity.visualstudio.com/content/problem/518298/missing-avx512bw-mask-intrinsics.html
|
| 6 |
+
* - Clang >= v8.0
|
| 7 |
+
* - GCC >= v7.1
|
| 8 |
+
*/
|
| 9 |
+
int main(void)
|
| 10 |
+
{
|
| 11 |
+
__mmask64 m64 = _mm512_cmpeq_epi8_mask(_mm512_set1_epi8((char)1), _mm512_set1_epi8((char)1));
|
| 12 |
+
m64 = _kor_mask64(m64, m64);
|
| 13 |
+
m64 = _kxor_mask64(m64, m64);
|
| 14 |
+
m64 = _cvtu64_mask64(_cvtmask64_u64(m64));
|
| 15 |
+
m64 = _mm512_kunpackd(m64, m64);
|
| 16 |
+
m64 = (__mmask64)_mm512_kunpackw((__mmask32)m64, (__mmask32)m64);
|
| 17 |
+
return (int)_cvtmask64_u64(m64);
|
| 18 |
+
}
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/extra_avx512dq_mask.c
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#include <immintrin.h>
|
| 2 |
+
/**
|
| 3 |
+
* Test DQ mask operations due to:
|
| 4 |
+
* - MSVC has supported it since vs2019 see,
|
| 5 |
+
* https://developercommunity.visualstudio.com/content/problem/518298/missing-avx512bw-mask-intrinsics.html
|
| 6 |
+
* - Clang >= v8.0
|
| 7 |
+
* - GCC >= v7.1
|
| 8 |
+
*/
|
| 9 |
+
int main(void)
|
| 10 |
+
{
|
| 11 |
+
__mmask8 m8 = _mm512_cmpeq_epi64_mask(_mm512_set1_epi64(1), _mm512_set1_epi64(1));
|
| 12 |
+
m8 = _kor_mask8(m8, m8);
|
| 13 |
+
m8 = _kxor_mask8(m8, m8);
|
| 14 |
+
m8 = _cvtu32_mask8(_cvtmask8_u32(m8));
|
| 15 |
+
return (int)_cvtmask8_u32(m8);
|
| 16 |
+
}
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/extra_avx512f_reduce.c
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#include <immintrin.h>
|
| 2 |
+
/**
|
| 3 |
+
* The following intrinsics don't have direct native support but compilers
|
| 4 |
+
* tend to emulate them.
|
| 5 |
+
* They're usually supported by gcc >= 7.1, clang >= 4 and icc >= 19
|
| 6 |
+
*/
|
| 7 |
+
int main(void)
|
| 8 |
+
{
|
| 9 |
+
__m512 one_ps = _mm512_set1_ps(1.0f);
|
| 10 |
+
__m512d one_pd = _mm512_set1_pd(1.0);
|
| 11 |
+
__m512i one_i64 = _mm512_set1_epi64(1);
|
| 12 |
+
// add
|
| 13 |
+
float sum_ps = _mm512_reduce_add_ps(one_ps);
|
| 14 |
+
double sum_pd = _mm512_reduce_add_pd(one_pd);
|
| 15 |
+
int sum_int = (int)_mm512_reduce_add_epi64(one_i64);
|
| 16 |
+
sum_int += (int)_mm512_reduce_add_epi32(one_i64);
|
| 17 |
+
// mul
|
| 18 |
+
sum_ps += _mm512_reduce_mul_ps(one_ps);
|
| 19 |
+
sum_pd += _mm512_reduce_mul_pd(one_pd);
|
| 20 |
+
sum_int += (int)_mm512_reduce_mul_epi64(one_i64);
|
| 21 |
+
sum_int += (int)_mm512_reduce_mul_epi32(one_i64);
|
| 22 |
+
// min
|
| 23 |
+
sum_ps += _mm512_reduce_min_ps(one_ps);
|
| 24 |
+
sum_pd += _mm512_reduce_min_pd(one_pd);
|
| 25 |
+
sum_int += (int)_mm512_reduce_min_epi32(one_i64);
|
| 26 |
+
sum_int += (int)_mm512_reduce_min_epu32(one_i64);
|
| 27 |
+
sum_int += (int)_mm512_reduce_min_epi64(one_i64);
|
| 28 |
+
// max
|
| 29 |
+
sum_ps += _mm512_reduce_max_ps(one_ps);
|
| 30 |
+
sum_pd += _mm512_reduce_max_pd(one_pd);
|
| 31 |
+
sum_int += (int)_mm512_reduce_max_epi32(one_i64);
|
| 32 |
+
sum_int += (int)_mm512_reduce_max_epu32(one_i64);
|
| 33 |
+
sum_int += (int)_mm512_reduce_max_epi64(one_i64);
|
| 34 |
+
// and
|
| 35 |
+
sum_int += (int)_mm512_reduce_and_epi32(one_i64);
|
| 36 |
+
sum_int += (int)_mm512_reduce_and_epi64(one_i64);
|
| 37 |
+
// or
|
| 38 |
+
sum_int += (int)_mm512_reduce_or_epi32(one_i64);
|
| 39 |
+
sum_int += (int)_mm512_reduce_or_epi64(one_i64);
|
| 40 |
+
return (int)sum_ps + (int)sum_pd + sum_int;
|
| 41 |
+
}
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/extra_vsx3_half_double.c
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* Assembler may not fully support the following VSX3 scalar
|
| 3 |
+
* instructions, even though compilers report VSX3 support.
|
| 4 |
+
*/
|
| 5 |
+
int main(void)
|
| 6 |
+
{
|
| 7 |
+
unsigned short bits = 0xFF;
|
| 8 |
+
double f;
|
| 9 |
+
__asm__ __volatile__("xscvhpdp %x0,%x1" : "=wa"(f) : "wa"(bits));
|
| 10 |
+
__asm__ __volatile__ ("xscvdphp %x0,%x1" : "=wa" (bits) : "wa" (f));
|
| 11 |
+
return bits;
|
| 12 |
+
}
|
pythonProject/.venv/Lib/site-packages/numpy/distutils/checks/extra_vsx4_mma.c
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef __VSX__
|
| 2 |
+
#error "VSX is not supported"
|
| 3 |
+
#endif
|
| 4 |
+
#include <altivec.h>
|
| 5 |
+
|
| 6 |
+
typedef __vector float fv4sf_t;
|
| 7 |
+
typedef __vector unsigned char vec_t;
|
| 8 |
+
|
| 9 |
+
int main(void)
|
| 10 |
+
{
|
| 11 |
+
__vector_quad acc0;
|
| 12 |
+
float a[4] = {0,1,2,3};
|
| 13 |
+
float b[4] = {0,1,2,3};
|
| 14 |
+
vec_t *va = (vec_t *) a;
|
| 15 |
+
vec_t *vb = (vec_t *) b;
|
| 16 |
+
__builtin_mma_xvf32ger(&acc0, va[0], vb[0]);
|
| 17 |
+
fv4sf_t result[4];
|
| 18 |
+
__builtin_mma_disassemble_acc((void *)result, &acc0);
|
| 19 |
+
fv4sf_t c0 = result[0];
|
| 20 |
+
return (int)((float*)&c0)[0];
|
| 21 |
+
}
|