33# It will search MKLML, atlas, OpenBlas, reference-cblas in order.
44#
55# If any cblas implementation found, the following variable will be set.
6- # CBLAS_PROVIDER # one of MKLML, ATLAS, OPENBLAS, REFERENCE
6+ # CBLAS_PROVIDER # one of MKLML, OPENBLAS, REFERENCE
77# CBLAS_INC_DIR # the include directory for cblas.
88# CBLAS_LIBS # a list of libraries should be linked by paddle.
99# # Each library should be full path to object file.
@@ -25,42 +25,6 @@ if(WITH_MKLML AND MKLML_INC_DIR AND MKLML_LIB)
2525 return ()
2626endif ()
2727
28- ## Then find atlas.
29- set (ATLAS_ROOT $ENV{ATLAS_ROOT} CACHE PATH "Folder contains Atlas" )
30- set (ATLAS_INCLUDE_SEARCH_PATHS
31- ${ATLAS_ROOT} /include
32- /usr/include
33- /usr/include /atlas)
34- set (ATLAS_LIB_SEARCH_PATHS
35- ${ATLAS_ROOT} /lib
36- /usr/lib
37- /usr/lib/blas/atlas
38- /usr/lib/atlas
39- /usr/lib/atlas-base # special for ubuntu 14.04.
40- )
41- find_path (ATLAS_INC_DIR NAMES cblas.h
42- PATHS ${ATLAS_INCLUDE_SEARCH_PATHS} )
43- find_path (ATLAS_CLAPACK_INC_DIR NAMES clapack.h
44- PATHS ${ATLAS_INCLUDE_SEARCH_PATHS} )
45- find_library (ATLAS_CBLAS_LIB NAMES cblas libcblas.so.3
46- PATHS ${ATLAS_LIB_SEARCH_PATHS} )
47- find_library (ATLAS_CLAPACK_LIB NAMES lapack_atlas liblapack_atlas.so.3
48- PATHS ${ATLAS_LIB_SEARCH_PATHS} )
49-
50- if (ATLAS_CLAPACK_INC_DIR AND ATLAS_INC_DIR AND ATLAS_CBLAS_LIB AND ATLAS_CLAPACK_LIB)
51- set (CBLAS_FOUND ON )
52- set (CBLAS_PROVIDER ATLAS)
53- set (CBLAS_INC_DIR ${ATLAS_INC_DIR} ${ATLAS_CLAPACK_INC_DIR} )
54- set (CBLAS_LIBRARIES ${ATLAS_CLAPACK_LIB} ${ATLAS_CBLAS_LIB} )
55-
56- add_definitions (-DPADDLE_USE_ATLAS)
57- add_definitions (-DLAPACK_FOUND)
58-
59- message (STATUS "Found ATLAS (include: ${ATLAS_INC_DIR} , library: ${CBLAS_LIBRARIES} )" )
60- message (STATUS "Found lapack in ATLAS (include: ${ATLAS_CLAPACK_INC_DIR} )" )
61- return ()
62- endif ()
63-
6428## Then find openblas.
6529set (OPENBLAS_ROOT $ENV{OPENBLAS_ROOT} CACHE PATH "Folder contains Openblas" )
6630set (OPENBLAS_INCLUDE_SEARCH_PATHS
0 commit comments