提交 6aa42e6e 编写于 作者: M Megvii Engine Team

Merge pull request #439 from Qsingle:fix_python36_pip_url

GitOrigin-RevId: 186ae708a144c92d4cec44411caf40d240e29a42
...@@ -6,7 +6,7 @@ endif() ...@@ -6,7 +6,7 @@ endif()
if("${CUDNN_ROOT_DIR}" STREQUAL "" AND NOT "$ENV{CUDNN_ROOT_DIR}" STREQUAL "") if("${CUDNN_ROOT_DIR}" STREQUAL "" AND NOT "$ENV{CUDNN_ROOT_DIR}" STREQUAL "")
set(CUDNN_ROOT_DIR $ENV{CUDNN_ROOT_DIR}) set(CUDNN_ROOT_DIR $ENV{CUDNN_ROOT_DIR})
endif() endif()
message("CUDNN ROOT: " ${CUDNN_ROOT_DIR})
if(MGE_CUDA_USE_STATIC AND NOT MGE_WITH_CUDNN_SHARED) if(MGE_CUDA_USE_STATIC AND NOT MGE_WITH_CUDNN_SHARED)
find_library( find_library(
CUDNN_LIBRARY CUDNN_LIBRARY
...@@ -14,16 +14,19 @@ if(MGE_CUDA_USE_STATIC AND NOT MGE_WITH_CUDNN_SHARED) ...@@ -14,16 +14,19 @@ if(MGE_CUDA_USE_STATIC AND NOT MGE_WITH_CUDNN_SHARED)
PATHS ${ALTER_LD_LIBRARY_PATHS} ${CUDNN_ROOT_DIR} ${PC_CUDNN_LIBRARY_DIRS} PATHS ${ALTER_LD_LIBRARY_PATHS} ${CUDNN_ROOT_DIR} ${PC_CUDNN_LIBRARY_DIRS}
${CMAKE_INSTALL_PREFIX} ${CMAKE_INSTALL_PREFIX}
HINTS ${ALTER_LIBRARY_PATHS} HINTS ${ALTER_LIBRARY_PATHS}
PATH_SUFFIXES lib lib64 PATH_SUFFIXES lib lib64 lib/x64
DOC "CUDNN library.") DOC "CUDNN library.")
else() else()
if(MSVC)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll")
endif()
find_library( find_library(
CUDNN_LIBRARY CUDNN_LIBRARY
NAMES libcudnn.so libcudnn.dylib cudnn64.dll NAMES libcudnn.so libcudnn.dylib cudnn64_8.dll cudnn.dll cudnn64_8 cudnn
PATHS ${ALTER_LD_LIBRARY_PATHS} ${CUDNN_ROOT_DIR} ${PC_CUDNN_LIBRARY_DIRS} PATHS ${ALTER_LD_LIBRARY_PATHS} ${CUDNN_ROOT_DIR} ${PC_CUDNN_LIBRARY_DIRS}
${CMAKE_INSTALL_PREFIX} ${CMAKE_INSTALL_PREFIX}
HINTS ${ALTER_LIBRARY_PATHS} HINTS ${ALTER_LIBRARY_PATHS}
PATH_SUFFIXES lib lib64 PATH_SUFFIXES lib lib64 bin
DOC "CUDNN library.") DOC "CUDNN library.")
endif() endif()
......
...@@ -18,22 +18,25 @@ if(MGE_CUDA_USE_STATIC) ...@@ -18,22 +18,25 @@ if(MGE_CUDA_USE_STATIC)
PATH_SUFFIXES lib lib64 PATH_SUFFIXES lib lib64
DOC "TRT plugin library.") DOC "TRT plugin library.")
else() else()
if(MSVC)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll")
endif()
find_library( find_library(
TRT_LIBRARY TRT_LIBRARY
NAMES libnvinfer.so libnvinfer.dylib nvinfer.dll NAMES libnvinfer.so libnvinfer.dylib nvinfer.dll nvinfer
PATHS ${ALTER_LD_LIBRARY_PATHS} ${TRT_ROOT_DIR} ${CMAKE_INSTALL_PREFIX} PATHS ${ALTER_LD_LIBRARY_PATHS} ${TRT_ROOT_DIR} ${CMAKE_INSTALL_PREFIX}
HINTS ${ALTER_LIBRARY_PATHS} HINTS ${ALTER_LIBRARY_PATHS}
PATH_SUFFIXES lib lib64 PATH_SUFFIXES lib lib64
DOC "TRT library.") DOC "TRT library.")
find_library( find_library(
TRT_PLUGIN_LIBRARY TRT_PLUGIN_LIBRARY
NAMES libnvinfer_plugin.so libnvinfer_plugin.dylib nvinfer_plugin.dll NAMES libnvinfer_plugin.so libnvinfer_plugin.dylib nvinfer_plugin.dll nvinfer_plugin
PATHS ${ALTER_LD_LIBRARY_PATHS} ${TRT_ROOT_DIR} ${CMAKE_INSTALL_PREFIX} PATHS ${ALTER_LD_LIBRARY_PATHS} ${TRT_ROOT_DIR} ${CMAKE_INSTALL_PREFIX}
HINTS ${ALTER_LIBRARY_PATHS} HINTS ${ALTER_LIBRARY_PATHS}
PATH_SUFFIXES lib lib64 PATH_SUFFIXES lib lib64
DOC "TRT plugin library.") DOC "TRT plugin library.")
endif() endif()
message("TRT_LIBRARY" ${TRT_LIBRARY})
if(TRT_LIBRARY STREQUAL "TRT_LIBRARY-NOTFOUND") if(TRT_LIBRARY STREQUAL "TRT_LIBRARY-NOTFOUND")
message( message(
FATAL_ERROR FATAL_ERROR
...@@ -121,7 +124,8 @@ if(TensorRT_VERSION_MAJOR GREATER_EQUAL 7) ...@@ -121,7 +124,8 @@ if(TensorRT_VERSION_MAJOR GREATER_EQUAL 7)
if(MGE_CUDA_USE_STATIC) if(MGE_CUDA_USE_STATIC)
find_library( find_library(
LIBMYELIN_COMPILER LIBMYELIN_COMPILER
NAMES libmyelin_compiler_static.a myelin_compiler_static.lib NAMES libmyelin_compiler_static.a myelin_compiler_static.lib myelin64_1.lib
myelin64_1
PATHS ${__found_trt_root}/lib) PATHS ${__found_trt_root}/lib)
if(LIBMYELIN_COMPILER STREQUAL "LIBMYELIN_COMPILER-NOTFOUND") if(LIBMYELIN_COMPILER STREQUAL "LIBMYELIN_COMPILER-NOTFOUND")
message(FATAL_ERROR "Can not find LIBMYELIN_COMPILER Library") message(FATAL_ERROR "Can not find LIBMYELIN_COMPILER Library")
...@@ -134,7 +138,8 @@ if(TensorRT_VERSION_MAJOR GREATER_EQUAL 7) ...@@ -134,7 +138,8 @@ if(TensorRT_VERSION_MAJOR GREATER_EQUAL 7)
find_library( find_library(
LIBMYELIN_EXECUTOR LIBMYELIN_EXECUTOR
NAMES libmyelin_executor_static.a myelin_executor_static.lib NAMES libmyelin_executor_static.a myelin_executor_static.lib myelin64_1.lib
myelin64_1
PATHS ${__found_trt_root}/lib) PATHS ${__found_trt_root}/lib)
if(LIBMYELIN_EXECUTOR STREQUAL "LIBMYELIN_EXECUTOR-NOTFOUND") if(LIBMYELIN_EXECUTOR STREQUAL "LIBMYELIN_EXECUTOR-NOTFOUND")
message(FATAL_ERROR "Can not find LIBMYELIN_EXECUTOR Library") message(FATAL_ERROR "Can not find LIBMYELIN_EXECUTOR Library")
...@@ -148,6 +153,7 @@ if(TensorRT_VERSION_MAJOR GREATER_EQUAL 7) ...@@ -148,6 +153,7 @@ if(TensorRT_VERSION_MAJOR GREATER_EQUAL 7)
find_library( find_library(
LIBMYELIN_PATTERN_RUNTIME LIBMYELIN_PATTERN_RUNTIME
NAMES libmyelin_pattern_runtime_static.a myelin_pattern_runtime_static.lib NAMES libmyelin_pattern_runtime_static.a myelin_pattern_runtime_static.lib
myelin64_1.lib myelin64_1
PATHS ${__found_trt_root}/lib) PATHS ${__found_trt_root}/lib)
if(LIBMYELIN_PATTERN_RUNTIME STREQUAL "LIBMYELIN_PATTERN_RUNTIME-NOTFOUND") if(LIBMYELIN_PATTERN_RUNTIME STREQUAL "LIBMYELIN_PATTERN_RUNTIME-NOTFOUND")
message(FATAL_ERROR "Can not find LIBMYELIN_PATTERN_RUNTIME Library") message(FATAL_ERROR "Can not find LIBMYELIN_PATTERN_RUNTIME Library")
...@@ -162,6 +168,7 @@ if(TensorRT_VERSION_MAJOR GREATER_EQUAL 7) ...@@ -162,6 +168,7 @@ if(TensorRT_VERSION_MAJOR GREATER_EQUAL 7)
find_library( find_library(
LIBMYELIN_PATTERN_LIBRARY LIBMYELIN_PATTERN_LIBRARY
NAMES libmyelin_pattern_library_static.a myelin_pattern_library_static.lib NAMES libmyelin_pattern_library_static.a myelin_pattern_library_static.lib
myelin64_1.lib myelin64_1
PATHS ${__found_trt_root}/lib) PATHS ${__found_trt_root}/lib)
if(LIBMYELIN_PATTERN_LIBRARY STREQUAL "LIBMYELIN_PATTERN_LIBRARY-NOTFOUND") if(LIBMYELIN_PATTERN_LIBRARY STREQUAL "LIBMYELIN_PATTERN_LIBRARY-NOTFOUND")
message(FATAL_ERROR "Can not find LIBMYELIN_PATTERN_LIBRARY Library") message(FATAL_ERROR "Can not find LIBMYELIN_PATTERN_LIBRARY Library")
...@@ -175,7 +182,7 @@ if(TensorRT_VERSION_MAJOR GREATER_EQUAL 7) ...@@ -175,7 +182,7 @@ if(TensorRT_VERSION_MAJOR GREATER_EQUAL 7)
else() else()
find_library( find_library(
LIBMYELIN_SHARED LIBMYELIN_SHARED
NAMES libmyelin.so myelin.dll NAMES libmyelin.so myelin.dll myelin64_1.dll myelin64_1
PATHS ${__found_trt_root}/lib) PATHS ${__found_trt_root}/lib)
if(LIBMYELIN_SHARED STREQUAL "LIBMYELIN_SHARED-NOTFOUND") if(LIBMYELIN_SHARED STREQUAL "LIBMYELIN_SHARED-NOTFOUND")
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
GET_PIP_URL='https://bootstrap.pypa.io/get-pip.py' GET_PIP_URL='https://bootstrap.pypa.io/get-pip.py'
GET_PIP_URL_35='https://bootstrap.pypa.io/pip/3.5/get-pip.py' GET_PIP_URL_35='https://bootstrap.pypa.io/pip/3.5/get-pip.py'
GET_PIP_URL_36='https://bootstrap.pypa.io/pip/3.6/get-pip.py'
SWIG_URL='https://codeload.github.com/swig/swig/tar.gz/refs/tags/rel-3.0.12' SWIG_URL='https://codeload.github.com/swig/swig/tar.gz/refs/tags/rel-3.0.12'
LLVM_URL='https://github.com/llvm-mirror/llvm/archive/release_60.tar.gz' LLVM_URL='https://github.com/llvm-mirror/llvm/archive/release_60.tar.gz'
CLANG_URL='https://github.com/llvm-mirror/clang/archive/release_60.tar.gz' CLANG_URL='https://github.com/llvm-mirror/clang/archive/release_60.tar.gz'
...@@ -29,6 +30,9 @@ do ...@@ -29,6 +30,9 @@ do
PIP_URL=${GET_PIP_URL} PIP_URL=${GET_PIP_URL}
if [ ${ver} = "35m" ];then if [ ${ver} = "35m" ];then
PIP_URL=${GET_PIP_URL_35} PIP_URL=${GET_PIP_URL_35}
else if [ ${ver} = "36m" ];then
PIP_URL=${GET_PIP_URL_36}
fi
fi fi
echo "use pip url: ${PIP_URL}" echo "use pip url: ${PIP_URL}"
curl ${PIP_URL} | /opt/python/cp${python_ver}-cp${ver}/bin/python - \ curl ${PIP_URL} | /opt/python/cp${python_ver}-cp${ver}/bin/python - \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册