| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* BUG: don't mutate list of fake libraries while iterating over it
* BUG: iterate over copy of list
* TST: add build test for build_ext fix (#1)
* TST: add build test for build_ext fix
* TST: clearer test name
* STY: use triple quotes instead of lists of strings
* FIX: check for f77 compiler before test is run
* DOC: add comment explaining that a list copy is necessary
|
|
|
|
|
|
|
|
|
|
| |
The new path becomes `build/src.*/numpy/distutils/include/npy_cpu_dispatch_config.h`
instead of `numpy/core/src/common/_cpu_dispatch.h`.
The new path allows other projects to re-use the CPU dispatcher
once we decide to expose the following headers:
- `numpy/core/src/common/npy_cpu_dispatch.h`
- `numpy/core/src/common/npy_cpu_features.h`
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* replace superfluous single-character regex character
classes with their literal string equivalents; this
avoids the overhead associated with a character class
when there's only a single character enclosed (so there's
no benefit to the class overhead)
* for more information see:
Chapter 6 of:
Friedl, Jeffrey. Mastering Regular Expressions. 3rd ed.,
O’Reilly Media, 2009.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- use plain variables
- clean up aligned allocate
- use `PyArg_ParseTuple` for empty args
- use `Py_ssize_t` instead of `unsigned` and `size_t`
- improve coding style
- no need for a custom raises assertions
- use parametrize instead of inner loops
- leave a comment about nature of mode testing unit
- shift to get max/min of int72
- add more info to repr of vector object
- get ride of exec() and use type() instead
- use `.inc` as extension for sub-headers instead of `.h`
- add `FMA4` and drop `SSE41` from _SIMD targets
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'_simd' is a new module to bring the NumPy C SIMD vectorization interface "NPYV"
The module is designed to be extremely flexible so that it can accommodate any kind
intrinsics, also to generate a python interface almost similar to the C interface.
The main purpose of this module is to test NPYV intrinsics in python,
but still can be used as an effective solution in designing SIMD kernels.
Also add a new command-line argument `--simd-test` to control of targeted CPU features
for the `_simd` module.
Co-authored-by: Matti Picus <matti.picus@gmail.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
|
|\
| |
| | |
MAINT: explicit disabling `CCompilerOpt` in F2PY
|
| |
| |
| |
| | |
This patch also cleans up `CCompilerOpt` calls in build_ext and build_clib.
|
|/
|
|
|
|
|
| |
commands
replaces obsolete (no longer used anywhere AFICT check_compiler_gcc4
with some more general utilities for checking GCC version
|
|
|
| |
see gh-17012 item 12
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Put `CCompilerOpt` in action through add two command line
arguments that passed directly to `CCompilerOpt`'s
parameters which explained as follows:
* `--cpu-baseline` minimal set of required optimizations,
default is 'min' which provides the minimum CPU features
that can safely run on a wide range of users platforms.
* `--cpu-dispatch` dispatched set of additional optimizations,
default is 'max-xop-fma4' which enables all CPU features,
except for AMD legacy features.
the new arguments can be reached from `build`, `build_clib`,
`build_ext`, if `build_clib` or `build_ext` are not specified
by the user the arguments of `build` will be used, which also
hold the default values.
- Activate the new compiler dispatcher that comes with `CCompilerOpt`,
through adding a hock inside `build_clib` and `build_ext`
that works as a filter taking any C source files ends with
`.dispatch.c` and pass it directly to `CCompilerOpt` and
then take returned objects and linked to the final C lib.
- Add a third command-line argument `--disable-optimization` which
explicitly disable the whole new infrastructure, also
It adds a new compiler definition called `NPY_DISABLE_OPTIMIZATION`.
when `--disable-optimization` is enabled the dispatch-able sources
that end with `.dispatch.c` will be treated as a normal
C sources, also due to this disabling any C headers that
generated by `CCompilerOpt` must guard it with `NPY_DISABLE_OPTIMIZATION`,
otherwise, it will definitely break the build.
- New auto-generated C header located at `core/include/numpy/_cpu_dispatch.h`,
the new header contains all definitions and headers of CPU features that
enabled according to specified configuration in `--cpu-baseline`
and `--cpu-dispatch`.
|
|
|
|
|
|
|
|
|
|
|
|
| |
I found that when building the latest master branch on Cygwin, while testing #16246, that thousands of warnings were generated at build time like:
numpy/core/src/npysort/binsearch.c.src: In function ‘binsearch_left_bool’:
numpy/core/src/npysort/binsearch.c.src:82:1: warning: visibility attribute not supported in this configuration; ignored [-Wattributes]
Granted this is just a warning, so I don't think it's a serious issue.
It seems the test that was supposed to check for __attribute__ support was not working as expected. The #pragmas only take effect if I provide a function body--they are ignored for bare declarations. I don't know if that's by intent, or if it's a GCC issue. For reference:
$ gcc --version
gcc (GCC) 7.4.0
|
|
|
|
|
| |
* BUG: relpath fails for different drives on windows
* ENH: always use abspath
|
| |
|
| |
|
|
|
|
|
|
|
| |
* Cleanup unused imports (F401) of mostly standard Python modules,
or some internal but unlikely referenced modules
* Where internal imports are potentially used, mark with noqa
* Avoid redefinition of imports (F811)
|
|
|
|
|
|
| |
* PEP 8: "Imports should usually be on separate lines"
* Where modified, sort imported modules alphabetically
* Clean-up unused imports from these expanded lines
|
|\
| |
| | |
MAINT: cleanup use of sys.exc_info
|
| |
| |
| |
| |
| |
| | |
This code originates from python 2.6, before there was an `as` clause in `except`.
This removes all callers of `numpy.distutils.compat.get_exception`.
|
| |
| |
| |
| |
| |
| |
| | |
Inheriting from object was necessary for Python 2 compatibility to use
new-style classes. In Python 3, this is unnecessary as there are no
old-style classes.
Dropping the object is more idiomatic Python.
|
|/
|
|
|
| |
As numpy is Python 3 only, these import statements are now unnecessary
and don't alter runtime behavior.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
See also: #13880
|
|
|
|
|
|
| |
This makes it easier to visually jump between functions.
A couple places have changed to not emit leading whitespace where they previously did. Since this is C code and not fortran, that doesn't matter.
|
| |
|
|
|
|
|
|
|
|
|
| |
1) use __builtin_cpu_supports("avx512f") only for gcc ver >= 5
2) Introduced two new macro's:
HAVE_ATTRIBUTE_TARGET_@ISA@_WITH_INTRINSICS for ensuring compiler can
compile functions that use intrinsics and are compiled with avx2/avx512f
attributes
|
| |
|
|
|
|
|
|
| |
Not super important, but saves some lines. Only the low-hanging ones here.
Found while tracking down an unrelated ResourceWarning
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#12448)
* Review F401,F841,F842 flake8 errors (unused variables, imports)
* Review comments
* More tests in test_installed_npymath_ini
* Review comments
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
* replace usage of exec_command() with standard
library equivalent in the distutils config
module
|
|\
| |
| | |
MAINT: flake8 cleanups
|
| | |
|
|/
|
|
|
|
|
| |
* the single usage of exec_command in
distutils build_ext module has been
replaced with a standard library usage
of subprocess
|
| |
|
|
|
| |
Found via `codespell`
|
|
|
|
|
|
|
| |
When the gfortran functionality is not used,
we don't want to enable the __config__
functionality. This mistake was put in as an earlier
optimization but led to failures with conda.
|
|
|
|
|
|
|
|
| |
Here, we align the extra-dll name to the one
that auditwheel uses, and we handle the case where
1) there is more than one root package and
2) the root package name is different
than the distribution name
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add concept of unlinkable Fortran object files on the level of
build_clib/build_ext.
Make build_clib generate fake static libs when unlinkable object files are
present, postponing the actual linkage to build_ext.
This enables MSVC+gfortran DLL chaining to only involve those DLLs that
are actually necessary for each .pyd file, rather than linking everything
in to every file. Linking everything to everywhere has issues due to
potential symbol clashes and the fact that library build order is
unspecified.
Record shared_libs on disk instead of in system_info. This is necessary
for partial builds -- it is not guaranteed the compiler is actually called
for all of the DLL files.
Remove magic from openblas msvc detection. That this worked previously
relied on the side effect that the generated openblas DLL would be added
to shared_libs, and then being linked to all generated outputs.
|
|
|
|
|
|
|
|
|
|
| |
This allows mingw's gfortran to work with MSVC. DLLs are
autogenerated using heuristics that should work with most
cases. In addition, a libopenblas DLL is compiled from
the static lib for use with MSVC.
All generated DLLs have randomized names so that no clashes
will occur.
|
|
|
|
| |
- Now that `set` datastructure has been added the `builtin` module, we do not need to explicitly import from `sets` module
|
|
|
|
| |
Bare except is very rarely the right thing
|