From 62a33ecfde063a9c82fd9527eaba63a501081fa9 Mon Sep 17 00:00:00 2001 From: Sven Date: Wed, 24 Nov 2021 15:18:29 +0800 Subject: [PATCH] Install libtim-vx.so to lib64 if build for aarch64 (#225) * Install libtim-vx.so to lib64 if build for aarch64 Signed-off-by: xiang.zhang --- src/tim/CMakeLists.txt | 5 +++++ src/tim/vx/tensor.cc | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/tim/CMakeLists.txt b/src/tim/CMakeLists.txt index cf850cc..0303d51 100644 --- a/src/tim/CMakeLists.txt +++ b/src/tim/CMakeLists.txt @@ -77,6 +77,11 @@ target_link_libraries(${TARGET_NAME} PUBLIC install(TARGETS ${TARGET_NAME} ${TARGET_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) +if (CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64) + install(TARGETS ${TARGET_NAME} ${TARGET_NAME} + DESTINATION ${CMAKE_INSTALL_PREFIX}/lib64) +endif() + install(DIRECTORY ${CMAKE_SOURCE_DIR}/include/tim/vx DESTINATION ${CMAKE_INSTALL_PREFIX}/include/tim) diff --git a/src/tim/vx/tensor.cc b/src/tim/vx/tensor.cc index c5f59f0..5979b43 100644 --- a/src/tim/vx/tensor.cc +++ b/src/tim/vx/tensor.cc @@ -200,7 +200,7 @@ bool TensorImpl::Init() { &attr, fd_ != -1 ? (uint8_t*)fd_ : nullptr); // and cannot be set to const #else - if (-1 == fd) { + if (-1 == fd_) { id_ = vsi_nn_AddTensorFromHandle(graph_->graph(), VSI_NN_TENSOR_ID_AUTO, &attr, nullptr); } else {