Skip to content

Commit

Permalink
Remove prints and revert dispatch
Browse files Browse the repository at this point in the history
Removing the prints and providing an option that removes the dispatching for Accelerate.
  • Loading branch information
Developer-Ecosystem-Engineering committed Jul 13, 2023
1 parent 27caded commit 2432a7a
Show file tree
Hide file tree
Showing 12 changed files with 386 additions and 16,601 deletions.
6 changes: 0 additions & 6 deletions numpy/core/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -727,12 +727,6 @@ if have_blas
'src/common/cblasfuncs.c',
'src/common/python_xerbla.c',
]
if macOS13_3_or_later and not use_ilp64
src_multiarray_umath_common += [
'src/common/lapack/accelerate_wrapper.c',
'src/common/lapack/accelerate_wrapper_cblas.c',
]
endif
endif

src_multiarray = [
Expand Down
17 changes: 0 additions & 17 deletions numpy/core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,10 +710,7 @@ def get_mathlib_info(*args):
join('src', 'common', 'lowlevel_strided_loops.h'),
join('src', 'common', 'mem_overlap.h'),
join('src', 'common', 'npy_argparse.h'),
join('src', 'common', 'npy_blas_config.h'),
join('src', 'common', 'npy_blas_lapack.h'),
join('src', 'common', 'npy_cblas.h'),
join('src', 'common', 'npy_cblas_base.h'),
join('src', 'common', 'npy_config.h'),
join('src', 'common', 'npy_ctypes.h'),
join('src', 'common', 'npy_dlpack.h'),
Expand Down Expand Up @@ -759,20 +756,6 @@ def get_mathlib_info(*args):
common_src.extend([join('src', 'common', 'cblasfuncs.c'),
join('src', 'common', 'python_xerbla.c'),
])
if (
('ACCELERATE_NEW_LAPACK', None) in blas_info.get('define_macros', [])
and os.environ.get('NPY_USE_BLAS_ILP64', None) is None
):
common_deps.extend([
join('src', 'common', 'lapack', 'accelerate_legacy.h'),
join('src', 'common', 'lapack', 'accelerate_legacy_blas.h'),
join('src', 'common', 'lapack', 'accelerate_legacy_cblas.h'),
join('src', 'common', 'lapack', 'accelerate_legacy_lapack.h'),
])
common_src.extend([
join('src', 'common', 'lapack', 'accelerate_wrapper.c'),
join('src', 'common', 'lapack', 'accelerate_wrapper_cblas.c')
])
else:
extra_info = {}

Expand Down
26 changes: 0 additions & 26 deletions numpy/core/src/common/lapack/accelerate_legacy.h
Original file line number Diff line number Diff line change
@@ -1,26 +0,0 @@
#include <sys/cdefs.h>

/*
* The macros and additional headers here expose Accelerate's legacy
* BLAS / LAPACK APIs with unique names. Each API will be suffixed
* with '$LEGACY' for use in source code. Those will be hooked up
* to the legacy binary symbols.
*
* Examples:
* - dgemm
* source code: dgemm$LEGACY(...)
* binary symbol: _dgemm_
* - cblas_dgemm
* source code: cblas_dgemm$LEGACY(...)
* binary symbol: _cblas_dgemm
*/

#define __TEMPLATE_FUNC(func) __CONCAT(func,$LEGACY)
#define __TEMPLATE_ALIAS(sym) __asm("_" __STRING(sym))

#include "lapack/accelerate_legacy_blas.h"
#include "lapack/accelerate_legacy_cblas.h"
#include "lapack/accelerate_legacy_lapack.h"

#undef __TEMPLATE_FUNC
#undef __TEMPLATE_ALIAS

0 comments on commit 2432a7a

Please sign in to comment.