This is an automated email from the ASF dual-hosted git repository.
srk 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 5bd10472e9 [SCRIPT][ADRENO] Fix in build config for adreno (#16927)
5bd10472e9 is described below
commit 5bd10472e9a1b81a25e355824e84587a6988255c
Author: krishnaraj36 <[email protected]>
AuthorDate: Fri Apr 26 15:06:10 2024 +0530
[SCRIPT][ADRENO] Fix in build config for adreno (#16927)
1. Enable CXX environment setting for empty tvm subgraph.
2. Enable clml profiling and tuning in rpc environment
3. Enable Opencl when CLML build.
---
tests/scripts/setup-adreno-env.sh | 3 ++-
tests/scripts/task_build_adreno_bins.sh | 3 +++
tests/scripts/task_config_build_adreno.sh | 3 +--
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/tests/scripts/setup-adreno-env.sh
b/tests/scripts/setup-adreno-env.sh
index 15c124a0f0..d2c776412e 100755
--- a/tests/scripts/setup-adreno-env.sh
+++ b/tests/scripts/setup-adreno-env.sh
@@ -80,6 +80,7 @@ function def_environment() {
export RPC_DEVICE_KEY="android"
export RPC_TARGET="adreno"
export
TVM_NDK_CC="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android28-clang"
+ export
CXX="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android28-clang"
}
def_environment
@@ -111,7 +112,7 @@ case ${ENVIRONMENT} in
adb forward tcp:$((LISTEN_PORT + 1)) tcp:$((LISTEN_PORT + 1))
adb forward tcp:$((LISTEN_PORT + 2)) tcp:$((LISTEN_PORT + 2))
adb forward tcp:$((LISTEN_PORT + 3)) tcp:$((LISTEN_PORT + 3))
- adb shell "cd ${TARGET_FOLDER}; killall -9 tvm_rpc-${USER}; sleep 2;
LD_LIBRARY_PATH=${TARGET_FOLDER}/ ./tvm_rpc-${USER} server --host=0.0.0.0
--port=${LISTEN_PORT} --port-end=$((LISTEN_PORT + 10))
--tracker=127.0.0.1:${TVM_TRACKER_PORT} --key=${RPC_DEVICE_KEY}"
+ adb shell "cd ${TARGET_FOLDER}; killall -9 tvm_rpc-${USER}; sleep 2;
export CLML_PROFILING=1; export CLML_IS_TUNING_RUN=1; export
CLML_TUNING_CACHE=clml.bin; LD_LIBRARY_PATH=${TARGET_FOLDER}/ ./tvm_rpc-${USER}
server --host=0.0.0.0 --port=${LISTEN_PORT} --port-end=$((LISTEN_PORT + 10))
--tracker=127.0.0.1:${TVM_TRACKER_PORT} --key=${RPC_DEVICE_KEY}"
;;
"query")
diff --git a/tests/scripts/task_build_adreno_bins.sh
b/tests/scripts/task_build_adreno_bins.sh
index 80ac461c4e..38eefd93a6 100755
--- a/tests/scripts/task_build_adreno_bins.sh
+++ b/tests/scripts/task_build_adreno_bins.sh
@@ -31,6 +31,9 @@ cp ../cmake/config.cmake .
if [ -f "${ADRENO_OPENCL}/CL/cl_qcom_ml_ops.h" ] ; then
echo set\(USE_CLML "${ADRENO_OPENCL}"\) >> config.cmake
echo set\(USE_CLML_GRAPH_EXECUTOR "${ADRENO_OPENCL}"\) >> config.cmake
+fi
+if [ -f "${ADRENO_OPENCL}/CL/cl.h" ] ; then
+echo set\(USE_OPENCL "${ADRENO_OPENCL}"\) >> config.cmake
else
echo set\(USE_OPENCL ON\) >> config.cmake
fi
diff --git a/tests/scripts/task_config_build_adreno.sh
b/tests/scripts/task_config_build_adreno.sh
index afe6407cba..cf8917c9a5 100755
--- a/tests/scripts/task_config_build_adreno.sh
+++ b/tests/scripts/task_config_build_adreno.sh
@@ -26,9 +26,8 @@ cp ../cmake/config.cmake .
echo set\(USE_OPENCL_GTEST /googletest\) >> config.cmake
if [ -f "${ADRENO_OPENCL}/CL/cl_qcom_ml_ops.h" ] ; then
echo set\(USE_CLML ${ADRENO_OPENCL}\) >> config.cmake
-else
-echo set\(USE_OPENCL ON\) >> config.cmake
fi
+echo set\(USE_OPENCL ON\) >> config.cmake
echo set\(USE_RPC ON\) >> config.cmake
echo set\(USE_GRAPH_EXECUTOR ON\) >> config.cmake
echo set\(USE_LIBBACKTRACE AUTO\) >> config.cmake