Skip to content

Commit d12dd28

Browse files
author
zhouwg
committed
ggml-hexagon: fix a minior issue in dev ops
1 parent fe55240 commit d12dd28

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

ggml/src/ggml-hexagon/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,16 @@ function(ggml_hexagon_build_kernel KNAME)
115115
)
116116
endfunction()
117117

118+
function(ggml_hexagon_setup_cfg KNAME)
119+
message(STATUS "ggml_hexagon: setup runtime configuration file ${KNAME}")
120+
add_custom_command(
121+
TARGET ${PROJECT_NAME}
122+
POST_BUILD
123+
COMMAND echo "current working path:`pwd`\n"
124+
COMMAND /bin/cp -fv ../../../../../scripts/${KNAME} ../../../bin/
125+
COMMENT "setup runtime configuration file"
126+
)
127+
endfunction()
128+
118129
ggml_hexagon_build_kernel("cdsp")
130+
ggml_hexagon_setup_cfg("ggml-hexagon.cfg")

ggml/src/ggml-hexagon/ggml-hexagon.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1830,7 +1830,7 @@ static void ggmlhexagon_load_cfg() {
18301830
});
18311831
std::string precision_mode;
18321832
std::string ggml_hexagon_version;
1833-
hexagoncfg_instance.get_stringvalue("general", "ggml_hexagon_version", ggml_hexagon_version, "1.03");
1833+
hexagoncfg_instance.get_stringvalue("general", "version", ggml_hexagon_version, "1.00");
18341834
hexagoncfg_instance.get_intvalue("general", "enable_perf", g_hexagon_appcfg.enable_perf, 1);
18351835
hexagoncfg_instance.get_intvalue("general", "print_tensors_info", g_hexagon_appcfg.print_tensors_info, 0);
18361836
hexagoncfg_instance.get_intvalue("general", "dump_op_info", g_hexagon_appcfg.dump_op_info, 0);

scripts/build-run-android.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ function prepare_run_on_phone()
241241
adb push ./out/android/bin/*.so ${REMOTE_PATH}/
242242
fi
243243
adb push ./out/android/bin/${program} ${REMOTE_PATH}/
244+
adb push ./out/android/bin/ggml-hexagon.cfg ${REMOTE_PATH}/
244245
adb shell chmod +x ${REMOTE_PATH}/${program}
245246
}
246247

0 commit comments

Comments
 (0)