| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
MAINT: remove redundant open() modes and io.open() alias
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
This fixes a bug in distutils that prevented the use of the C++ linker
needed to link _multiarray_umath.
Fixes #23595
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* BUILD: update OpenBLAS to 0.3.21 and clean up openblas download test
* set LDFLAGS on windows64 like the openblaslib build does
* use rtools compilers on windows when building wheels
* fix typos
* add rtools gfortran to PATH
* use the openblas dll from the zip archive without rewrapping
* typos
* copy dll import library for 64-bit interfaces
* revert many of the changes to azure-steps-windows.yaml, copy openblas better in wheels
* fix wildcard copy
* test OpenBLAS build worked with threadpoolctl
* typos
* install threadpoolctl where needed, use for loop to recursively copy
* update macos OpenBLAS suffixes for newer gfortran hashes
* use libgfortran5.dylib on macos
* fix scripts
* re-use gfortran install from MacPython/gfortran-install on macos
* use pre-release version of delocate
* fixes for wheel builds/tests
* add debugging cruft for pypy+win, macos wheels
* add DYLD_LIBRARY_PATH on macosx-x86_64
* use 32-bit openblas interfaces for ppc64le tests
* skip large_archive test that sometimes segfaults on PyPy+windows
|
|
|
|
|
|
|
| |
Remove reference to Visual Studio version required by old versions
of Python. Python >= 3.5 is built with Microsoft Visual C++ 14.0 /
Visual Studio 2015:
https://wiki.python.org/moin/WindowsCompilers
|
|
|
|
|
|
|
|
| |
Numpy extensions define the extra_cxx_compile_args and extra_c_compile_args
filed, but distutils extensions don't. Take that into account when populating
build_extension.
Should fix #20928
|
|
|
|
|
|
|
|
|
|
|
|
| |
In SciPy we had a couple of cases where we build a Python extension
with C source files but linked against static libraries built from
Fortran code. Those should be using the Fortran linker, but this
was broken in 1.22.0 by gh-19713 (the PR that introduced C++ in NumPy).
This fixes a few issues in the `build_ext` command, and documents better
what is going on there.
Should close SciPy issues 8325 and 15414.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
We would like to extend CPU feature detection infrastructure
for IBM Z CPU features. Eventually It will help to add and
enable Z specific SIMD builtins and instructions.
As part of the PR, we have extended ccompiler_opt.py,
npy_cpu_features.c.src, npy_cpu_features.h, other files for
Z CPU feature detection and added test files for VX/VXE/VXE2
in distutils/checks.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
At the moment, we are guessing whether we have the MSVC compiler, by
looking at what Python was originally compiled for. That works only if
we are using the same compiler, but this is not the case when we compile
with e.g. mingw-w64 using Python.org Python.
Unfortunately, at the time we are specifying build flags, we don't know
what compiler we are using.
Allow build flags to clib to be callables that return lists of strings,
instead of strings, where the callables can do work like inspecting the
compiler, at build time.
Use this to check for MSVC at build time, when specifying the
`/GL-` flag.
See gh-9977 for a related discussion about these flags.
|
|
|
|
|
| |
This is just a technical prototype to measure and discuss the impact and
implication of moving to C++ for kernel code generation.
|
| |
|
|
|
|
|
|
|
|
|
| |
The bug can occur only if the build option `build`
was passed before the option `bdist_wheel`.
You may still realize a duplicate printing for the compiler
optimization report in the build log, which is normal due to
multiple calling of command `build` by setuptools.
|
|
|
|
|
| |
The error appears when option `build` is represented
before `bdist_wheel`.
|
|
|
|
|
| |
Same usage as the C dispatch-able sources except files extensions
should be `.dispatcher.cpp` or `.dispatch.cxx` rather than `.dispatch.c`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Added chain exception in _bits_of func
* Added chain exception
* Added chain exception in unixccompiler.py
* Added chain exception in config.py
* Added chain exception in fcompiler __init__.py
* Added chain exception in compaq.py
* Added chain exception in format.py
* Updated raise chain exception
* STY: Break long line.
Co-authored-by: Charles Harris <charlesr.harris@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|