Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[MRG] MNT Cblas to scipy cython blas in liblinear and remove bundled cblas #13203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 7 additions & 17 deletions sklearn/setup.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import os
from os.path import join
import warnings

from sklearn._build_utils import maybe_cythonize_extensions


def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util import Configuration
from numpy.distutils.system_info import get_info, BlasNotFoundError
from numpy.distutils.system_info import get_info
import numpy

# needs to be called during build otherwise show_version may fail sometimes
get_info('blas_opt', 0)

libraries = []
if os.name == 'posix':
libraries.append('m')
Expand Down Expand Up @@ -44,7 +45,6 @@ def configuration(parent_package='', top_path=None):
config.add_subpackage('semi_supervised/tests')

# submodules which have their own setup.py
# leave out "linear_model" and "utils" for now; add them after cblas below
config.add_subpackage('cluster')
config.add_subpackage('datasets')
config.add_subpackage('decomposition')
Expand All @@ -55,7 +55,9 @@ def configuration(parent_package='', top_path=None):
config.add_subpackage('metrics')
config.add_subpackage('neighbors')
config.add_subpackage('tree')
config.add_subpackage('utils')
config.add_subpackage('svm')
config.add_subpackage('linear_model')

# add cython extension module for isotonic regression
config.add_extension('_isotonic',
Expand All @@ -64,26 +66,14 @@ def configuration(parent_package='', top_path=None):
libraries=libraries,
)

# some libs needs cblas, fortran-compiled BLAS will not be sufficient
blas_info = get_info('blas_opt', 0)
if (not blas_info) or (
('NO_ATLAS_INFO', 1) in blas_info.get('define_macros', [])):
config.add_library('cblas',
sources=[join('src', 'cblas', '*.c')])
warnings.warn(BlasNotFoundError.__doc__)

# the following packages depend on cblas, so they have to be build
# after the above.
config.add_subpackage('linear_model')
config.add_subpackage('utils')

# add the test directory
config.add_subpackage('tests')

maybe_cythonize_extensions(top_path, config)

return config


if __name__ == '__main__':
from numpy.distutils.core import setup
setup(**configuration(top_path='').todict())
133 changes: 0 additions & 133 deletions sklearn/src/cblas/ATL_drefasum.c

This file was deleted.

148 changes: 0 additions & 148 deletions sklearn/src/cblas/ATL_drefcopy.c

This file was deleted.

Loading