Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.math
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
bob
bob.math
Commits
cca86e96
There was a problem fetching the pipeline summary.
Commit
cca86e96
authored
7 years ago
by
Amir MOHAMMADI
Browse files
Options
Downloads
Patches
Plain Diff
trust numpy in finding blas/lapack. Fixes
#14
parent
34b12eb9
Branches
mccnn_rebase
No related tags found
1 merge request
!17
Migrate to conda based CI
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
setup.py
+1
-70
1 addition, 70 deletions
setup.py
with
1 addition
and
70 deletions
setup.py
+
1
−
70
View file @
cca86e96
...
@@ -77,76 +77,7 @@ if len(math_flags['libraries']) > 0 and \
...
@@ -77,76 +77,7 @@ if len(math_flags['libraries']) > 0 and \
if
lib
in
NOT_VALID
:
if
lib
in
NOT_VALID
:
math_flags
[
'
libraries
'
].
remove
(
lib
)
math_flags
[
'
libraries
'
].
remove
(
lib
)
# checks if those libraries actually exist
print
(
"
\n
LAPACK/BLAS configuration from NumPy:
"
)
found_all
=
all
([
find_library
(
lib
,
prefixes
=
math_flags
.
get
(
'
library_dirs
'
))
for
lib
in
math_flags
[
'
libraries
'
]])
if
not
found_all
:
math_flags
[
'
libraries
'
]
=
[]
# checks if any libraries are being linked, otherwise we
# search through the filesystem in stock locations.
if
not
math_flags
[
'
libraries
'
]:
# reset all entries
math_flags
=
dict
(
library_dirs
=
[],
libraries
=
[],
system_include_dirs
=
[],
define_macros
=
[],
extra_compile_args
=
[],
extra_link_args
=
[],
)
# tries first to find an MKL implementation
lapack
=
find_library
(
'
mkl_lapack64
'
)
if
not
lapack
:
# if that fails, go for openblas
lapack
=
find_library
(
'
openblas
'
)
if
not
lapack
:
# if that fails, go for the default implementation
lapack
=
find_library
(
'
lapack
'
,
subpaths
=
[
'
sse2
'
,
''
])
if
not
lapack
:
print
(
"
ERROR: LAPACK library not found - have that installed or set BOB_PREFIX_PATH to point to the correct installation prefix
"
)
sys
.
exit
(
1
)
# tries first to find an MKL implementation
blas
=
find_library
(
'
mkl
'
)
if
not
blas
:
# if that fails, go for openblas
blas
=
find_library
(
'
openblas
'
)
if
not
blas
:
# if that fails, go for the default implementation of cblas
blas
=
find_library
(
'
cblas
'
,
subpaths
=
[
'
sse2
'
,
''
])
if
not
blas
:
# if that fails, go for the default implementation of blas
blas
=
find_library
(
'
blas
'
,
subpaths
=
[
'
sse2
'
,
''
])
if
not
blas
:
print
(
"
ERROR: BLAS library not found - have that installed or set BOB_PREFIX_PATH to point to the correct installation prefix
"
)
sys
.
exit
(
1
)
# at this point both lapack and blas were detected, proceed
def
libname
(
f
):
return
os
.
path
.
splitext
(
os
.
path
.
basename
(
f
))[
0
][
3
:]
math_flags
[
'
library_dirs
'
]
=
uniq
([
os
.
path
.
dirname
(
lapack
[
0
]),
os
.
path
.
dirname
(
blas
[
0
]),
])
math_flags
[
'
libraries
'
]
=
uniq
([
libname
(
lapack
[
0
]),
libname
(
blas
[
0
])
])
print
(
"
\n
LAPACK/BLAS configuration from filesystem scan:
"
)
else
:
print
(
"
\n
LAPACK/BLAS configuration from NumPy:
"
)
print
(
"
* system include directories: %s
"
%
'
,
'
.
join
(
math_flags
[
'
system_include_dirs
'
]))
print
(
"
* system include directories: %s
"
%
'
,
'
.
join
(
math_flags
[
'
system_include_dirs
'
]))
print
(
"
* defines: %s
"
%
\
print
(
"
* defines: %s
"
%
\
'
,
'
.
join
([
'
-D%s=%s
'
%
k
for
k
in
math_flags
[
'
define_macros
'
]]))
'
,
'
.
join
([
'
-D%s=%s
'
%
k
for
k
in
math_flags
[
'
define_macros
'
]]))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment