未验证 提交 3ade55e2 编写于 作者: P Pei Yang 提交者: GitHub

[Cherry pick] fix jetson compile and add version info (#26024)

* fix cpuid.h not found

* fix-jetson-compile-pyramid_hash

* add more info to version.txt, test=develop (#24551)
上级 d1cc772b
...@@ -4,6 +4,7 @@ endif() ...@@ -4,6 +4,7 @@ endif()
if (WITH_NV_JETSON) if (WITH_NV_JETSON)
add_definitions(-DWITH_NV_JETSON)
set(paddle_known_gpu_archs "53 62 72") set(paddle_known_gpu_archs "53 62 72")
set(paddle_known_gpu_archs7 "53") set(paddle_known_gpu_archs7 "53")
set(paddle_known_gpu_archs8 "53 62") set(paddle_known_gpu_archs8 "53 62")
......
...@@ -284,11 +284,12 @@ function(version version_file) ...@@ -284,11 +284,12 @@ function(version version_file)
if(WITH_GPU) if(WITH_GPU)
file(APPEND ${version_file} file(APPEND ${version_file}
"CUDA version: ${CUDA_VERSION}\n" "CUDA version: ${CUDA_VERSION}\n"
"CUDNN version: v${CUDNN_MAJOR_VERSION}\n") "CUDNN version: v${CUDNN_MAJOR_VERSION}.${CUDNN_MINOR_VERSION}\n")
endif() endif()
file(APPEND ${version_file} "CXX compiler version: ${CMAKE_CXX_COMPILER_VERSION}\n")
if(TENSORRT_FOUND) if(TENSORRT_FOUND)
file(APPEND ${version_file} file(APPEND ${version_file}
"WITH_TENSORRT: ${TENSORRT_FOUND}\n") "WITH_TENSORRT: ${TENSORRT_FOUND}\n" "TensorRT version: v${TENSORRT_MAJOR_VERSION}\n")
endif() endif()
endfunction() endfunction()
......
...@@ -53,7 +53,7 @@ if (NOT WITH_MKL OR NOT WITH_AVX) ...@@ -53,7 +53,7 @@ if (NOT WITH_MKL OR NOT WITH_AVX)
SET(OP_MKL_DEPS ${OP_MKL_DEPS} match_matrix_tensor_op) SET(OP_MKL_DEPS ${OP_MKL_DEPS} match_matrix_tensor_op)
SET(OP_MKL_DEPS ${OP_MKL_DEPS} var_conv_2d_op) SET(OP_MKL_DEPS ${OP_MKL_DEPS} var_conv_2d_op)
endif() endif()
if(WITH_COVERAGE OR NOT WITH_AVX OR WIN32) if(WITH_COVERAGE OR NOT WITH_AVX OR WIN32 OR WITH_NV_JETSON)
SET(OP_MKL_DEPS ${OP_MKL_DEPS} pyramid_hash_op) SET(OP_MKL_DEPS ${OP_MKL_DEPS} pyramid_hash_op)
endif() endif()
......
...@@ -91,7 +91,7 @@ if(NOT WITH_MKL OR NOT WITH_AVX) ...@@ -91,7 +91,7 @@ if(NOT WITH_MKL OR NOT WITH_AVX)
list(REMOVE_ITEM TEST_OPS test_match_matrix_tensor_op) list(REMOVE_ITEM TEST_OPS test_match_matrix_tensor_op)
list(REMOVE_ITEM TEST_OPS test_var_conv_2d) list(REMOVE_ITEM TEST_OPS test_var_conv_2d)
endif() endif()
if(WITH_COVERAGE OR NOT WITH_AVX OR WIN32) if(WITH_COVERAGE OR NOT WITH_AVX OR WIN32 OR WITH_NV_JETSON)
list(REMOVE_ITEM TEST_OPS test_pyramid_hash_op) list(REMOVE_ITEM TEST_OPS test_pyramid_hash_op)
list(REMOVE_ITEM TEST_OPS test_fleet_pyramid_hash) list(REMOVE_ITEM TEST_OPS test_fleet_pyramid_hash)
endif() endif()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册