From 5b7ac7f398cb15aff75af96a796d69556f4946ea Mon Sep 17 00:00:00 2001 From: liuqi Date: Thu, 21 Dec 2017 15:36:01 +0800 Subject: [PATCH] Add date to git version. --- mace/tools/git/gen_version_source.sh | 3 +++ tools/validate_gcn.sh | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/mace/tools/git/gen_version_source.sh b/mace/tools/git/gen_version_source.sh index 8b7b4a18..5c646eb9 100644 --- a/mace/tools/git/gen_version_source.sh +++ b/mace/tools/git/gen_version_source.sh @@ -9,9 +9,12 @@ if [[ -z "${OUTPUT_FILENAME}}" ]]; then exit 1 fi +DATE_STR=$(date +%Y%m%d) GIT_VERSION=$(git describe --long --tags) if [[ $? != 0 ]]; then GIT_VERSION=unknown +else + GIT_VERSION=${GIT_VERSION}-${DATE_STR} fi cat < ${OUTPUT_FILENAME} diff --git a/tools/validate_gcn.sh b/tools/validate_gcn.sh index 062b6f65..d31d0986 100644 --- a/tools/validate_gcn.sh +++ b/tools/validate_gcn.sh @@ -99,10 +99,10 @@ rm -rf ${VERSION_SOURCE_PATH} mkdir -p ${VERSION_SOURCE_PATH} bash mace/tools/git/gen_version_source.sh ${VERSION_SOURCE_PATH}/version.cc -echo "Step 3: Run model on the phone with files" +echo "Step 4: Run model on the phone with files" build_and_run false -echo "Step 4: Generate OpenCL binary program and config code" +echo "Step 5: Generate OpenCL binary program and config code" rm -rf ${CL_BIN_DIR} adb pull ${KERNEL_DIR} ${CL_BIN_DIR} rm -rf ${CL_CODEGEN_DIR} @@ -110,20 +110,20 @@ mkdir -p ${CL_CODEGEN_DIR} python mace/python/tools/opencl_codegen.py \ --cl_binary_dir=${CL_BIN_DIR} --output_path=${CL_CODEGEN_DIR}/opencl_compiled_program.cc -echo "Step 5: Generate tuning source file" +echo "Step 6: Generate tuning source file" adb pull ${PHONE_DATA_DIR}/mace_run.config ${CL_BIN_DIR} mkdir -p ${TUNING_CODEGEN_DIR} python mace/python/tools/binary_codegen.py \ --binary_file=${CL_BIN_DIR}/mace_run.config --output_path=${TUNING_CODEGEN_DIR}/tuning_params.cc -echo "Step 6: Run model on the phone using binary" +echo "Step 7: Run model on the phone using binary" build_and_run true -echo "Step 7: Pull the mace run result." +echo "Step 8: Pull the mace run result." rm -rf ${MODEL_DIR}/${OUTPUT_FILE_NAME} adb