提交 cab9e5c2 编写于 作者: O op-hunter 提交者: jinhai

fix bug of openblas library install fail (#2457)

* fix bug of openblas library install fail
Signed-off-by: Ncmli <chengming.li@zilliz.com>

* fix openblas install cmakelist error
Signed-off-by: Ncmli <chengming.li@zilliz.com>
Co-authored-by: Ncmli <chengming.li@zilliz.com>
上级 15b0867f
...@@ -24,6 +24,7 @@ Please mark all change in change log and use the issue from GitHub ...@@ -24,6 +24,7 @@ Please mark all change in change log and use the issue from GitHub
- \#2399 The nlist set by the user may not take effect - \#2399 The nlist set by the user may not take effect
- \#2403 MySQL max_idle_time is 10 by default - \#2403 MySQL max_idle_time is 10 by default
- \#2450 The deleted vectors may be found on GPU - \#2450 The deleted vectors may be found on GPU
- \#2456 openblas library install failed
## Feature ## Feature
......
...@@ -18,6 +18,7 @@ include_directories(${MILVUS_THIRDPARTY_SRC}) ...@@ -18,6 +18,7 @@ include_directories(${MILVUS_THIRDPARTY_SRC})
include_directories(${MILVUS_ENGINE_SRC}/grpc/gen-status) include_directories(${MILVUS_ENGINE_SRC}/grpc/gen-status)
include_directories(${MILVUS_ENGINE_SRC}/grpc/gen-milvus) include_directories(${MILVUS_ENGINE_SRC}/grpc/gen-milvus)
set(FOUND_OPENBLAS "unknown")
add_subdirectory(index) add_subdirectory(index)
if (FAISS_WITH_MKL) if (FAISS_WITH_MKL)
add_compile_definitions("WITH_MKL") add_compile_definitions("WITH_MKL")
...@@ -333,10 +334,10 @@ install(FILES ...@@ -333,10 +334,10 @@ install(FILES
${CMAKE_BINARY_DIR}/fiu_ep-prefix/src/fiu_ep/lib/${CMAKE_SHARED_LIBRARY_PREFIX}fiu${CMAKE_SHARED_LIBRARY_SUFFIX}.1.00 ${CMAKE_BINARY_DIR}/fiu_ep-prefix/src/fiu_ep/lib/${CMAKE_SHARED_LIBRARY_PREFIX}fiu${CMAKE_SHARED_LIBRARY_SUFFIX}.1.00
DESTINATION lib) DESTINATION lib)
if(EXISTS ${CMAKE_BINARY_DIR}/src/index/openblas_ep-prefix/src/openblas_ep/lib/) if (FOUND_OPENBLAS STREQUAL "false")
install(FILES install(FILES
${CMAKE_BINARY_DIR}/src/index/openblas_ep-prefix/src/openblas_ep/lib/${CMAKE_SHARED_LIBRARY_PREFIX}openblas${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_BINARY_DIR}/src/index/openblas_ep-prefix/src/openblas_ep/lib/${CMAKE_SHARED_LIBRARY_PREFIX}openblas${CMAKE_SHARED_LIBRARY_SUFFIX}
${CMAKE_BINARY_DIR}/src/index/openblas_ep-prefix/src/openblas_ep/lib/${CMAKE_SHARED_LIBRARY_PREFIX}openblas${CMAKE_SHARED_LIBRARY_SUFFIX}.0 ${CMAKE_BINARY_DIR}/src/index/openblas_ep-prefix/src/openblas_ep/lib/${CMAKE_SHARED_LIBRARY_PREFIX}openblas${CMAKE_SHARED_LIBRARY_SUFFIX}.0
${CMAKE_BINARY_DIR}/src/index/openblas_ep-prefix/src/openblas_ep/lib/${CMAKE_SHARED_LIBRARY_PREFIX}openblas${CMAKE_SHARED_LIBRARY_SUFFIX}.0.3 ${CMAKE_BINARY_DIR}/src/index/openblas_ep-prefix/src/openblas_ep/lib/${CMAKE_SHARED_LIBRARY_PREFIX}openblas${CMAKE_SHARED_LIBRARY_SUFFIX}.0.3
DESTINATION lib) DESTINATION lib)
endif() endif()
...@@ -67,6 +67,7 @@ else() ...@@ -67,6 +67,7 @@ else()
endif() endif()
if (OpenBLAS_FOUND) if (OpenBLAS_FOUND)
set(FOUND_OPENBLAS "true" PARENT_SCOPE)
set(OpenBLAS_LIBRARIES ${OpenBLAS_LIB}) set(OpenBLAS_LIBRARIES ${OpenBLAS_LIB})
STRING(REGEX REPLACE "/libopenblas.so" "" OpenBLAS_LIB_DIR ${OpenBLAS_LIBRARIES}) STRING(REGEX REPLACE "/libopenblas.so" "" OpenBLAS_LIB_DIR ${OpenBLAS_LIBRARIES})
message(STATUS "find OpenBLAS libraries:${OpenBLAS_LIBRARIES} ") message(STATUS "find OpenBLAS libraries:${OpenBLAS_LIBRARIES} ")
...@@ -78,6 +79,7 @@ else() ...@@ -78,6 +79,7 @@ else()
message(STATUS "Found OpenBLAS include: ${OpenBLAS_INCLUDE_DIR}") message(STATUS "Found OpenBLAS include: ${OpenBLAS_INCLUDE_DIR}")
endif() endif()
else() else()
set(FOUND_OPENBLAS "false" PARENT_SCOPE)
if (OpenBLAS_FIND_REQUIRED) if (OpenBLAS_FIND_REQUIRED)
message(FATAL_ERROR "Could not find OpenBLAS") message(FATAL_ERROR "Could not find OpenBLAS")
endif() endif()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册