You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by me...@apache.org on 2022/05/11 16:23:17 UTC

[tvm] branch main updated: Fix running gtest on Hexagon hardware (#11257)

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

mehrdadh 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 2049185165 Fix running gtest on Hexagon hardware (#11257)
2049185165 is described below

commit 2049185165b7fbc79d69ca2d00555377eeccb772
Author: Karl Koscher <kk...@octoml.ai>
AuthorDate: Wed May 11 09:23:11 2022 -0700

    Fix running gtest on Hexagon hardware (#11257)
---
 tests/cpp-runtime/hexagon/run_all_tests.cc | 8 ++++++++
 tests/scripts/task_build_hexagon_api.sh    | 5 ++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/tests/cpp-runtime/hexagon/run_all_tests.cc b/tests/cpp-runtime/hexagon/run_all_tests.cc
index 166d89b635..720249d9d9 100644
--- a/tests/cpp-runtime/hexagon/run_all_tests.cc
+++ b/tests/cpp-runtime/hexagon/run_all_tests.cc
@@ -26,6 +26,14 @@
 
 #include "../src/support/utils.h"
 
+// Workaround for missing symbol in some QuRT builds
+#include "qurt.h"
+extern "C" {
+__attribute__((weak)) int pthread_key_delete(pthread_key_t key) {
+  return qurt_tls_delete_key((int)key);
+}
+}
+
 namespace tvm {
 namespace runtime {
 namespace hexagon {
diff --git a/tests/scripts/task_build_hexagon_api.sh b/tests/scripts/task_build_hexagon_api.sh
index 5a6a859ef1..a3b501d9c5 100755
--- a/tests/scripts/task_build_hexagon_api.sh
+++ b/tests/scripts/task_build_hexagon_api.sh
@@ -43,8 +43,7 @@ cmake -DANDROID_ABI=arm64-v8a \
     -DUSE_HEXAGON_ARCH=v68 \
     -DUSE_HEXAGON_SDK="${HEXAGON_SDK_PATH}" \
     -DUSE_HEXAGON_TOOLCHAIN="${HEXAGON_TOOLCHAIN}" \
-    -DUSE_OUTPUT_BINARY_DIR="${output_binary_directory}" ..
-    # TODO(hexagon-team): enable this once https://github.com/apache/tvm/issues/11237 is fixed.
-    # -DUSE_HEXAGON_GTEST="${HEXAGON_SDK_PATH}/utils/googletest/gtest" ..
+    -DUSE_OUTPUT_BINARY_DIR="${output_binary_directory}" \
+    -DUSE_HEXAGON_GTEST="${HEXAGON_SDK_PATH}/utils/googletest/gtest" ..
 
 make -j$(nproc)