You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by le...@apache.org on 2022/06/30 15:39:47 UTC

[tvm] branch main updated: [ETHOSN][CPP-RPC] Link NPU runtime in CPP RPC build (#11946)

This is an automated email from the ASF dual-hosted git repository.

leandron pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new 1aec41aa0c [ETHOSN][CPP-RPC] Link NPU runtime in CPP RPC build (#11946)
1aec41aa0c is described below

commit 1aec41aa0c2d88d248cfd437e50bfe9a48e47988
Author: Luke Hutton <lu...@arm.com>
AuthorDate: Thu Jun 30 16:39:42 2022 +0100

    [ETHOSN][CPP-RPC] Link NPU runtime in CPP RPC build (#11946)
    
    When building the CPP RPC package with the NPU enabled,
    `link_directories` fails to find the NPU runtime libraries. This is
    presumably because the TVM runtime is linked with the PRIVATE
    option in: https://github.com/apache/tvm/blob/main/CMakeLists.txt#L601.
    Therefore working around this by following the precedent of other
    libraries such as Hexagon and Open CL.
    
    Change-Id: Iba2fbc245df18147e3b564ba807ca78c9cc8461d
---
 apps/cpp_rpc/CMakeLists.txt | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/apps/cpp_rpc/CMakeLists.txt b/apps/cpp_rpc/CMakeLists.txt
index 2fb8923d39..fc3aafcc44 100644
--- a/apps/cpp_rpc/CMakeLists.txt
+++ b/apps/cpp_rpc/CMakeLists.txt
@@ -57,6 +57,14 @@ if (BUILD_FOR_ANDROID AND USE_HEXAGON)
   list(APPEND TVM_RPC_LINKER_LIBS cdsprpc log)
 endif()
 
+if(USE_ETHOSN)
+  if (ETHOSN_RUNTIME_LIBRARY)
+    list(APPEND TVM_RPC_LINKER_LIBS ${ETHOSN_RUNTIME_LIBRARY})
+  else()
+    message(WARNING "Could not locate Arm(R) Ethos(TM)-N runtime library components")
+  endif()
+endif()
+
 if(BUILD_STATIC_RUNTIME)
   list(APPEND TVM_RPC_LINKER_LIBS -Wl,--whole-archive tvm_runtime -Wl,--no-whole-archive)
 else()