Skip to content

Commit 3ade55e

Browse files
author
Pei Yang
authored
[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)
1 parent d1cc772 commit 3ade55e

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

cmake/cuda.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ endif()
44

55

66
if (WITH_NV_JETSON)
7+
add_definitions(-DWITH_NV_JETSON)
78
set(paddle_known_gpu_archs "53 62 72")
89
set(paddle_known_gpu_archs7 "53")
910
set(paddle_known_gpu_archs8 "53 62")

cmake/inference_lib.cmake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,11 +284,12 @@ function(version version_file)
284284
if(WITH_GPU)
285285
file(APPEND ${version_file}
286286
"CUDA version: ${CUDA_VERSION}\n"
287-
"CUDNN version: v${CUDNN_MAJOR_VERSION}\n")
287+
"CUDNN version: v${CUDNN_MAJOR_VERSION}.${CUDNN_MINOR_VERSION}\n")
288288
endif()
289+
file(APPEND ${version_file} "CXX compiler version: ${CMAKE_CXX_COMPILER_VERSION}\n")
289290
if(TENSORRT_FOUND)
290291
file(APPEND ${version_file}
291-
"WITH_TENSORRT: ${TENSORRT_FOUND}\n")
292+
"WITH_TENSORRT: ${TENSORRT_FOUND}\n" "TensorRT version: v${TENSORRT_MAJOR_VERSION}\n")
292293
endif()
293294

294295
endfunction()

paddle/fluid/operators/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ if (NOT WITH_MKL OR NOT WITH_AVX)
5353
SET(OP_MKL_DEPS ${OP_MKL_DEPS} match_matrix_tensor_op)
5454
SET(OP_MKL_DEPS ${OP_MKL_DEPS} var_conv_2d_op)
5555
endif()
56-
if(WITH_COVERAGE OR NOT WITH_AVX OR WIN32)
56+
if(WITH_COVERAGE OR NOT WITH_AVX OR WIN32 OR WITH_NV_JETSON)
5757
SET(OP_MKL_DEPS ${OP_MKL_DEPS} pyramid_hash_op)
5858
endif()
5959

python/paddle/fluid/tests/unittests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ if(NOT WITH_MKL OR NOT WITH_AVX)
9191
list(REMOVE_ITEM TEST_OPS test_match_matrix_tensor_op)
9292
list(REMOVE_ITEM TEST_OPS test_var_conv_2d)
9393
endif()
94-
if(WITH_COVERAGE OR NOT WITH_AVX OR WIN32)
94+
if(WITH_COVERAGE OR NOT WITH_AVX OR WIN32 OR WITH_NV_JETSON)
9595
list(REMOVE_ITEM TEST_OPS test_pyramid_hash_op)
9696
list(REMOVE_ITEM TEST_OPS test_fleet_pyramid_hash)
9797
endif()

0 commit comments

Comments
 (0)