From 8584009ba84299c460556729e9fd31fafeaa8238 Mon Sep 17 00:00:00 2001 From: zyc20010326 Date: Tue, 26 Aug 2025 09:54:27 +0800 Subject: [PATCH] fix log format --- .../0_introduction/0_helloworld/run.sh | 6 ++-- .../AclNNInvocation/run.sh | 20 ++++++------- .../10_matmul_frameworklaunch/install.sh | 4 +-- .../MatmulInvocationNeo/run.sh | 8 +++--- .../AclNNInvocation/run.sh | 20 ++++++------- .../install.sh | 4 +-- .../CppExtensions/run.sh | 4 +-- .../MatmulLeakyReluInvocation/run.sh | 8 +++--- .../MatmulLeakyReluInvocationAsync/run.sh | 8 +++--- .../14_reduce_frameworklaunch/install.sh | 4 +-- .../AclOfflineModel/run.sh | 28 +++++++++---------- .../15_sub_frameworklaunch/install.sh | 4 +-- .../AbsDuplicateKernelInvocation/run.sh | 8 +++--- .../AbsGatherMaskKernelInvocation/run.sh | 8 +++--- .../AbsPadKernelInvocation/run.sh | 8 +++--- .../AbsUnPadKernelInvocation/run.sh | 8 +++--- .../ReduceMinKernelInvocation/run.sh | 8 +++--- .../install.sh | 4 +-- .../WholeReduceSumKernelInvocation/run.sh | 8 +++--- .../AclNNInvocation/run.sh | 20 ++++++------- .../AclOfflineModel/run.sh | 28 +++++++++---------- .../AclOnlineModel/run.sh | 20 ++++++------- .../CppExtensionInvocation/build_and_run.sh | 8 +++--- .../PytorchInvocation/run_op_plugin.sh | 12 ++++---- .../AscendCustomToTensorFlowBuildIn/run.sh | 2 +- .../1_add_frameworklaunch/install.sh | 4 +-- .../MmadBiasInvocation/run.sh | 6 ++-- .../MmadInvocation/run.sh | 6 ++-- .../VectorAddMultiCoreWithTiling/run.sh | 8 +++--- .../run.sh | 8 +++--- .../VectorAddSingleCore/run.sh | 8 +++--- .../VectorAddSingleCoreWithTmpbuf/run.sh | 8 +++--- .../BareMixInvocation/run.sh | 8 +++--- .../2_add_frameworklaunchlite/install.sh | 4 +-- .../AddKernelInvocationAcl/run.sh | 8 +++--- .../AddKernelInvocationNeo/run.sh | 8 +++--- .../AddKernelInvocationTilingNeo/run.sh | 8 +++--- .../3_add_kernellaunch/CppExtensions/run.sh | 4 +-- .../AclNNInvocation/run.sh | 20 ++++++------- .../4_addn_frameworklaunch/install.sh | 4 +-- .../0_introduction/5_addn_kernellaunch/run.sh | 8 +++--- .../AclNNInvocation/run.sh | 20 ++++++------- .../6_addtemplate_frameworklaunch/install.sh | 4 +-- .../7_broadcast_frameworklaunch/install.sh | 4 +-- .../static_library/AclNNInvocation/run.sh | 24 ++++++++-------- .../static_library/OpRunner/run.sh | 8 +++--- .../static_library/install_add.sh | 4 +-- .../static_library/install_matmul.sh | 4 +-- .../AclNNInvocation/run.sh | 20 ++++++------- .../9_leakyrelu_frameworklaunch/install.sh | 4 +-- .../FrameworkLaunch/AclNNInvocation/run.sh | 26 ++++++++--------- .../0_printf/FrameworkLaunch/install.sh | 4 +-- .../KernelLaunch/MatmulInvocationNeo/run.sh | 16 +++++------ .../FrameworkLaunch/AclNNInvocation/run.sh | 20 ++++++------- .../3_assert/FrameworkLaunch/install.sh | 4 +-- .../KernelLaunch/MatmulInvocationNeo/run.sh | 6 ++-- .../DumpTensorCube/AclNNInvocation/run.sh | 26 ++++++++--------- .../FrameworkLaunch/DumpTensorCube/install.sh | 4 +-- .../DumpTensorVector/AclNNInvocation/run.sh | 26 ++++++++--------- .../DumpTensorVector/install.sh | 4 +-- .../DumpTensorKernelInvocationCube/run.sh | 12 ++++---- .../DumpTensorKernelInvocationVector/run.sh | 14 +++++----- .../12_cube_group/AclNNInvocation/run.sh | 20 ++++++------- .../2_features/12_cube_group/install.sh | 4 +-- .../MatmulABshareInvocation/run.sh | 10 +++---- .../AclNNInvocation/run.sh | 22 +++++++-------- .../14_matmul_api_constant/install.sh | 4 +-- .../16_group_barrier/AclNNInvocation/run.sh | 22 +++++++-------- .../2_features/16_group_barrier/install.sh | 4 +-- .../AddCustomTilingSink/install.sh | 2 +- operator/ascendc/2_features/2_tbufpool/run.sh | 8 +++--- 71 files changed, 365 insertions(+), 365 deletions(-) diff --git a/operator/ascendc/0_introduction/0_helloworld/run.sh b/operator/ascendc/0_introduction/0_helloworld/run.sh index 430d087bf..c08a3f749 100755 --- a/operator/ascendc/0_introduction/0_helloworld/run.sh +++ b/operator/ascendc/0_introduction/0_helloworld/run.sh @@ -21,7 +21,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -39,7 +39,7 @@ else fi fi source $_ASCEND_INSTALL_PATH/bin/setenv.bash -echo "Current compile soc version is ${SOC_VERSION}" +echo "[INFO]: Current compile soc version is ${SOC_VERSION}" rm -rf build mkdir -p build @@ -55,6 +55,6 @@ file_path=output_msg.txt count=$(grep -c "$check_msg" $file_path) if [ $count -ne 8 ]; then - echo "Error, Expected 8 occurrences of $check_msg, but found $count occurrences." + echo "[ERROR]: Expected 8 occurrences of $check_msg, but found $count occurrences." exit 1 fi \ No newline at end of file diff --git a/operator/ascendc/0_introduction/10_matmul_frameworklaunch/AclNNInvocation/run.sh b/operator/ascendc/0_introduction/10_matmul_frameworklaunch/AclNNInvocation/run.sh index 1c6b5ef46..6d7a2c9d5 100755 --- a/operator/ascendc/0_introduction/10_matmul_frameworklaunch/AclNNInvocation/run.sh +++ b/operator/ascendc/0_introduction/10_matmul_frameworklaunch/AclNNInvocation/run.sh @@ -29,10 +29,10 @@ function main { cd $CURRENT_DIR python3 scripts/gen_data.py if [ $? -ne 0 ]; then - echo "ERROR: generate input data failed!" + echo "[ERROR]: Generate input data failed!" return 1 fi - echo "INFO: generate input data success!" + echo "[INFO]: Generate input data success!" # 3. 编译acl可执行文件 cd $CURRENT_DIR @@ -41,33 +41,33 @@ function main { cd build cmake ../src -DCMAKE_SKIP_RPATH=TRUE if [ $? -ne 0 ]; then - echo "ERROR: cmake failed!" + echo "[ERROR]: Cmake failed!" return 1 fi - echo "INFO: cmake success!" + echo "[INFO]: Cmake success!" make if [ $? -ne 0 ]; then - echo "ERROR: make failed!" + echo "[ERROR]: Make failed!" return 1 fi - echo "INFO: make success!" + echo "[INFO]: Make success!" # 4. 运行可执行文件 export LD_LIBRARY_PATH=$_ASCEND_INSTALL_PATH/opp/vendors/customize/op_api/lib:$LD_LIBRARY_PATH cd $CURRENT_DIR/output - echo "INFO: execute op!" + echo "[INFO]: Execute op!" ./execute_matmul_op if [ $? -ne 0 ]; then - echo "ERROR: acl executable run failed! please check your project!" + echo "[ERROR]: Acl executable run failed! please check your project!" return 1 fi - echo "INFO: acl executable run success!" + echo "[INFO]: Acl executable run success!" # 5. 比较真值文件 cd $CURRENT_DIR python3 scripts/verify_result.py output/output_z.bin output/golden.bin if [ $? -ne 0 ]; then - echo "ERROR: verify result failed!" + echo "[ERROR]: Verify result failed!" return 1 fi } diff --git a/operator/ascendc/0_introduction/10_matmul_frameworklaunch/install.sh b/operator/ascendc/0_introduction/10_matmul_frameworklaunch/install.sh index 456a674a2..39d09c983 100755 --- a/operator/ascendc/0_introduction/10_matmul_frameworklaunch/install.sh +++ b/operator/ascendc/0_introduction/10_matmul_frameworklaunch/install.sh @@ -19,7 +19,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -27,7 +27,7 @@ done VERSION_LIST="Ascend910A Ascend910B Ascend310B1 Ascend310B2 Ascend310B3 Ascend310B4 Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi diff --git a/operator/ascendc/0_introduction/11_matmul_kernellaunch/MatmulInvocationNeo/run.sh b/operator/ascendc/0_introduction/11_matmul_kernellaunch/MatmulInvocationNeo/run.sh index 38be8f48a..bcb5a15b3 100755 --- a/operator/ascendc/0_introduction/11_matmul_kernellaunch/MatmulInvocationNeo/run.sh +++ b/operator/ascendc/0_introduction/11_matmul_kernellaunch/MatmulInvocationNeo/run.sh @@ -40,7 +40,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -48,13 +48,13 @@ done RUN_MODE_LIST="cpu sim npu" if [[ " $RUN_MODE_LIST " != *" $RUN_MODE "* ]]; then - echo "ERROR: RUN_MODE error, This sample only support specify cpu, sim or npu!" + echo "[ERROR]: RUN_MODE error, This sample only support specify cpu, sim or npu!" exit -1 fi VERSION_LIST="Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi @@ -72,7 +72,7 @@ fi export ASCEND_TOOLKIT_HOME=${_ASCEND_INSTALL_PATH} export ASCEND_HOME_PATH=${_ASCEND_INSTALL_PATH} -echo "Current compile soc version is ${SOC_VERSION}" +echo "[INFO]: Current compile soc version is ${SOC_VERSION}" source ${_ASCEND_INSTALL_PATH}/bin/setenv.bash if [ "${RUN_MODE}" = "sim" ]; then # in case of running op in simulator, use stub .so instead diff --git a/operator/ascendc/0_introduction/12_matmulleakyrelu_frameworklaunch/AclNNInvocation/run.sh b/operator/ascendc/0_introduction/12_matmulleakyrelu_frameworklaunch/AclNNInvocation/run.sh index ab64938f2..c86c7a625 100755 --- a/operator/ascendc/0_introduction/12_matmulleakyrelu_frameworklaunch/AclNNInvocation/run.sh +++ b/operator/ascendc/0_introduction/12_matmulleakyrelu_frameworklaunch/AclNNInvocation/run.sh @@ -29,10 +29,10 @@ function main { cd $CURRENT_DIR python3 scripts/gen_data.py if [ $? -ne 0 ]; then - echo "ERROR: generate input data failed!" + echo "[ERROR]: Generate input data failed!" return 1 fi - echo "INFO: generate input data success!" + echo "[INFO]: Generate input data success!" # 3. 编译acl可执行文件 cd $CURRENT_DIR @@ -41,33 +41,33 @@ function main { cd build cmake ../src -DCMAKE_SKIP_RPATH=TRUE if [ $? -ne 0 ]; then - echo "ERROR: cmake failed!" + echo "[ERROR]: Cmake failed!" return 1 fi - echo "INFO: cmake success!" + echo "[INFO]: Cmake success!" make if [ $? -ne 0 ]; then - echo "ERROR: make failed!" + echo "[ERROR]: Make failed!" return 1 fi - echo "INFO: make success!" + echo "[INFO]: Make success!" # 4. 运行可执行文件 export LD_LIBRARY_PATH=$_ASCEND_INSTALL_PATH/opp/vendors/customize/op_api/lib:$LD_LIBRARY_PATH cd $CURRENT_DIR/output - echo "INFO: execute op!" + echo "[INFO]: Execute op!" ./execute_matmul_leakyrelu_op if [ $? -ne 0 ]; then - echo "ERROR: acl executable run failed! please check your project!" + echo "[ERROR]: Acl executable run failed! please check your project!" return 1 fi - echo "INFO: acl executable run success!" + echo "[INFO]: Acl executable run success!" # 5. 比较真值文件 cd $CURRENT_DIR python3 scripts/verify_result.py output/output_z.bin output/golden.bin if [ $? -ne 0 ]; then - echo "ERROR: verify result failed!" + echo "[ERROR]: Verify result failed!" return 1 fi } diff --git a/operator/ascendc/0_introduction/12_matmulleakyrelu_frameworklaunch/install.sh b/operator/ascendc/0_introduction/12_matmulleakyrelu_frameworklaunch/install.sh index 0012db2a0..1ca7720b9 100755 --- a/operator/ascendc/0_introduction/12_matmulleakyrelu_frameworklaunch/install.sh +++ b/operator/ascendc/0_introduction/12_matmulleakyrelu_frameworklaunch/install.sh @@ -19,7 +19,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -27,7 +27,7 @@ done VERSION_LIST="Ascend910A Ascend910B Ascend310B1 Ascend310B2 Ascend310B3 Ascend310B4 Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi diff --git a/operator/ascendc/0_introduction/13_matmulleakyrelu_kernellaunch/CppExtensions/run.sh b/operator/ascendc/0_introduction/13_matmulleakyrelu_kernellaunch/CppExtensions/run.sh index c3bbcb7a6..ae46c5ab1 100755 --- a/operator/ascendc/0_introduction/13_matmulleakyrelu_kernellaunch/CppExtensions/run.sh +++ b/operator/ascendc/0_introduction/13_matmulleakyrelu_kernellaunch/CppExtensions/run.sh @@ -21,7 +21,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -39,7 +39,7 @@ else fi fi source $_ASCEND_INSTALL_PATH/bin/setenv.bash -echo "Current compile soc version is ${SOC_VERSION}" +echo "[INFO]: Current compile soc version is ${SOC_VERSION}" set -e pip3 install pybind11 diff --git a/operator/ascendc/0_introduction/13_matmulleakyrelu_kernellaunch/MatmulLeakyReluInvocation/run.sh b/operator/ascendc/0_introduction/13_matmulleakyrelu_kernellaunch/MatmulLeakyReluInvocation/run.sh index 38be8f48a..bcb5a15b3 100755 --- a/operator/ascendc/0_introduction/13_matmulleakyrelu_kernellaunch/MatmulLeakyReluInvocation/run.sh +++ b/operator/ascendc/0_introduction/13_matmulleakyrelu_kernellaunch/MatmulLeakyReluInvocation/run.sh @@ -40,7 +40,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -48,13 +48,13 @@ done RUN_MODE_LIST="cpu sim npu" if [[ " $RUN_MODE_LIST " != *" $RUN_MODE "* ]]; then - echo "ERROR: RUN_MODE error, This sample only support specify cpu, sim or npu!" + echo "[ERROR]: RUN_MODE error, This sample only support specify cpu, sim or npu!" exit -1 fi VERSION_LIST="Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi @@ -72,7 +72,7 @@ fi export ASCEND_TOOLKIT_HOME=${_ASCEND_INSTALL_PATH} export ASCEND_HOME_PATH=${_ASCEND_INSTALL_PATH} -echo "Current compile soc version is ${SOC_VERSION}" +echo "[INFO]: Current compile soc version is ${SOC_VERSION}" source ${_ASCEND_INSTALL_PATH}/bin/setenv.bash if [ "${RUN_MODE}" = "sim" ]; then # in case of running op in simulator, use stub .so instead diff --git a/operator/ascendc/0_introduction/13_matmulleakyrelu_kernellaunch/MatmulLeakyReluInvocationAsync/run.sh b/operator/ascendc/0_introduction/13_matmulleakyrelu_kernellaunch/MatmulLeakyReluInvocationAsync/run.sh index d66cd3aa4..6725992d5 100755 --- a/operator/ascendc/0_introduction/13_matmulleakyrelu_kernellaunch/MatmulLeakyReluInvocationAsync/run.sh +++ b/operator/ascendc/0_introduction/13_matmulleakyrelu_kernellaunch/MatmulLeakyReluInvocationAsync/run.sh @@ -40,7 +40,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -48,13 +48,13 @@ done RUN_MODE_LIST="cpu sim npu" if [[ " $RUN_MODE_LIST " != *" $RUN_MODE "* ]]; then - echo "ERROR: RUN_MODE error, This sample only support specify cpu, sim or npu!" + echo "[ERROR]: RUN_MODE error, This sample only support specify cpu, sim or npu!" exit -1 fi VERSION_LIST="Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi @@ -72,7 +72,7 @@ fi export ASCEND_TOOLKIT_HOME=${_ASCEND_INSTALL_PATH} export ASCEND_HOME_PATH=${_ASCEND_INSTALL_PATH} -echo "Current compile soc version is ${SOC_VERSION}" +echo "[INFO]: Current compile soc version is ${SOC_VERSION}" source ${_ASCEND_INSTALL_PATH}/bin/setenv.bash if [ "${RUN_MODE}" = "sim" ]; then # in case of running op in simulator, use stub .so instead diff --git a/operator/ascendc/0_introduction/14_reduce_frameworklaunch/install.sh b/operator/ascendc/0_introduction/14_reduce_frameworklaunch/install.sh index d092dcd78..a30696938 100755 --- a/operator/ascendc/0_introduction/14_reduce_frameworklaunch/install.sh +++ b/operator/ascendc/0_introduction/14_reduce_frameworklaunch/install.sh @@ -19,7 +19,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -27,7 +27,7 @@ done VERSION_LIST="Ascend910A Ascend910B Ascend310B1 Ascend310B2 Ascend310B3 Ascend310B4 Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi diff --git a/operator/ascendc/0_introduction/15_sub_frameworklaunch/AclOfflineModel/run.sh b/operator/ascendc/0_introduction/15_sub_frameworklaunch/AclOfflineModel/run.sh index 42b822522..7ba62608a 100755 --- a/operator/ascendc/0_introduction/15_sub_frameworklaunch/AclOfflineModel/run.sh +++ b/operator/ascendc/0_introduction/15_sub_frameworklaunch/AclOfflineModel/run.sh @@ -23,7 +23,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -73,7 +73,7 @@ def get_soc_version(): print(get_soc_version()) ''') if [[ ${SOC_VERSION_CONCAT}"x" = "x" ]]; then - echo "ERROR: SOC_VERSION_CONCAT is invalid!" + echo "[ERROR]: SOC_VERSION_CONCAT is invalid!" return 1 fi SOC_FULL_VERSION=$(echo $SOC_VERSION_CONCAT | cut -d ',' -f 1) @@ -82,7 +82,7 @@ print(get_soc_version()) function main { if [[ ${IS_DYNAMIC}"x" = "x" ]]; then - echo "ERROR: IS_DYNAMIC is invalid!" + echo "[ERROR]: IS_DYNAMIC is invalid!" return 1 fi @@ -102,10 +102,10 @@ function main { cd $CURRENT_DIR python3 scripts/gen_data.py if [ $? -ne 0 ]; then - echo "ERROR: generate input data failed!" + echo "[ERROR]: Generate input data failed!" return 1 fi - echo "INFO: generate input data success!" + echo "[INFO]: Generate input data success!" # 4. 编译acl可执行文件 cd $CURRENT_DIR @@ -114,37 +114,37 @@ function main { cd build cmake ../src -DCMAKE_SKIP_RPATH=TRUE if [ $? -ne 0 ]; then - echo "ERROR: cmake failed!" + echo "[ERROR]: Cmake failed!" return 1 fi - echo "INFO: cmake success!" + echo "[INFO]: Cmake success!" make if [ $? -ne 0 ]; then - echo "ERROR: make failed!" + echo "[ERROR]: Make failed!" return 1 fi - echo "INFO: make success!" + echo "[INFO]: Make success!" # 5. 运行可执行文件 cd $CURRENT_DIR/output if [ $IS_DYNAMIC == 1 ]; then - echo "INFO: execute dynamic op!" + echo "[INFO]: Execute dynamic op!" ./execute_sub_op $IS_DYNAMIC 999 else - echo "INFO: execute static op!" + echo "[INFO]: Execute static op!" ./execute_sub_op fi if [ $? -ne 0 ]; then - echo "ERROR: acl executable run failed! please check your project!" + echo "[ERROR]: Acl executable run failed! please check your project!" return 1 fi - echo "INFO: acl executable run success!" + echo "[INFO]: Acl executable run success!" # 6. 比较真值文件 cd $CURRENT_DIR python3 scripts/verify_result.py output/output_z.bin output/golden.bin if [ $? -ne 0 ]; then - echo "ERROR: verify result failed!" + echo "[ERROR]: Verify result failed!" return 1 fi } diff --git a/operator/ascendc/0_introduction/15_sub_frameworklaunch/install.sh b/operator/ascendc/0_introduction/15_sub_frameworklaunch/install.sh index e98fed73e..9595670fa 100755 --- a/operator/ascendc/0_introduction/15_sub_frameworklaunch/install.sh +++ b/operator/ascendc/0_introduction/15_sub_frameworklaunch/install.sh @@ -19,7 +19,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -27,7 +27,7 @@ done VERSION_LIST="Ascend910A Ascend910B Ascend310B1 Ascend310B2 Ascend310B3 Ascend310B4 Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi diff --git a/operator/ascendc/0_introduction/16_unaligned_abs_kernellaunch/AbsDuplicateKernelInvocation/run.sh b/operator/ascendc/0_introduction/16_unaligned_abs_kernellaunch/AbsDuplicateKernelInvocation/run.sh index 08570fe09..9204f113f 100644 --- a/operator/ascendc/0_introduction/16_unaligned_abs_kernellaunch/AbsDuplicateKernelInvocation/run.sh +++ b/operator/ascendc/0_introduction/16_unaligned_abs_kernellaunch/AbsDuplicateKernelInvocation/run.sh @@ -53,7 +53,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -61,12 +61,12 @@ done RUN_MODE_LIST="cpu sim npu" if [[ " $RUN_MODE_LIST " != *" $RUN_MODE "* ]]; then - echo "ERROR: RUN_MODE error, This sample only support specify cpu, sim or npu!" + echo "[ERROR]: RUN_MODE error, This sample only support specify cpu, sim or npu!" exit -1 fi if [[ " ${!VersionMap[*]} " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [${!VersionMap[*]}]" + echo "[ERROR]: SOC_VERSION should be in [${!VersionMap[*]}]" exit -1 fi _SOC_VERSION=${VersionMap[$SOC_VERSION]} @@ -85,7 +85,7 @@ fi export ASCEND_TOOLKIT_HOME=${_ASCEND_INSTALL_PATH} export ASCEND_HOME_PATH=${_ASCEND_INSTALL_PATH} -echo "Current compile soc version is ${SOC_VERSION}" +echo "[INFO]: Current compile soc version is ${SOC_VERSION}" source ${_ASCEND_INSTALL_PATH}/bin/setenv.bash if [ "${RUN_MODE}" = "sim" ]; then # in case of running op in simulator, use stub .so instead diff --git a/operator/ascendc/0_introduction/16_unaligned_abs_kernellaunch/AbsGatherMaskKernelInvocation/run.sh b/operator/ascendc/0_introduction/16_unaligned_abs_kernellaunch/AbsGatherMaskKernelInvocation/run.sh index 08570fe09..9204f113f 100755 --- a/operator/ascendc/0_introduction/16_unaligned_abs_kernellaunch/AbsGatherMaskKernelInvocation/run.sh +++ b/operator/ascendc/0_introduction/16_unaligned_abs_kernellaunch/AbsGatherMaskKernelInvocation/run.sh @@ -53,7 +53,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -61,12 +61,12 @@ done RUN_MODE_LIST="cpu sim npu" if [[ " $RUN_MODE_LIST " != *" $RUN_MODE "* ]]; then - echo "ERROR: RUN_MODE error, This sample only support specify cpu, sim or npu!" + echo "[ERROR]: RUN_MODE error, This sample only support specify cpu, sim or npu!" exit -1 fi if [[ " ${!VersionMap[*]} " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [${!VersionMap[*]}]" + echo "[ERROR]: SOC_VERSION should be in [${!VersionMap[*]}]" exit -1 fi _SOC_VERSION=${VersionMap[$SOC_VERSION]} @@ -85,7 +85,7 @@ fi export ASCEND_TOOLKIT_HOME=${_ASCEND_INSTALL_PATH} export ASCEND_HOME_PATH=${_ASCEND_INSTALL_PATH} -echo "Current compile soc version is ${SOC_VERSION}" +echo "[INFO]: Current compile soc version is ${SOC_VERSION}" source ${_ASCEND_INSTALL_PATH}/bin/setenv.bash if [ "${RUN_MODE}" = "sim" ]; then # in case of running op in simulator, use stub .so instead diff --git a/operator/ascendc/0_introduction/16_unaligned_abs_kernellaunch/AbsPadKernelInvocation/run.sh b/operator/ascendc/0_introduction/16_unaligned_abs_kernellaunch/AbsPadKernelInvocation/run.sh index 08570fe09..9204f113f 100755 --- a/operator/ascendc/0_introduction/16_unaligned_abs_kernellaunch/AbsPadKernelInvocation/run.sh +++ b/operator/ascendc/0_introduction/16_unaligned_abs_kernellaunch/AbsPadKernelInvocation/run.sh @@ -53,7 +53,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -61,12 +61,12 @@ done RUN_MODE_LIST="cpu sim npu" if [[ " $RUN_MODE_LIST " != *" $RUN_MODE "* ]]; then - echo "ERROR: RUN_MODE error, This sample only support specify cpu, sim or npu!" + echo "[ERROR]: RUN_MODE error, This sample only support specify cpu, sim or npu!" exit -1 fi if [[ " ${!VersionMap[*]} " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [${!VersionMap[*]}]" + echo "[ERROR]: SOC_VERSION should be in [${!VersionMap[*]}]" exit -1 fi _SOC_VERSION=${VersionMap[$SOC_VERSION]} @@ -85,7 +85,7 @@ fi export ASCEND_TOOLKIT_HOME=${_ASCEND_INSTALL_PATH} export ASCEND_HOME_PATH=${_ASCEND_INSTALL_PATH} -echo "Current compile soc version is ${SOC_VERSION}" +echo "[INFO]: Current compile soc version is ${SOC_VERSION}" source ${_ASCEND_INSTALL_PATH}/bin/setenv.bash if [ "${RUN_MODE}" = "sim" ]; then # in case of running op in simulator, use stub .so instead diff --git a/operator/ascendc/0_introduction/16_unaligned_abs_kernellaunch/AbsUnPadKernelInvocation/run.sh b/operator/ascendc/0_introduction/16_unaligned_abs_kernellaunch/AbsUnPadKernelInvocation/run.sh index 08570fe09..9204f113f 100755 --- a/operator/ascendc/0_introduction/16_unaligned_abs_kernellaunch/AbsUnPadKernelInvocation/run.sh +++ b/operator/ascendc/0_introduction/16_unaligned_abs_kernellaunch/AbsUnPadKernelInvocation/run.sh @@ -53,7 +53,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -61,12 +61,12 @@ done RUN_MODE_LIST="cpu sim npu" if [[ " $RUN_MODE_LIST " != *" $RUN_MODE "* ]]; then - echo "ERROR: RUN_MODE error, This sample only support specify cpu, sim or npu!" + echo "[ERROR]: RUN_MODE error, This sample only support specify cpu, sim or npu!" exit -1 fi if [[ " ${!VersionMap[*]} " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [${!VersionMap[*]}]" + echo "[ERROR]: SOC_VERSION should be in [${!VersionMap[*]}]" exit -1 fi _SOC_VERSION=${VersionMap[$SOC_VERSION]} @@ -85,7 +85,7 @@ fi export ASCEND_TOOLKIT_HOME=${_ASCEND_INSTALL_PATH} export ASCEND_HOME_PATH=${_ASCEND_INSTALL_PATH} -echo "Current compile soc version is ${SOC_VERSION}" +echo "[INFO]: Current compile soc version is ${SOC_VERSION}" source ${_ASCEND_INSTALL_PATH}/bin/setenv.bash if [ "${RUN_MODE}" = "sim" ]; then # in case of running op in simulator, use stub .so instead diff --git a/operator/ascendc/0_introduction/17_unaligned_reducemin_kernellaunch/ReduceMinKernelInvocation/run.sh b/operator/ascendc/0_introduction/17_unaligned_reducemin_kernellaunch/ReduceMinKernelInvocation/run.sh index 08570fe09..9204f113f 100644 --- a/operator/ascendc/0_introduction/17_unaligned_reducemin_kernellaunch/ReduceMinKernelInvocation/run.sh +++ b/operator/ascendc/0_introduction/17_unaligned_reducemin_kernellaunch/ReduceMinKernelInvocation/run.sh @@ -53,7 +53,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -61,12 +61,12 @@ done RUN_MODE_LIST="cpu sim npu" if [[ " $RUN_MODE_LIST " != *" $RUN_MODE "* ]]; then - echo "ERROR: RUN_MODE error, This sample only support specify cpu, sim or npu!" + echo "[ERROR]: RUN_MODE error, This sample only support specify cpu, sim or npu!" exit -1 fi if [[ " ${!VersionMap[*]} " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [${!VersionMap[*]}]" + echo "[ERROR]: SOC_VERSION should be in [${!VersionMap[*]}]" exit -1 fi _SOC_VERSION=${VersionMap[$SOC_VERSION]} @@ -85,7 +85,7 @@ fi export ASCEND_TOOLKIT_HOME=${_ASCEND_INSTALL_PATH} export ASCEND_HOME_PATH=${_ASCEND_INSTALL_PATH} -echo "Current compile soc version is ${SOC_VERSION}" +echo "[INFO]: Current compile soc version is ${SOC_VERSION}" source ${_ASCEND_INSTALL_PATH}/bin/setenv.bash if [ "${RUN_MODE}" = "sim" ]; then # in case of running op in simulator, use stub .so instead diff --git a/operator/ascendc/0_introduction/18_unaligned_wholereduces_frameworklaunch/install.sh b/operator/ascendc/0_introduction/18_unaligned_wholereduces_frameworklaunch/install.sh index 7dab3141f..f66ba50c6 100755 --- a/operator/ascendc/0_introduction/18_unaligned_wholereduces_frameworklaunch/install.sh +++ b/operator/ascendc/0_introduction/18_unaligned_wholereduces_frameworklaunch/install.sh @@ -19,7 +19,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -27,7 +27,7 @@ done VERSION_LIST="Ascend910A Ascend910B Ascend310B1 Ascend310B2 Ascend310B3 Ascend310B4 Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi diff --git a/operator/ascendc/0_introduction/19_unaligned_wholereduces_kernellaunch/WholeReduceSumKernelInvocation/run.sh b/operator/ascendc/0_introduction/19_unaligned_wholereduces_kernellaunch/WholeReduceSumKernelInvocation/run.sh index f09ddb475..522470602 100755 --- a/operator/ascendc/0_introduction/19_unaligned_wholereduces_kernellaunch/WholeReduceSumKernelInvocation/run.sh +++ b/operator/ascendc/0_introduction/19_unaligned_wholereduces_kernellaunch/WholeReduceSumKernelInvocation/run.sh @@ -40,7 +40,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -48,13 +48,13 @@ done RUN_MODE_LIST="cpu sim npu" if [[ " $RUN_MODE_LIST " != *" $RUN_MODE "* ]]; then - echo "ERROR: RUN_MODE error, This sample only support specify cpu, sim or npu!" + echo "[ERROR]: RUN_MODE error, This sample only support specify cpu, sim or npu!" exit -1 fi VERSION_LIST="Ascend910A Ascend910B Ascend310B1 Ascend310B2 Ascend310B3 Ascend310B4 Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi @@ -72,7 +72,7 @@ fi export ASCEND_TOOLKIT_HOME=${_ASCEND_INSTALL_PATH} export ASCEND_HOME_PATH=${_ASCEND_INSTALL_PATH} -echo "Current compile soc version is ${SOC_VERSION}" +echo "[INFO]: Current compile soc version is ${SOC_VERSION}" source ${_ASCEND_INSTALL_PATH}/bin/setenv.bash if [ "${RUN_MODE}" = "sim" ]; then # in case of running op in simulator, use stub .so instead diff --git a/operator/ascendc/0_introduction/1_add_frameworklaunch/AclNNInvocation/run.sh b/operator/ascendc/0_introduction/1_add_frameworklaunch/AclNNInvocation/run.sh index a652bf478..00bdad141 100755 --- a/operator/ascendc/0_introduction/1_add_frameworklaunch/AclNNInvocation/run.sh +++ b/operator/ascendc/0_introduction/1_add_frameworklaunch/AclNNInvocation/run.sh @@ -29,10 +29,10 @@ function main { cd $CURRENT_DIR python3 scripts/gen_data.py if [ $? -ne 0 ]; then - echo "ERROR: generate input data failed!" + echo "[ERROR]: Generate input data failed!" return 1 fi - echo "INFO: generate input data success!" + echo "[INFO]: Generate input data success!" # 3. 编译可执行文件 cd $CURRENT_DIR @@ -41,33 +41,33 @@ function main { cd build cmake ../src -DCMAKE_SKIP_RPATH=TRUE if [ $? -ne 0 ]; then - echo "ERROR: cmake failed!" + echo "[ERROR]: Cmake failed!" return 1 fi - echo "INFO: cmake success!" + echo "[INFO]: Cmake success!" make if [ $? -ne 0 ]; then - echo "ERROR: make failed!" + echo "[ERROR]: Make failed!" return 1 fi - echo "INFO: make success!" + echo "[INFO]: Make success!" # 4. 运行可执行文件 export LD_LIBRARY_PATH=$_ASCEND_INSTALL_PATH/opp/vendors/customize/op_api/lib:$LD_LIBRARY_PATH cd $CURRENT_DIR/output - echo "INFO: execute op!" + echo "[INFO]: Execute op!" ./execute_add_op if [ $? -ne 0 ]; then - echo "ERROR: acl executable run failed! please check your project!" + echo "[ERROR]: Acl executable run failed! please check your project!" return 1 fi - echo "INFO: acl executable run success!" + echo "[INFO]: Acl executable run success!" # 5. 精度比对 cd $CURRENT_DIR python3 scripts/verify_result.py output/output_z.bin output/golden.bin if [ $? -ne 0 ]; then - echo "ERROR: verify result failed!" + echo "[ERROR]: Verify result failed!" return 1 fi } diff --git a/operator/ascendc/0_introduction/1_add_frameworklaunch/AclOfflineModel/run.sh b/operator/ascendc/0_introduction/1_add_frameworklaunch/AclOfflineModel/run.sh index e2aff0259..7ad4ee9f8 100755 --- a/operator/ascendc/0_introduction/1_add_frameworklaunch/AclOfflineModel/run.sh +++ b/operator/ascendc/0_introduction/1_add_frameworklaunch/AclOfflineModel/run.sh @@ -23,7 +23,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -73,7 +73,7 @@ def get_soc_version(): print(get_soc_version()) ''') if [[ ${SOC_VERSION_CONCAT}"x" = "x" ]]; then - echo "ERROR: SOC_VERSION_CONCAT is invalid!" + echo "[ERROR]: SOC_VERSION_CONCAT is invalid!" return 1 fi SOC_FULL_VERSION=$(echo $SOC_VERSION_CONCAT | cut -d ',' -f 1) @@ -82,7 +82,7 @@ print(get_soc_version()) function main { if [[ ${IS_DYNAMIC}"x" = "x" ]]; then - echo "ERROR: IS_DYNAMIC is invalid!" + echo "[ERROR]: IS_DYNAMIC is invalid!" return 1 fi @@ -102,10 +102,10 @@ function main { cd $CURRENT_DIR python3 scripts/gen_data.py if [ $? -ne 0 ]; then - echo "ERROR: generate input data failed!" + echo "[ERROR]: Generate input data failed!" return 1 fi - echo "INFO: generate input data success!" + echo "[INFO]: Generate input data success!" # 4. 编译acl可执行文件 cd $CURRENT_DIR @@ -114,37 +114,37 @@ function main { cd build cmake ../src -DCMAKE_SKIP_RPATH=TRUE if [ $? -ne 0 ]; then - echo "ERROR: cmake failed!" + echo "[ERROR]: Cmake failed!" return 1 fi - echo "INFO: cmake success!" + echo "[INFO]: Cmake success!" make if [ $? -ne 0 ]; then - echo "ERROR: make failed!" + echo "[ERROR]: Make failed!" return 1 fi - echo "INFO: make success!" + echo "[INFO]: Make success!" # 5. 运行可执行文件 cd $CURRENT_DIR/output if [ $IS_DYNAMIC == 1 ]; then - echo "INFO: execute dynamic op!" + echo "[INFO]: Execute dynamic op!" ./execute_add_op $IS_DYNAMIC 2048 else - echo "INFO: execute static op!" + echo "[INFO]: Execute static op!" ./execute_add_op fi if [ $? -ne 0 ]; then - echo "ERROR: acl executable run failed! please check your project!" + echo "[ERROR]: Acl executable run failed! please check your project!" return 1 fi - echo "INFO: acl executable run success!" + echo "[INFO]: Acl executable run success!" # 6. 比较真值文件 cd $CURRENT_DIR python3 scripts/verify_result.py output/output_z.bin output/golden.bin if [ $? -ne 0 ]; then - echo "ERROR: verify result failed!" + echo "[ERROR]: Verify result failed!" return 1 fi } diff --git a/operator/ascendc/0_introduction/1_add_frameworklaunch/AclOnlineModel/run.sh b/operator/ascendc/0_introduction/1_add_frameworklaunch/AclOnlineModel/run.sh index acd409c6f..01ae806ab 100755 --- a/operator/ascendc/0_introduction/1_add_frameworklaunch/AclOnlineModel/run.sh +++ b/operator/ascendc/0_introduction/1_add_frameworklaunch/AclOnlineModel/run.sh @@ -29,10 +29,10 @@ function main { cd $CURRENT_DIR python3 scripts/gen_data.py if [ $? -ne 0 ]; then - echo "ERROR: generate input data failed!" + echo "[ERROR]: Generate input data failed!" return 1 fi - echo "INFO: generate input data success!" + echo "[INFO]: Generate input data success!" # 3. 编译acl可执行文件 cd $CURRENT_DIR @@ -41,32 +41,32 @@ function main { cd build cmake ../src -DCMAKE_SKIP_RPATH=TRUE if [ $? -ne 0 ]; then - echo "ERROR: cmake failed!" + echo "[ERROR]: Cmake failed!" return 1 fi - echo "INFO: cmake success!" + echo "[INFO]: Cmake success!" make if [ $? -ne 0 ]; then - echo "ERROR: make failed!" + echo "[ERROR]: Make failed!" return 1 fi - echo "INFO: make success!" + echo "[INFO]: Make success!" # 4. 运行可执行文件 cd $CURRENT_DIR/output - echo "INFO: execute op!" + echo "[INFO]: Execute op!" ./execute_add_op if [ $? -ne 0 ]; then - echo "ERROR: acl executable run failed! please check your project!" + echo "[ERROR]: Acl executable run failed! please check your project!" return 1 fi - echo "INFO: acl executable run success!" + echo "[INFO]: Acl executable run success!" # 5. 比较真值文件 cd $CURRENT_DIR python3 scripts/verify_result.py output/output_z.bin output/golden.bin if [ $? -ne 0 ]; then - echo "ERROR: verify result failed!" + echo "[ERROR]: Verify result failed!" return 1 fi } diff --git a/operator/ascendc/0_introduction/1_add_frameworklaunch/CppExtensionInvocation/build_and_run.sh b/operator/ascendc/0_introduction/1_add_frameworklaunch/CppExtensionInvocation/build_and_run.sh index 497954c8e..0db77830a 100644 --- a/operator/ascendc/0_introduction/1_add_frameworklaunch/CppExtensionInvocation/build_and_run.sh +++ b/operator/ascendc/0_introduction/1_add_frameworklaunch/CppExtensionInvocation/build_and_run.sh @@ -25,13 +25,13 @@ pip3 install *.whl cd ${BASE_DIR}/test python3 test_add_custom.py if [ $? -ne 0 ]; then - echo "ERROR: run add_custom test failed!" + echo "[ERROR]: Run add_custom test failed!" fi -echo "INFO: run add_custom test success!" +echo "[INFO]: Run add_custom test success!" # 运行测试用例 python3 test_add_custom_graph.py if [ $? -ne 0 ]; then - echo "ERROR: run add_custom_graph test failed!" + echo "[ERROR]: Run add_custom_graph test failed!" fi -echo "INFO: run add_custom_graph test success!" +echo "[INFO]: Run add_custom_graph test success!" diff --git a/operator/ascendc/0_introduction/1_add_frameworklaunch/PytorchInvocation/run_op_plugin.sh b/operator/ascendc/0_introduction/1_add_frameworklaunch/PytorchInvocation/run_op_plugin.sh index 4a47761ee..95302115d 100755 --- a/operator/ascendc/0_introduction/1_add_frameworklaunch/PytorchInvocation/run_op_plugin.sh +++ b/operator/ascendc/0_introduction/1_add_frameworklaunch/PytorchInvocation/run_op_plugin.sh @@ -18,13 +18,13 @@ source $ASCEND_HOME_DIR/bin/setenv.bash # 当前示例使用Python-3.9版本 PYTHON_VERSION=$(python3 -V 2>&1 | awk '{print $2}' | awk -F '.' '{print $1"."$2}') if [ "$PYTHON_VERSION" != "3.9" ]; then - echo "Error: Python3 version is not 3.9" + echo "[ERROR]: Python3 version is not 3.9" exit 1 fi # 当前示例使用Pytorch-2.1.0版本 PYTORCH_VESION=$(pip3 show torch | grep "Version:" | awk '{print $2}' | awk -F '.' '{print $1"."$2"."$3}' | awk -F '+' '{print $1}') if [ "$PYTORCH_VESION" != "2.1.0" ]; then - echo "Error: Pytorch version is not 2.1.0" + echo "[ERROR]: Pytorch version is not 2.1.0" exit 1 fi export HI_PYTHON=python${PYTHON_VERSION} @@ -67,17 +67,17 @@ function main() { export LD_LIBRARY_PATH=$ASCEND_OPP_PATH/vendors/customize/op_api/lib/:$LD_LIBRARY_PATH python3 test_ops_custom.py if [ $? -ne 0 ]; then - echo "ERROR: run custom op failed!" + echo "[ERROR]: Run custom op failed!" return 1 fi - echo "INFO: Ascend C Add Custom SUCCESS" + echo "[INFO]: Ascend C Add Custom SUCCESS" # 6. 执行基于图框架的测试文件 python3 test_ops_custom_register_in_graph.py if [ $? -ne 0 ]; then - echo "ERROR: run custom op in graph failed!" + echo "[ERROR]: Run custom op in graph failed!" return 1 fi - echo "INFO: Ascend C Add Custom in torch.compile graph SUCCESS" + echo "[INFO]: Ascend C Add Custom in torch.compile graph SUCCESS" } main diff --git a/operator/ascendc/0_introduction/1_add_frameworklaunch/TensorflowInvocation/AscendCustomToTensorFlowBuildIn/run.sh b/operator/ascendc/0_introduction/1_add_frameworklaunch/TensorflowInvocation/AscendCustomToTensorFlowBuildIn/run.sh index 0202346ce..1572b14ad 100755 --- a/operator/ascendc/0_introduction/1_add_frameworklaunch/TensorflowInvocation/AscendCustomToTensorFlowBuildIn/run.sh +++ b/operator/ascendc/0_introduction/1_add_frameworklaunch/TensorflowInvocation/AscendCustomToTensorFlowBuildIn/run.sh @@ -20,5 +20,5 @@ if [[ $TENSORFLOW_VERSION =~ ^1\..* ]]; then elif [[ $TENSORFLOW_VERSION =~ ^2\..* ]]; then python3 run_add_custom_tf2.py else - echo "unknown version $TENSORFLOW_VERSION, or tensorflow not installed" + echo "[ERROR]: Unknown version $TENSORFLOW_VERSION, or tensorflow not installed" fi diff --git a/operator/ascendc/0_introduction/1_add_frameworklaunch/install.sh b/operator/ascendc/0_introduction/1_add_frameworklaunch/install.sh index 127c9a0f0..c206f4983 100755 --- a/operator/ascendc/0_introduction/1_add_frameworklaunch/install.sh +++ b/operator/ascendc/0_introduction/1_add_frameworklaunch/install.sh @@ -19,7 +19,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -27,7 +27,7 @@ done VERSION_LIST="Ascend910A Ascend910B Ascend310B1 Ascend310B2 Ascend310B3 Ascend310B4 Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi diff --git a/operator/ascendc/0_introduction/20_mmad_kernellaunch/MmadBiasInvocation/run.sh b/operator/ascendc/0_introduction/20_mmad_kernellaunch/MmadBiasInvocation/run.sh index f83616b88..583e4a69f 100644 --- a/operator/ascendc/0_introduction/20_mmad_kernellaunch/MmadBiasInvocation/run.sh +++ b/operator/ascendc/0_introduction/20_mmad_kernellaunch/MmadBiasInvocation/run.sh @@ -39,7 +39,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -47,13 +47,13 @@ done RUN_MODE_LIST="cpu sim npu" if [[ " $RUN_MODE_LIST " != *" $RUN_MODE "* ]]; then - echo "ERROR: RUN_MODE error, This sample only support specify cpu, sim or npu!" + echo "[ERROR]: RUN_MODE error, This sample only support specify cpu, sim or npu!" exit -1 fi VERSION_LIST="Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi diff --git a/operator/ascendc/0_introduction/20_mmad_kernellaunch/MmadInvocation/run.sh b/operator/ascendc/0_introduction/20_mmad_kernellaunch/MmadInvocation/run.sh index f83616b88..583e4a69f 100644 --- a/operator/ascendc/0_introduction/20_mmad_kernellaunch/MmadInvocation/run.sh +++ b/operator/ascendc/0_introduction/20_mmad_kernellaunch/MmadInvocation/run.sh @@ -39,7 +39,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -47,13 +47,13 @@ done RUN_MODE_LIST="cpu sim npu" if [[ " $RUN_MODE_LIST " != *" $RUN_MODE "* ]]; then - echo "ERROR: RUN_MODE error, This sample only support specify cpu, sim or npu!" + echo "[ERROR]: RUN_MODE error, This sample only support specify cpu, sim or npu!" exit -1 fi VERSION_LIST="Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi diff --git a/operator/ascendc/0_introduction/21_vectoradd_kernellaunch/VectorAddMultiCoreWithTiling/run.sh b/operator/ascendc/0_introduction/21_vectoradd_kernellaunch/VectorAddMultiCoreWithTiling/run.sh index 5f06bb334..b77f52273 100644 --- a/operator/ascendc/0_introduction/21_vectoradd_kernellaunch/VectorAddMultiCoreWithTiling/run.sh +++ b/operator/ascendc/0_introduction/21_vectoradd_kernellaunch/VectorAddMultiCoreWithTiling/run.sh @@ -41,7 +41,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -49,13 +49,13 @@ done RUN_MODE_LIST="cpu sim npu" if [[ " $RUN_MODE_LIST " != *" $RUN_MODE "* ]]; then - echo "ERROR: RUN_MODE error, This sample only support specify cpu, sim or npu!" + echo "[ERROR]: RUN_MODE error, This sample only support specify cpu, sim or npu!" exit -1 fi VERSION_LIST="Ascend910A Ascend910B Ascend310B1 Ascend310B2 Ascend310B3 Ascend310B4 Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi @@ -73,7 +73,7 @@ fi export ASCEND_TOOLKIT_HOME=${_ASCEND_INSTALL_PATH} export ASCEND_HOME_PATH=${_ASCEND_INSTALL_PATH} -echo "Current compile soc version is ${SOC_VERSION}" +echo "[INFO]: Current compile soc version is ${SOC_VERSION}" source ${_ASCEND_INSTALL_PATH}/bin/setenv.bash if [ "${RUN_MODE}" = "sim" ]; then # in case of running op in simulator, use stub .so instead diff --git a/operator/ascendc/0_introduction/21_vectoradd_kernellaunch/VectorAddMultiCoreWithTilingBroadcast/run.sh b/operator/ascendc/0_introduction/21_vectoradd_kernellaunch/VectorAddMultiCoreWithTilingBroadcast/run.sh index 5f06bb334..b77f52273 100644 --- a/operator/ascendc/0_introduction/21_vectoradd_kernellaunch/VectorAddMultiCoreWithTilingBroadcast/run.sh +++ b/operator/ascendc/0_introduction/21_vectoradd_kernellaunch/VectorAddMultiCoreWithTilingBroadcast/run.sh @@ -41,7 +41,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -49,13 +49,13 @@ done RUN_MODE_LIST="cpu sim npu" if [[ " $RUN_MODE_LIST " != *" $RUN_MODE "* ]]; then - echo "ERROR: RUN_MODE error, This sample only support specify cpu, sim or npu!" + echo "[ERROR]: RUN_MODE error, This sample only support specify cpu, sim or npu!" exit -1 fi VERSION_LIST="Ascend910A Ascend910B Ascend310B1 Ascend310B2 Ascend310B3 Ascend310B4 Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi @@ -73,7 +73,7 @@ fi export ASCEND_TOOLKIT_HOME=${_ASCEND_INSTALL_PATH} export ASCEND_HOME_PATH=${_ASCEND_INSTALL_PATH} -echo "Current compile soc version is ${SOC_VERSION}" +echo "[INFO]: Current compile soc version is ${SOC_VERSION}" source ${_ASCEND_INSTALL_PATH}/bin/setenv.bash if [ "${RUN_MODE}" = "sim" ]; then # in case of running op in simulator, use stub .so instead diff --git a/operator/ascendc/0_introduction/21_vectoradd_kernellaunch/VectorAddSingleCore/run.sh b/operator/ascendc/0_introduction/21_vectoradd_kernellaunch/VectorAddSingleCore/run.sh index 5f06bb334..b77f52273 100644 --- a/operator/ascendc/0_introduction/21_vectoradd_kernellaunch/VectorAddSingleCore/run.sh +++ b/operator/ascendc/0_introduction/21_vectoradd_kernellaunch/VectorAddSingleCore/run.sh @@ -41,7 +41,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -49,13 +49,13 @@ done RUN_MODE_LIST="cpu sim npu" if [[ " $RUN_MODE_LIST " != *" $RUN_MODE "* ]]; then - echo "ERROR: RUN_MODE error, This sample only support specify cpu, sim or npu!" + echo "[ERROR]: RUN_MODE error, This sample only support specify cpu, sim or npu!" exit -1 fi VERSION_LIST="Ascend910A Ascend910B Ascend310B1 Ascend310B2 Ascend310B3 Ascend310B4 Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi @@ -73,7 +73,7 @@ fi export ASCEND_TOOLKIT_HOME=${_ASCEND_INSTALL_PATH} export ASCEND_HOME_PATH=${_ASCEND_INSTALL_PATH} -echo "Current compile soc version is ${SOC_VERSION}" +echo "[INFO]: Current compile soc version is ${SOC_VERSION}" source ${_ASCEND_INSTALL_PATH}/bin/setenv.bash if [ "${RUN_MODE}" = "sim" ]; then # in case of running op in simulator, use stub .so instead diff --git a/operator/ascendc/0_introduction/21_vectoradd_kernellaunch/VectorAddSingleCoreWithTmpbuf/run.sh b/operator/ascendc/0_introduction/21_vectoradd_kernellaunch/VectorAddSingleCoreWithTmpbuf/run.sh index 5f06bb334..b77f52273 100644 --- a/operator/ascendc/0_introduction/21_vectoradd_kernellaunch/VectorAddSingleCoreWithTmpbuf/run.sh +++ b/operator/ascendc/0_introduction/21_vectoradd_kernellaunch/VectorAddSingleCoreWithTmpbuf/run.sh @@ -41,7 +41,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -49,13 +49,13 @@ done RUN_MODE_LIST="cpu sim npu" if [[ " $RUN_MODE_LIST " != *" $RUN_MODE "* ]]; then - echo "ERROR: RUN_MODE error, This sample only support specify cpu, sim or npu!" + echo "[ERROR]: RUN_MODE error, This sample only support specify cpu, sim or npu!" exit -1 fi VERSION_LIST="Ascend910A Ascend910B Ascend310B1 Ascend310B2 Ascend310B3 Ascend310B4 Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi @@ -73,7 +73,7 @@ fi export ASCEND_TOOLKIT_HOME=${_ASCEND_INSTALL_PATH} export ASCEND_HOME_PATH=${_ASCEND_INSTALL_PATH} -echo "Current compile soc version is ${SOC_VERSION}" +echo "[INFO]: Current compile soc version is ${SOC_VERSION}" source ${_ASCEND_INSTALL_PATH}/bin/setenv.bash if [ "${RUN_MODE}" = "sim" ]; then # in case of running op in simulator, use stub .so instead diff --git a/operator/ascendc/0_introduction/22_baremix_kernellaunch/BareMixInvocation/run.sh b/operator/ascendc/0_introduction/22_baremix_kernellaunch/BareMixInvocation/run.sh index 74524bd16..60883d357 100644 --- a/operator/ascendc/0_introduction/22_baremix_kernellaunch/BareMixInvocation/run.sh +++ b/operator/ascendc/0_introduction/22_baremix_kernellaunch/BareMixInvocation/run.sh @@ -39,7 +39,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -47,13 +47,13 @@ done RUN_MODE_LIST="cpu sim npu" if [[ " $RUN_MODE_LIST " != *" $RUN_MODE "* ]]; then - echo "ERROR: RUN_MODE error, This sample only support specify cpu, sim or npu!" + echo "[ERROR]: RUN_MODE error, This sample only support specify cpu, sim or npu!" exit -1 fi VERSION_LIST="Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi @@ -71,7 +71,7 @@ fi export ASCEND_TOOLKIT_HOME=${_ASCEND_INSTALL_PATH} export ASCEND_HOME_PATH=${_ASCEND_INSTALL_PATH} -echo "Current compile soc version is ${SOC_VERSION}" +echo "[INFO]: Current compile soc version is ${SOC_VERSION}" source ${_ASCEND_INSTALL_PATH}/bin/setenv.bash if [ "${RUN_MODE}" = "sim" ]; then # in case of running op in simulator, use stub .so instead diff --git a/operator/ascendc/0_introduction/2_add_frameworklaunchlite/install.sh b/operator/ascendc/0_introduction/2_add_frameworklaunchlite/install.sh index e04eb1c62..7f30925ac 100755 --- a/operator/ascendc/0_introduction/2_add_frameworklaunchlite/install.sh +++ b/operator/ascendc/0_introduction/2_add_frameworklaunchlite/install.sh @@ -19,7 +19,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -27,7 +27,7 @@ done VERSION_LIST="Ascend910A Ascend910B Ascend310B1 Ascend310B2 Ascend310B3 Ascend310B4 Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi diff --git a/operator/ascendc/0_introduction/3_add_kernellaunch/AddKernelInvocationAcl/run.sh b/operator/ascendc/0_introduction/3_add_kernellaunch/AddKernelInvocationAcl/run.sh index 6b6d23964..804bef040 100644 --- a/operator/ascendc/0_introduction/3_add_kernellaunch/AddKernelInvocationAcl/run.sh +++ b/operator/ascendc/0_introduction/3_add_kernellaunch/AddKernelInvocationAcl/run.sh @@ -40,7 +40,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -48,13 +48,13 @@ done RUN_MODE_LIST="cpu npu" if [[ " $RUN_MODE_LIST " != *" $RUN_MODE "* ]]; then - echo "ERROR: RUN_MODE error, This sample only support specify cpu or npu!" + echo "[ERROR]: RUN_MODE error, This sample only support specify cpu or npu!" exit -1 fi VERSION_LIST="Ascend910A Ascend910B Ascend310B1 Ascend310B2 Ascend310B3 Ascend310B4 Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi @@ -72,7 +72,7 @@ fi export ASCEND_TOOLKIT_HOME=${_ASCEND_INSTALL_PATH} export ASCEND_HOME_PATH=${_ASCEND_INSTALL_PATH} -echo "Current compile soc version is ${SOC_VERSION}" +echo "[INFO]: Current compile soc version is ${SOC_VERSION}" source ${_ASCEND_INSTALL_PATH}/bin/setenv.bash if [ "${RUN_MODE}" = "cpu" ]; then export LD_LIBRARY_PATH=${_ASCEND_INSTALL_PATH}/tools/tikicpulib/lib:${_ASCEND_INSTALL_PATH}/tools/tikicpulib/lib/${SOC_VERSION}:${_ASCEND_INSTALL_PATH}/tools/simulator/${SOC_VERSION}/lib:$LD_LIBRARY_PATH diff --git a/operator/ascendc/0_introduction/3_add_kernellaunch/AddKernelInvocationNeo/run.sh b/operator/ascendc/0_introduction/3_add_kernellaunch/AddKernelInvocationNeo/run.sh index c6dd79858..9eb5de466 100755 --- a/operator/ascendc/0_introduction/3_add_kernellaunch/AddKernelInvocationNeo/run.sh +++ b/operator/ascendc/0_introduction/3_add_kernellaunch/AddKernelInvocationNeo/run.sh @@ -40,7 +40,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -48,13 +48,13 @@ done RUN_MODE_LIST="cpu sim npu" if [[ " $RUN_MODE_LIST " != *" $RUN_MODE "* ]]; then - echo "ERROR: RUN_MODE error, This sample only support specify cpu, sim or npu!" + echo "[ERROR]: RUN_MODE error, This sample only support specify cpu, sim or npu!" exit -1 fi VERSION_LIST="Ascend910A Ascend910B Ascend310B1 Ascend310B2 Ascend310B3 Ascend310B4 Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi @@ -72,7 +72,7 @@ fi export ASCEND_TOOLKIT_HOME=${_ASCEND_INSTALL_PATH} export ASCEND_HOME_PATH=${_ASCEND_INSTALL_PATH} -echo "Current compile soc version is ${SOC_VERSION}" +echo "[INFO]: Current compile soc version is ${SOC_VERSION}" source ${_ASCEND_INSTALL_PATH}/bin/setenv.bash if [ "${RUN_MODE}" = "sim" ]; then # in case of running op in simulator, use stub .so instead diff --git a/operator/ascendc/0_introduction/3_add_kernellaunch/AddKernelInvocationTilingNeo/run.sh b/operator/ascendc/0_introduction/3_add_kernellaunch/AddKernelInvocationTilingNeo/run.sh index c6dd79858..9eb5de466 100755 --- a/operator/ascendc/0_introduction/3_add_kernellaunch/AddKernelInvocationTilingNeo/run.sh +++ b/operator/ascendc/0_introduction/3_add_kernellaunch/AddKernelInvocationTilingNeo/run.sh @@ -40,7 +40,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -48,13 +48,13 @@ done RUN_MODE_LIST="cpu sim npu" if [[ " $RUN_MODE_LIST " != *" $RUN_MODE "* ]]; then - echo "ERROR: RUN_MODE error, This sample only support specify cpu, sim or npu!" + echo "[ERROR]: RUN_MODE error, This sample only support specify cpu, sim or npu!" exit -1 fi VERSION_LIST="Ascend910A Ascend910B Ascend310B1 Ascend310B2 Ascend310B3 Ascend310B4 Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi @@ -72,7 +72,7 @@ fi export ASCEND_TOOLKIT_HOME=${_ASCEND_INSTALL_PATH} export ASCEND_HOME_PATH=${_ASCEND_INSTALL_PATH} -echo "Current compile soc version is ${SOC_VERSION}" +echo "[INFO]: Current compile soc version is ${SOC_VERSION}" source ${_ASCEND_INSTALL_PATH}/bin/setenv.bash if [ "${RUN_MODE}" = "sim" ]; then # in case of running op in simulator, use stub .so instead diff --git a/operator/ascendc/0_introduction/3_add_kernellaunch/CppExtensions/run.sh b/operator/ascendc/0_introduction/3_add_kernellaunch/CppExtensions/run.sh index 3c46b63a5..f8c4a01a8 100755 --- a/operator/ascendc/0_introduction/3_add_kernellaunch/CppExtensions/run.sh +++ b/operator/ascendc/0_introduction/3_add_kernellaunch/CppExtensions/run.sh @@ -21,7 +21,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -39,7 +39,7 @@ else fi fi source $_ASCEND_INSTALL_PATH/bin/setenv.bash -echo "Current compile soc version is ${SOC_VERSION}" +echo "[INFO]: Current compile soc version is ${SOC_VERSION}" set -e pip3 install pybind11 diff --git a/operator/ascendc/0_introduction/4_addn_frameworklaunch/AclNNInvocation/run.sh b/operator/ascendc/0_introduction/4_addn_frameworklaunch/AclNNInvocation/run.sh index b0de91dfd..2d1bff7a4 100755 --- a/operator/ascendc/0_introduction/4_addn_frameworklaunch/AclNNInvocation/run.sh +++ b/operator/ascendc/0_introduction/4_addn_frameworklaunch/AclNNInvocation/run.sh @@ -31,10 +31,10 @@ function main { cd $CURRENT_DIR python3 scripts/gen_data.py if [ $? -ne 0 ]; then - echo "ERROR: generate input data failed!" + echo "[ERROR]: Generate input data failed!" return 1 fi - echo "INFO: generate input data success!" + echo "[INFO]: Generate input data success!" # 3. 编译acl可执行文件 cd $CURRENT_DIR @@ -43,33 +43,33 @@ function main { cd build cmake ../src -DCMAKE_SKIP_RPATH=TRUE if [ $? -ne 0 ]; then - echo "ERROR: cmake failed!" + echo "[ERROR]: Cmake failed!" return 1 fi - echo "INFO: cmake success!" + echo "[INFO]: Cmake success!" make if [ $? -ne 0 ]; then - echo "ERROR: make failed!" + echo "[ERROR]: Make failed!" return 1 fi - echo "INFO: make success!" + echo "[INFO]: Make success!" # 4. 运行可执行文件 export LD_LIBRARY_PATH=$_ASCEND_INSTALL_PATH/opp/vendors/customize/op_api/lib:$LD_LIBRARY_PATH cd $CURRENT_DIR/output - echo "INFO: execute op!" + echo "[INFO]: Execute op!" ./execute_add_op if [ $? -ne 0 ]; then - echo "ERROR: acl executable run failed! please check your project!" + echo "[ERROR]: Acl executable run failed! please check your project!" return 1 fi - echo "INFO: acl executable run success!" + echo "[INFO]: Acl executable run success!" # 5. 比较真值文件 cd $CURRENT_DIR python3 scripts/verify_result.py output/output_z.bin output/golden.bin if [ $? -ne 0 ]; then - echo "ERROR: verify result failed!" + echo "[ERROR]: Verify result failed!" return 1 fi } diff --git a/operator/ascendc/0_introduction/4_addn_frameworklaunch/install.sh b/operator/ascendc/0_introduction/4_addn_frameworklaunch/install.sh index 873e4bdc5..05edc62ca 100755 --- a/operator/ascendc/0_introduction/4_addn_frameworklaunch/install.sh +++ b/operator/ascendc/0_introduction/4_addn_frameworklaunch/install.sh @@ -19,7 +19,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -27,7 +27,7 @@ done VERSION_LIST="Ascend910A Ascend910B Ascend310B1 Ascend310B2 Ascend310B3 Ascend310B4 Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi diff --git a/operator/ascendc/0_introduction/5_addn_kernellaunch/run.sh b/operator/ascendc/0_introduction/5_addn_kernellaunch/run.sh index c6dd79858..9eb5de466 100755 --- a/operator/ascendc/0_introduction/5_addn_kernellaunch/run.sh +++ b/operator/ascendc/0_introduction/5_addn_kernellaunch/run.sh @@ -40,7 +40,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -48,13 +48,13 @@ done RUN_MODE_LIST="cpu sim npu" if [[ " $RUN_MODE_LIST " != *" $RUN_MODE "* ]]; then - echo "ERROR: RUN_MODE error, This sample only support specify cpu, sim or npu!" + echo "[ERROR]: RUN_MODE error, This sample only support specify cpu, sim or npu!" exit -1 fi VERSION_LIST="Ascend910A Ascend910B Ascend310B1 Ascend310B2 Ascend310B3 Ascend310B4 Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi @@ -72,7 +72,7 @@ fi export ASCEND_TOOLKIT_HOME=${_ASCEND_INSTALL_PATH} export ASCEND_HOME_PATH=${_ASCEND_INSTALL_PATH} -echo "Current compile soc version is ${SOC_VERSION}" +echo "[INFO]: Current compile soc version is ${SOC_VERSION}" source ${_ASCEND_INSTALL_PATH}/bin/setenv.bash if [ "${RUN_MODE}" = "sim" ]; then # in case of running op in simulator, use stub .so instead diff --git a/operator/ascendc/0_introduction/6_addtemplate_frameworklaunch/AclNNInvocation/run.sh b/operator/ascendc/0_introduction/6_addtemplate_frameworklaunch/AclNNInvocation/run.sh index 57e8771db..4b29064ca 100755 --- a/operator/ascendc/0_introduction/6_addtemplate_frameworklaunch/AclNNInvocation/run.sh +++ b/operator/ascendc/0_introduction/6_addtemplate_frameworklaunch/AclNNInvocation/run.sh @@ -29,10 +29,10 @@ function main { cd $CURRENT_DIR python3 scripts/gen_data.py if [ $? -ne 0 ]; then - echo "ERROR: generate input data failed!" + echo "[ERROR]: Generate input data failed!" return 1 fi - echo "INFO: generate input data success!" + echo "[INFO]: Generate input data success!" # 3. 编译acl可执行文件 cd $CURRENT_DIR @@ -41,33 +41,33 @@ function main { cd build cmake ../src -DCMAKE_SKIP_RPATH=TRUE if [ $? -ne 0 ]; then - echo "ERROR: cmake failed!" + echo "[ERROR]: Cmake failed!" return 1 fi - echo "INFO: cmake success!" + echo "[INFO]: Cmake success!" make if [ $? -ne 0 ]; then - echo "ERROR: make failed!" + echo "[ERROR]: Make failed!" return 1 fi - echo "INFO: make success!" + echo "[INFO]: Make success!" # 4. 运行可执行文件 export LD_LIBRARY_PATH=$_ASCEND_INSTALL_PATH/opp/vendors/customize/op_api/lib:$LD_LIBRARY_PATH cd $CURRENT_DIR/output - echo "INFO: execute op!" + echo "[INFO]: Execute op!" ./execute_add_op if [ $? -ne 0 ]; then - echo "ERROR: acl executable run failed! please check your project!" + echo "[ERROR]: Acl executable run failed! please check your project!" return 1 fi - echo "INFO: acl executable run success!" + echo "[INFO]: Acl executable run success!" # 5. 比较真值文件 cd $CURRENT_DIR python3 scripts/verify_result.py output/output_z.bin output/golden.bin if [ $? -ne 0 ]; then - echo "ERROR: verify result failed!" + echo "[ERROR]: Verify result failed!" return 1 fi } diff --git a/operator/ascendc/0_introduction/6_addtemplate_frameworklaunch/install.sh b/operator/ascendc/0_introduction/6_addtemplate_frameworklaunch/install.sh index 41f6be73c..4b74830f0 100755 --- a/operator/ascendc/0_introduction/6_addtemplate_frameworklaunch/install.sh +++ b/operator/ascendc/0_introduction/6_addtemplate_frameworklaunch/install.sh @@ -19,7 +19,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -27,7 +27,7 @@ done VERSION_LIST="Ascend910A Ascend910B Ascend310B1 Ascend310B2 Ascend310B3 Ascend310B4 Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi diff --git a/operator/ascendc/0_introduction/7_broadcast_frameworklaunch/install.sh b/operator/ascendc/0_introduction/7_broadcast_frameworklaunch/install.sh index 2bd031331..cf4f5950b 100755 --- a/operator/ascendc/0_introduction/7_broadcast_frameworklaunch/install.sh +++ b/operator/ascendc/0_introduction/7_broadcast_frameworklaunch/install.sh @@ -19,7 +19,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -27,7 +27,7 @@ done VERSION_LIST="Ascend910A Ascend910B Ascend310B1 Ascend310B2 Ascend310B3 Ascend310B4 Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi diff --git a/operator/ascendc/0_introduction/8_library_frameworklaunch/static_library/AclNNInvocation/run.sh b/operator/ascendc/0_introduction/8_library_frameworklaunch/static_library/AclNNInvocation/run.sh index f39cfda92..49623f804 100644 --- a/operator/ascendc/0_introduction/8_library_frameworklaunch/static_library/AclNNInvocation/run.sh +++ b/operator/ascendc/0_introduction/8_library_frameworklaunch/static_library/AclNNInvocation/run.sh @@ -39,15 +39,15 @@ function main { cd $CURRENT_DIR python3 scripts_add/gen_data.py if [ $? -ne 0 ]; then - echo "ERROR: generate add input data failed!" + echo "[ERROR]: Generate add input data failed!" return 1 fi python3 scripts_matmul/gen_data.py if [ $? -ne 0 ]; then - echo "ERROR: generate matmul input data failed!" + echo "[ERROR]: Generate matmul input data failed!" return 1 fi - echo "INFO: generate input data success!" + echo "[INFO]: Generate input data success!" # 3. 编译可执行文件 cd $CURRENT_DIR @@ -56,39 +56,39 @@ function main { cd build cmake ../src -DCMAKE_SKIP_RPATH=TRUE if [ $? -ne 0 ]; then - echo "ERROR: cmake failed!" + echo "[ERROR]: Cmake failed!" return 1 fi - echo "INFO: cmake success!" + echo "[INFO]: Cmake success!" make if [ $? -ne 0 ]; then - echo "ERROR: make failed!" + echo "[ERROR]: Make failed!" return 1 fi - echo "INFO: make success!" + echo "[INFO]: Make success!" # 4. 运行可执行文件 export LD_LIBRARY_PATH=$NPU_HOST_LIB/:$BASIC_PATH/lib:$DDK_PATH_ADD/lib:$DDK_PATH_MATMUL/lib:$LD_LIBRARY_PATH:./ cd $CURRENT_DIR/output - echo "INFO: execute op!" + echo "[INFO]: Execute op!" ./execute_static_op if [ $? -ne 0 ]; then - echo "ERROR: acl executable run failed! please check your project!" + echo "[ERROR]: Acl executable run failed! please check your project!" return 1 fi - echo "INFO: acl executable run success!" + echo "[INFO]: Acl executable run success!" # 5. 精度比对 cd $CURRENT_DIR python3 scripts_matmul/verify_result.py output/output_z_matmul.bin output/golden_matmul.bin if [ $? -ne 0 ]; then - echo "ERROR: verify matmul result failed!" + echo "[ERROR]: Verify matmul result failed!" return 1 fi python3 scripts_add/verify_result.py output/output_z_add.bin output/golden_add.bin if [ $? -ne 0 ]; then - echo "ERROR: verify add result failed!" + echo "[ERROR]: Verify add result failed!" return 1 fi } diff --git a/operator/ascendc/0_introduction/8_library_frameworklaunch/static_library/OpRunner/run.sh b/operator/ascendc/0_introduction/8_library_frameworklaunch/static_library/OpRunner/run.sh index 64bc86a70..4fc65b243 100644 --- a/operator/ascendc/0_introduction/8_library_frameworklaunch/static_library/OpRunner/run.sh +++ b/operator/ascendc/0_introduction/8_library_frameworklaunch/static_library/OpRunner/run.sh @@ -37,16 +37,16 @@ function main { cd build cmake ../src -DCMAKE_SKIP_RPATH=TRUE if [ $? -ne 0 ]; then - echo "ERROR: cmake failed!" + echo "[ERROR]: Cmake failed!" return 1 fi - echo "INFO: cmake success!" + echo "[INFO]: Cmake success!" make if [ $? -ne 0 ]; then - echo "ERROR: make failed!" + echo "[ERROR]: Make failed!" return 1 fi - echo "INFO: make success!" + echo "[INFO]: Make success!" cp -rf $CUSTLIB_PATH/* $RELEASE_PATH/lib cp -rf $CUSTLIB_PATH/../inc/* $RELEASE_PATH/include diff --git a/operator/ascendc/0_introduction/8_library_frameworklaunch/static_library/install_add.sh b/operator/ascendc/0_introduction/8_library_frameworklaunch/static_library/install_add.sh index e701007ef..fb432e7ae 100644 --- a/operator/ascendc/0_introduction/8_library_frameworklaunch/static_library/install_add.sh +++ b/operator/ascendc/0_introduction/8_library_frameworklaunch/static_library/install_add.sh @@ -19,7 +19,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -27,7 +27,7 @@ done VERSION_LIST="Ascend910A Ascend910B Ascend310B1 Ascend310B2 Ascend310B3 Ascend310B4 Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi diff --git a/operator/ascendc/0_introduction/8_library_frameworklaunch/static_library/install_matmul.sh b/operator/ascendc/0_introduction/8_library_frameworklaunch/static_library/install_matmul.sh index 314fea9ca..48efe5f45 100644 --- a/operator/ascendc/0_introduction/8_library_frameworklaunch/static_library/install_matmul.sh +++ b/operator/ascendc/0_introduction/8_library_frameworklaunch/static_library/install_matmul.sh @@ -19,7 +19,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -27,7 +27,7 @@ done VERSION_LIST="Ascend910A Ascend910B Ascend310B1 Ascend310B2 Ascend310B3 Ascend310B4 Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi diff --git a/operator/ascendc/0_introduction/9_leakyrelu_frameworklaunch/AclNNInvocation/run.sh b/operator/ascendc/0_introduction/9_leakyrelu_frameworklaunch/AclNNInvocation/run.sh index 9c6122e13..ec7c6280c 100755 --- a/operator/ascendc/0_introduction/9_leakyrelu_frameworklaunch/AclNNInvocation/run.sh +++ b/operator/ascendc/0_introduction/9_leakyrelu_frameworklaunch/AclNNInvocation/run.sh @@ -29,10 +29,10 @@ function main { cd $CURRENT_DIR python3 scripts/gen_data.py if [ $? -ne 0 ]; then - echo "ERROR: generate input data failed!" + echo "[ERROR]: Generate input data failed!" return 1 fi - echo "INFO: generate input data success!" + echo "[INFO]: Generate input data success!" # 3. 编译acl可执行文件 cd $CURRENT_DIR @@ -41,33 +41,33 @@ function main { cd build cmake ../src -DCMAKE_SKIP_RPATH=TRUE if [ $? -ne 0 ]; then - echo "ERROR: cmake failed!" + echo "[ERROR]: Cmake failed!" return 1 fi - echo "INFO: cmake success!" + echo "[INFO]: Cmake success!" make if [ $? -ne 0 ]; then - echo "ERROR: make failed!" + echo "[ERROR]: Make failed!" return 1 fi - echo "INFO: make success!" + echo "[INFO]: Make success!" # 4. 运行可执行文件 export LD_LIBRARY_PATH=$_ASCEND_INSTALL_PATH/opp/vendors/customize/op_api/lib:$LD_LIBRARY_PATH cd $CURRENT_DIR/output - echo "INFO: execute op!" + echo "[INFO]: Execute op!" ./execute_leakyrelu_op if [ $? -ne 0 ]; then - echo "ERROR: acl executable run failed! please check your project!" + echo "[ERROR]: Acl executable run failed! please check your project!" return 1 fi - echo "INFO: acl executable run success!" + echo "[INFO]: Acl executable run success!" # 5. 比较真值文件 cd $CURRENT_DIR python3 scripts/verify_result.py output/output_y.bin output/golden.bin if [ $? -ne 0 ]; then - echo "ERROR: verify result failed!" + echo "[ERROR]: Verify result failed!" return 1 fi } diff --git a/operator/ascendc/0_introduction/9_leakyrelu_frameworklaunch/install.sh b/operator/ascendc/0_introduction/9_leakyrelu_frameworklaunch/install.sh index 2a37ba800..4db6545fb 100755 --- a/operator/ascendc/0_introduction/9_leakyrelu_frameworklaunch/install.sh +++ b/operator/ascendc/0_introduction/9_leakyrelu_frameworklaunch/install.sh @@ -19,7 +19,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -27,7 +27,7 @@ done VERSION_LIST="Ascend910A Ascend910B Ascend310B1 Ascend310B2 Ascend310B3 Ascend310B4 Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi diff --git a/operator/ascendc/1_utilities/0_printf/FrameworkLaunch/AclNNInvocation/run.sh b/operator/ascendc/1_utilities/0_printf/FrameworkLaunch/AclNNInvocation/run.sh index 50530d46c..09b692487 100755 --- a/operator/ascendc/1_utilities/0_printf/FrameworkLaunch/AclNNInvocation/run.sh +++ b/operator/ascendc/1_utilities/0_printf/FrameworkLaunch/AclNNInvocation/run.sh @@ -29,10 +29,10 @@ function main { cd $CURRENT_DIR python3 scripts/gen_data.py if [ $? -ne 0 ]; then - echo "ERROR: generate input data failed!" + echo "[ERROR]: Generate input data failed!" return 1 fi - echo "INFO: generate input data success!" + echo "[INFO]: Generate input data success!" # 3. 编译acl可执行文件 cd $CURRENT_DIR @@ -41,34 +41,34 @@ function main { cd build cmake ../src -DCMAKE_SKIP_RPATH=TRUE if [ $? -ne 0 ]; then - echo "ERROR: cmake failed!" + echo "[ERROR]: Cmake failed!" return 1 fi - echo "INFO: cmake success!" + echo "[INFO]: Cmake success!" make if [ $? -ne 0 ]; then - echo "ERROR: make failed!" + echo "[ERROR]: Make failed!" return 1 fi - echo "INFO: make success!" + echo "[INFO]: Make success!" # 4. 运行可执行文件 export LD_LIBRARY_PATH=$_ASCEND_INSTALL_PATH/opp/vendors/customize/op_api/lib:$LD_LIBRARY_PATH cd $CURRENT_DIR/output - echo "INFO: execute op!" + echo "[INFO]: Execute op!" file_path=output_msg.txt ./execute_matmul_op | tee $file_path if [ $? -ne 0 ]; then - echo "ERROR: acl executable run failed! please check your project!" + echo "[ERROR]: Acl executable run failed! please check your project!" return 1 fi - echo "INFO: acl executable run success!" + echo "[INFO]: Acl executable run success!" # 5. 比较真值文件 cd $CURRENT_DIR python3 scripts/verify_result.py output/output_z.bin output/golden.bin if [ $? -ne 0 ]; then - echo "ERROR: verify result failed!" + echo "[ERROR]: Verify result failed!" return 1 fi # 6. 验证调测结果 @@ -82,17 +82,17 @@ function main { count_uint=$(grep -c "$check_msg_uint" $file_path) if [ $count_half -eq 0 ]; then - echo "Error, $check_msg_half is expected, but not found." + echo "[ERROR]: $check_msg_half is expected, but not found." exit 1 fi if [ $count_int -eq 0 ]; then - echo "Error, $check_msg_int is expected, but not found." + echo "[ERROR]: $check_msg_int is expected, but not found." exit 1 fi if [ $count_uint -eq 0 ]; then - echo "Error, $check_msg_uint is expected, but not found." + echo "[ERROR]: $check_msg_uint is expected, but not found." exit 1 fi } diff --git a/operator/ascendc/1_utilities/0_printf/FrameworkLaunch/install.sh b/operator/ascendc/1_utilities/0_printf/FrameworkLaunch/install.sh index 6467d8345..805dcc861 100755 --- a/operator/ascendc/1_utilities/0_printf/FrameworkLaunch/install.sh +++ b/operator/ascendc/1_utilities/0_printf/FrameworkLaunch/install.sh @@ -19,7 +19,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -27,7 +27,7 @@ done VERSION_LIST="Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi diff --git a/operator/ascendc/1_utilities/0_printf/KernelLaunch/MatmulInvocationNeo/run.sh b/operator/ascendc/1_utilities/0_printf/KernelLaunch/MatmulInvocationNeo/run.sh index 11050aa56..0bb67501e 100755 --- a/operator/ascendc/1_utilities/0_printf/KernelLaunch/MatmulInvocationNeo/run.sh +++ b/operator/ascendc/1_utilities/0_printf/KernelLaunch/MatmulInvocationNeo/run.sh @@ -36,7 +36,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -44,7 +44,7 @@ done VERSION_LIST="Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi @@ -62,7 +62,7 @@ fi export ASCEND_TOOLKIT_HOME=${_ASCEND_INSTALL_PATH} export ASCEND_HOME_PATH=${_ASCEND_INSTALL_PATH} -echo "Current compile soc version is ${SOC_VERSION}" +echo "[INFO]: Current compile soc version is ${SOC_VERSION}" source ${_ASCEND_INSTALL_PATH}/bin/setenv.bash set -e @@ -107,26 +107,26 @@ count_pointer=$(grep -c "$check_msg_pointer" $file_path) count_uint=$(grep -c "$check_msg_uint" $file_path) if [ $count_int -eq 0 ]; then - echo "Error, $check_msg_int is expected, but not found." + echo "[ERROR]: $check_msg_int is expected, but not found." exit 1 fi if [ $count_bool -eq 0 ]; then - echo "Error, $check_msg_bool is expected, but not found." + echo "[ERROR]: $check_msg_bool is expected, but not found." exit 1 fi if [ $count_half -eq 0 ]; then - echo "Error, $check_msg_half is expected, but not found." + echo "[ERROR]: $check_msg_half is expected, but not found." exit 1 fi if [ $count_pointer -eq 0 ]; then - echo "Error, $check_msg_pointer is expected, but not found." + echo "[ERROR]: $check_msg_pointer is expected, but not found." exit 1 fi if [ $count_uint -eq 0 ]; then - echo "Error, $check_msg_uint is expected, but not found." + echo "[ERROR]: $check_msg_uint is expected, but not found." exit 1 fi diff --git a/operator/ascendc/1_utilities/3_assert/FrameworkLaunch/AclNNInvocation/run.sh b/operator/ascendc/1_utilities/3_assert/FrameworkLaunch/AclNNInvocation/run.sh index bb72829aa..11c9a1695 100755 --- a/operator/ascendc/1_utilities/3_assert/FrameworkLaunch/AclNNInvocation/run.sh +++ b/operator/ascendc/1_utilities/3_assert/FrameworkLaunch/AclNNInvocation/run.sh @@ -29,10 +29,10 @@ function main { cd $CURRENT_DIR python3 scripts/gen_data.py if [ $? -ne 0 ]; then - echo "ERROR: generate input data failed!" + echo "[ERROR]: Generate input data failed!" return 1 fi - echo "INFO: generate input data success!" + echo "[INFO]: Generate input data success!" # 3. 编译acl可执行文件 cd $CURRENT_DIR @@ -41,34 +41,34 @@ function main { cd build cmake ../src -DCMAKE_SKIP_RPATH=TRUE if [ $? -ne 0 ]; then - echo "ERROR: cmake failed!" + echo "[ERROR]: Cmake failed!" return 1 fi - echo "INFO: cmake success!" + echo "[INFO]: Cmake success!" make if [ $? -ne 0 ]; then - echo "ERROR: make failed!" + echo "[ERROR]: Make failed!" return 1 fi - echo "INFO: make success!" + echo "[INFO]: Make success!" # 4. 运行可执行文件 export LD_LIBRARY_PATH=$_ASCEND_INSTALL_PATH/opp/vendors/customize/op_api/lib:$LD_LIBRARY_PATH cd $CURRENT_DIR/output - echo "INFO: execute op!" + echo "[INFO]: Execute op!" file_path=output_msg.txt ./execute_matmul_op | tee $file_path if [ $? -ne 0 ]; then - echo "ERROR: acl executable run failed! please check your project!" + echo "[ERROR]: Acl executable run failed! please check your project!" return 1 fi - echo "INFO: acl executable run success!" + echo "[INFO]: Acl executable run success!" # 5. 比较真值文件 cd $CURRENT_DIR python3 scripts/verify_result.py output/output_z.bin output/golden.bin if [ $? -ne 0 ]; then - echo "ERROR: verify result failed!" + echo "[ERROR]: Verify result failed!" return 1 fi } diff --git a/operator/ascendc/1_utilities/3_assert/FrameworkLaunch/install.sh b/operator/ascendc/1_utilities/3_assert/FrameworkLaunch/install.sh index 6467d8345..805dcc861 100755 --- a/operator/ascendc/1_utilities/3_assert/FrameworkLaunch/install.sh +++ b/operator/ascendc/1_utilities/3_assert/FrameworkLaunch/install.sh @@ -19,7 +19,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -27,7 +27,7 @@ done VERSION_LIST="Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi diff --git a/operator/ascendc/1_utilities/3_assert/KernelLaunch/MatmulInvocationNeo/run.sh b/operator/ascendc/1_utilities/3_assert/KernelLaunch/MatmulInvocationNeo/run.sh index fcb90ffee..db5b1db08 100755 --- a/operator/ascendc/1_utilities/3_assert/KernelLaunch/MatmulInvocationNeo/run.sh +++ b/operator/ascendc/1_utilities/3_assert/KernelLaunch/MatmulInvocationNeo/run.sh @@ -36,7 +36,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -44,7 +44,7 @@ done VERSION_LIST="Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi @@ -62,7 +62,7 @@ fi export ASCEND_TOOLKIT_HOME=${_ASCEND_INSTALL_PATH} export ASCEND_HOME_PATH=${_ASCEND_INSTALL_PATH} -echo "Current compile soc version is ${SOC_VERSION}" +echo "[INFO]: Current compile soc version is ${SOC_VERSION}" source ${_ASCEND_INSTALL_PATH}/bin/setenv.bash set -e diff --git a/operator/ascendc/1_utilities/7_dumptensor/FrameworkLaunch/DumpTensorCube/AclNNInvocation/run.sh b/operator/ascendc/1_utilities/7_dumptensor/FrameworkLaunch/DumpTensorCube/AclNNInvocation/run.sh index 782b395ef..eaf8ebde1 100755 --- a/operator/ascendc/1_utilities/7_dumptensor/FrameworkLaunch/DumpTensorCube/AclNNInvocation/run.sh +++ b/operator/ascendc/1_utilities/7_dumptensor/FrameworkLaunch/DumpTensorCube/AclNNInvocation/run.sh @@ -29,10 +29,10 @@ function main { cd $CURRENT_DIR python3 scripts/gen_data.py if [ $? -ne 0 ]; then - echo "ERROR: generate input data failed!" + echo "[ERROR]: Generate input data failed!" return 1 fi - echo "INFO: generate input data success!" + echo "[INFO]: Generate input data success!" # 3. 编译acl可执行文件 cd $CURRENT_DIR @@ -41,34 +41,34 @@ function main { cd build cmake ../src -DCMAKE_SKIP_RPATH=TRUE if [ $? -ne 0 ]; then - echo "ERROR: cmake failed!" + echo "[ERROR]: Cmake failed!" return 1 fi - echo "INFO: cmake success!" + echo "[INFO]: Cmake success!" make if [ $? -ne 0 ]; then - echo "ERROR: make failed!" + echo "[ERROR]: Make failed!" return 1 fi - echo "INFO: make success!" + echo "[INFO]: Make success!" # 4. 运行可执行文件 export LD_LIBRARY_PATH=$_ASCEND_INSTALL_PATH/opp/vendors/customize/op_api/lib:$LD_LIBRARY_PATH cd $CURRENT_DIR/output - echo "INFO: execute op!" + echo "[INFO]: Execute op!" file_path=output_msg.txt ./execute_mmad_op | tee $file_path if [ $? -ne 0 ]; then - echo "ERROR: acl executable run failed! please check your project!" + echo "[ERROR]: Acl executable run failed! please check your project!" return 1 fi - echo "INFO: acl executable run success!" + echo "[INFO]: Acl executable run success!" # 5. 比较真值文件 cd $CURRENT_DIR python3 scripts/verify_result.py output/output_z.bin output/golden.bin if [ $? -ne 0 ]; then - echo "ERROR: verify result failed!" + echo "[ERROR]: Verify result failed!" return 1 fi @@ -83,17 +83,17 @@ function main { count_offset=$(grep -c "$check_msg_offset" $file_path) if [ $count_gm -eq 0 ]; then - echo "Error, $check_msg_gm is expected, but not found." + echo "[ERROR]: $check_msg_gm is expected, but not found." exit 1 fi if [ $count_shape -eq 0 ]; then - echo "Error, $check_msg_shape is expected, but not found." + echo "[ERROR]: $check_msg_shape is expected, but not found." exit 1 fi if [ $count_offset -eq 0 ]; then - echo "Error, $check_msg_offset is expected, but not found." + echo "[ERROR]: $check_msg_offset is expected, but not found." exit 1 fi } diff --git a/operator/ascendc/1_utilities/7_dumptensor/FrameworkLaunch/DumpTensorCube/install.sh b/operator/ascendc/1_utilities/7_dumptensor/FrameworkLaunch/DumpTensorCube/install.sh index 5efbbfe62..67d0f3ad6 100755 --- a/operator/ascendc/1_utilities/7_dumptensor/FrameworkLaunch/DumpTensorCube/install.sh +++ b/operator/ascendc/1_utilities/7_dumptensor/FrameworkLaunch/DumpTensorCube/install.sh @@ -19,7 +19,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -27,7 +27,7 @@ done VERSION_LIST="Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi diff --git a/operator/ascendc/1_utilities/7_dumptensor/FrameworkLaunch/DumpTensorVector/AclNNInvocation/run.sh b/operator/ascendc/1_utilities/7_dumptensor/FrameworkLaunch/DumpTensorVector/AclNNInvocation/run.sh index 92b089d86..bdecf496f 100755 --- a/operator/ascendc/1_utilities/7_dumptensor/FrameworkLaunch/DumpTensorVector/AclNNInvocation/run.sh +++ b/operator/ascendc/1_utilities/7_dumptensor/FrameworkLaunch/DumpTensorVector/AclNNInvocation/run.sh @@ -30,10 +30,10 @@ function main { cd $CURRENT_DIR python3 scripts/gen_data.py if [ $? -ne 0 ]; then - echo "ERROR: generate input data failed!" + echo "[ERROR]: Generate input data failed!" return 1 fi - echo "INFO: generate input data success!" + echo "[INFO]: Generate input data success!" # 3. 编译acl可执行文件 cd $CURRENT_DIR @@ -42,34 +42,34 @@ function main { cd build cmake ../src -DCMAKE_SKIP_RPATH=TRUE if [ $? -ne 0 ]; then - echo "ERROR: cmake failed!" + echo "[ERROR]: Cmake failed!" return 1 fi - echo "INFO: cmake success!" + echo "[INFO]: Cmake success!" make if [ $? -ne 0 ]; then - echo "ERROR: make failed!" + echo "[ERROR]: Make failed!" return 1 fi - echo "INFO: make success!" + echo "[INFO]: Make success!" # 4. 运行可执行文件 export LD_LIBRARY_PATH=$_ASCEND_INSTALL_PATH/opp/vendors/customize/op_api/lib:$LD_LIBRARY_PATH cd $CURRENT_DIR/output - echo "INFO: execute op!" + echo "[INFO]: Execute op!" file_path=output_msg.txt ./execute_add_op | tee $file_path if [ $? -ne 0 ]; then - echo "ERROR: acl executable run failed! please check your project!" + echo "[ERROR]: Acl executable run failed! please check your project!" return 1 fi - echo "INFO: acl executable run success!" + echo "[INFO]: Acl executable run success!" # 5. 比较真值文件 cd $CURRENT_DIR python3 scripts/verify_result.py output/output_z.bin output/golden.bin if [ $? -ne 0 ]; then - echo "ERROR: verify result failed!" + echo "[ERROR]: Verify result failed!" return 1 fi @@ -84,17 +84,17 @@ function main { count_offset=$(grep -c "$check_msg_offset" $file_path) if [ $count_gm -eq 0 ]; then - echo "Error, $check_msg_gm is expected, but not found." + echo "[ERROR]: $check_msg_gm is expected, but not found." exit 1 fi if [ $count_shape -eq 0 ]; then - echo "Error, $check_msg_shape is expected, but not found." + echo "[ERROR]: $check_msg_shape is expected, but not found." exit 1 fi if [ $count_offset -eq 0 ]; then - echo "Error, $check_msg_offset is expected, but not found." + echo "[ERROR]: $check_msg_offset is expected, but not found." exit 1 fi } diff --git a/operator/ascendc/1_utilities/7_dumptensor/FrameworkLaunch/DumpTensorVector/install.sh b/operator/ascendc/1_utilities/7_dumptensor/FrameworkLaunch/DumpTensorVector/install.sh index 70f27a954..59dcf4e57 100755 --- a/operator/ascendc/1_utilities/7_dumptensor/FrameworkLaunch/DumpTensorVector/install.sh +++ b/operator/ascendc/1_utilities/7_dumptensor/FrameworkLaunch/DumpTensorVector/install.sh @@ -19,7 +19,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -27,7 +27,7 @@ done VERSION_LIST="Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi diff --git a/operator/ascendc/1_utilities/7_dumptensor/KernelLaunch/DumpTensorKernelInvocationCube/run.sh b/operator/ascendc/1_utilities/7_dumptensor/KernelLaunch/DumpTensorKernelInvocationCube/run.sh index b38325a40..23734a78a 100755 --- a/operator/ascendc/1_utilities/7_dumptensor/KernelLaunch/DumpTensorKernelInvocationCube/run.sh +++ b/operator/ascendc/1_utilities/7_dumptensor/KernelLaunch/DumpTensorKernelInvocationCube/run.sh @@ -39,7 +39,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -47,13 +47,13 @@ done RUN_MODE_LIST="cpu sim npu" if [[ " $RUN_MODE_LIST " != *" $RUN_MODE "* ]]; then - echo "ERROR: RUN_MODE error, This sample only support specify cpu, sim or npu!" + echo "[ERROR]: RUN_MODE error, This sample only support specify cpu, sim or npu!" exit -1 fi VERSION_LIST="Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi @@ -123,16 +123,16 @@ count_shape=$(grep -c "$check_msg_shape" $file_path) count_offset=$(grep -c "$check_msg_offset" $file_path) if [ $count_gm -eq 0 ]; then - echo "Error, $check_msg_gm is expected, but not found." + echo "[ERROR]: $check_msg_gm is expected, but not found." exit 1 fi if [ $count_shape -eq 0 ]; then - echo "Error, $check_msg_shape is expected, but not found." + echo "[ERROR]: $check_msg_shape is expected, but not found." exit 1 fi if [ $count_offset -eq 0 ]; then - echo "Error, $check_msg_offset is expected, but not found." + echo "[ERROR]: $check_msg_offset is expected, but not found." exit 1 fi \ No newline at end of file diff --git a/operator/ascendc/1_utilities/7_dumptensor/KernelLaunch/DumpTensorKernelInvocationVector/run.sh b/operator/ascendc/1_utilities/7_dumptensor/KernelLaunch/DumpTensorKernelInvocationVector/run.sh index 7ff642101..d85b7f5f2 100755 --- a/operator/ascendc/1_utilities/7_dumptensor/KernelLaunch/DumpTensorKernelInvocationVector/run.sh +++ b/operator/ascendc/1_utilities/7_dumptensor/KernelLaunch/DumpTensorKernelInvocationVector/run.sh @@ -40,7 +40,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -48,13 +48,13 @@ done RUN_MODE_LIST="cpu sim npu" if [[ " $RUN_MODE_LIST " != *" $RUN_MODE "* ]]; then - echo "ERROR: RUN_MODE error, This sample only support specify cpu, sim or npu!" + echo "[ERROR]: RUN_MODE error, This sample only support specify cpu, sim or npu!" exit -1 fi VERSION_LIST="Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi @@ -72,7 +72,7 @@ fi export ASCEND_TOOLKIT_HOME=${_ASCEND_INSTALL_PATH} export ASCEND_HOME_PATH=${_ASCEND_INSTALL_PATH} -echo "Current compile soc version is ${SOC_VERSION}" +echo "[INFO]: Current compile soc version is ${SOC_VERSION}" source ${_ASCEND_INSTALL_PATH}/bin/setenv.bash if [ "${RUN_MODE}" = "sim" ]; then # in case of running op in simulator, use stub .so instead @@ -125,16 +125,16 @@ count_shape=$(grep -c "$check_msg_shape" $file_path) count_offset=$(grep -c "$check_msg_offset" $file_path) if [ $count_gm -eq 0 ]; then - echo "Error, $check_msg_gm is expected, but not found." + echo "[ERROR]: $check_msg_gm is expected, but not found." exit 1 fi if [ $count_shape -eq 0 ]; then - echo "Error, $check_msg_shape is expected, but not found." + echo "[ERROR]: $check_msg_shape is expected, but not found." exit 1 fi if [ $count_offset -eq 0 ]; then - echo "Error, $check_msg_offset is expected, but not found." + echo "[ERROR]: $check_msg_offset is expected, but not found." exit 1 fi diff --git a/operator/ascendc/2_features/12_cube_group/AclNNInvocation/run.sh b/operator/ascendc/2_features/12_cube_group/AclNNInvocation/run.sh index 3e39eb84e..c8b55cde5 100644 --- a/operator/ascendc/2_features/12_cube_group/AclNNInvocation/run.sh +++ b/operator/ascendc/2_features/12_cube_group/AclNNInvocation/run.sh @@ -27,10 +27,10 @@ function main { cd $CURRENT_DIR/run/out/test_data/data python3 generate_data.py if [ $? -ne 0 ]; then - echo "ERROR: generate input data failed!" + echo "[ERROR]: Generate input data failed!" return 1 fi - echo "INFO: generate input data success!" + echo "[INFO]: Generate input data success!" # 3. 编译acl可执行文件 cd $CURRENT_DIR @@ -39,27 +39,27 @@ function main { cd build cmake ../src -DCMAKE_SKIP_RPATH=TRUE if [ $? -ne 0 ]; then - echo "ERROR: cmake failed!" + echo "[ERROR]: Cmake failed!" return 1 fi - echo "INFO: cmake success!" + echo "[INFO]: Cmake success!" make if [ $? -ne 0 ]; then - echo "ERROR: make failed!" + echo "[ERROR]: Make failed!" return 1 fi - echo "INFO: make success!" + echo "[INFO]: Make success!" # 4. 运行可执行文件 export LD_LIBRARY_PATH=$_ASCEND_INSTALL_PATH/opp/vendors/customize/op_api/lib:$LD_LIBRARY_PATH cd $CURRENT_DIR/run/out - echo "INFO: execute op!" + echo "[INFO]: Execute op!" ./execute_cube_group_custom_op if [ $? -ne 0 ]; then - echo "ERROR: acl executable run failed! please check your project!" + echo "[ERROR]: Acl executable run failed! please check your project!" return 1 fi - echo "INFO: acl executable run success!" + echo "[INFO]: Acl executable run success!" # 5. 比较真值文件 cd $CURRENT_DIR @@ -67,7 +67,7 @@ function main { $CURRENT_DIR/run/out/result_files/output_0.bin \ $CURRENT_DIR/run/out/test_data/data/golden.bin if [ $? -ne 0 ]; then - echo "ERROR: verify result failed!" + echo "[ERROR]: Verify result failed!" return 1 fi } diff --git a/operator/ascendc/2_features/12_cube_group/install.sh b/operator/ascendc/2_features/12_cube_group/install.sh index bda9aaff6..2dff708d6 100644 --- a/operator/ascendc/2_features/12_cube_group/install.sh +++ b/operator/ascendc/2_features/12_cube_group/install.sh @@ -19,7 +19,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -27,7 +27,7 @@ done VERSION_LIST="Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi diff --git a/operator/ascendc/2_features/13_matmul_api_ibshare/MatmulABshareInvocation/run.sh b/operator/ascendc/2_features/13_matmul_api_ibshare/MatmulABshareInvocation/run.sh index b60d42817..480fcdf86 100644 --- a/operator/ascendc/2_features/13_matmul_api_ibshare/MatmulABshareInvocation/run.sh +++ b/operator/ascendc/2_features/13_matmul_api_ibshare/MatmulABshareInvocation/run.sh @@ -39,7 +39,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -47,13 +47,13 @@ done RUN_MODE_LIST="cpu sim npu" if [[ " $RUN_MODE_LIST " != *" $RUN_MODE "* ]]; then - echo "ERROR: RUN_MODE error, This sample only support specify cpu, sim or npu!" + echo "[ERROR]: RUN_MODE error, This sample only support specify cpu, sim or npu!" exit -1 fi VERSION_LIST="Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi @@ -112,8 +112,8 @@ python3 scripts/gen_data.py ) md5sum output/*.bin -echo "Verify ABshare precision" +echo "[INFO]: Verify ABshare precision" python3 scripts/verify_result.py output/output_ABshare.bin output/golden.bin -echo "Verify noABshare precision" +echo "[INFO]: Verify noABshare precision" python3 scripts/verify_result.py output/output_noABshare.bin output/golden.bin diff --git a/operator/ascendc/2_features/14_matmul_api_constant/AclNNInvocation/run.sh b/operator/ascendc/2_features/14_matmul_api_constant/AclNNInvocation/run.sh index 86998dc6c..17d93f334 100755 --- a/operator/ascendc/2_features/14_matmul_api_constant/AclNNInvocation/run.sh +++ b/operator/ascendc/2_features/14_matmul_api_constant/AclNNInvocation/run.sh @@ -25,7 +25,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -54,10 +54,10 @@ function main { cd $CURRENT_DIR/run/out/test_data/data python3 generate_data.py if [ $? -ne 0 ]; then - echo "ERROR: generate input data failed!" + echo "[ERROR]: Generate input data failed!" return 1 fi - echo "INFO: generate input data success!" + echo "[INFO]: Generate input data success!" # 3. 编译acl可执行文件 cd $CURRENT_DIR @@ -66,26 +66,26 @@ function main { cd build cmake ../src if [ $? -ne 0 ]; then - echo "ERROR: cmake failed!" + echo "[ERROR]: Cmake failed!" return 1 fi - echo "INFO: cmake success!" + echo "[INFO]: Cmake success!" make if [ $? -ne 0 ]; then - echo "ERROR: make failed!" + echo "[ERROR]: Make failed!" return 1 fi - echo "INFO: make success!" + echo "[INFO]: Make success!" # 4. 运行可执行文件 cd $CURRENT_DIR/run/out - echo "INFO: execute op!" + echo "[INFO]: Execute op!" ./execute_matmul_api_constant_custom_op if [ $? -ne 0 ]; then - echo "ERROR: acl executable run failed! please check your project!" + echo "[ERROR]: Acl executable run failed! please check your project!" return 1 fi - echo "INFO: acl executable run success!" + echo "[INFO]: Acl executable run success!" # 5. 比较真值文件 cd $CURRENT_DIR @@ -93,7 +93,7 @@ function main { $CURRENT_DIR/run/out/result_files/output_0.bin \ $CURRENT_DIR/run/out/test_data/data/golden.bin if [ $? -ne 0 ]; then - echo "ERROR: verify result failed!" + echo "[ERROR]: Verify result failed!" return 1 fi } diff --git a/operator/ascendc/2_features/14_matmul_api_constant/install.sh b/operator/ascendc/2_features/14_matmul_api_constant/install.sh index dd9f877e7..0d37d1595 100755 --- a/operator/ascendc/2_features/14_matmul_api_constant/install.sh +++ b/operator/ascendc/2_features/14_matmul_api_constant/install.sh @@ -19,7 +19,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -27,7 +27,7 @@ done VERSION_LIST="Ascend910A Ascend910B Ascend310B1 Ascend310B2 Ascend310B3 Ascend310B4 Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi diff --git a/operator/ascendc/2_features/16_group_barrier/AclNNInvocation/run.sh b/operator/ascendc/2_features/16_group_barrier/AclNNInvocation/run.sh index d3e54dc31..284a2cf58 100644 --- a/operator/ascendc/2_features/16_group_barrier/AclNNInvocation/run.sh +++ b/operator/ascendc/2_features/16_group_barrier/AclNNInvocation/run.sh @@ -29,10 +29,10 @@ function main { cd $CURRENT_DIR python3 scripts/gen_data.py if [ $? -ne 0 ]; then - echo "ERROR: generate input data failed!" + echo "[ERROR]: Generate input data failed!" return 1 fi - echo "INFO: generate input data success!" + echo "[INFO]: Generate input data success!" # 3. 编译acl可执行文件 cd $CURRENT_DIR @@ -41,38 +41,38 @@ function main { cd build cmake ../src -DCMAKE_SKIP_RPATH=TRUE if [ $? -ne 0 ]; then - echo "ERROR: cmake failed!" + echo "[ERROR]: Cmake failed!" return 1 fi - echo "INFO: cmake success!" + echo "[INFO]: Cmake success!" make if [ $? -ne 0 ]; then - echo "ERROR: make failed!" + echo "[ERROR]: Make failed!" return 1 fi - echo "INFO: make success!" + echo "[INFO]: Make success!" # 4. 运行可执行文件 export LD_LIBRARY_PATH=$_ASCEND_INSTALL_PATH/opp/vendors/customize/op_api/lib:$LD_LIBRARY_PATH cd $CURRENT_DIR/output - echo "INFO: execute op!" + echo "[INFO]: Execute op!" check_msg="OUTPUT = 24" file_path=output_msg.txt ./execute_group_barrier | tee $file_path count=$(grep -c "$check_msg" $file_path) if [ $? -ne 0 ]; then - echo "ERROR: acl executable run failed! please check your project!" + echo "[ERROR]: Acl executable run failed! please check your project!" return 1 fi - echo "INFO: acl executable run success!" + echo "[INFO]: Acl executable run success!" # 5. 比较真值文件 if [ $count -ne 6 ]; then - echo "ERROR: verify result failed!" + echo "[ERROR]: Verify result failed!" return 1 fi - echo "test pass" + echo "[INFO]: Test pass" } main diff --git a/operator/ascendc/2_features/16_group_barrier/install.sh b/operator/ascendc/2_features/16_group_barrier/install.sh index 59b11009b..b65411bb6 100644 --- a/operator/ascendc/2_features/16_group_barrier/install.sh +++ b/operator/ascendc/2_features/16_group_barrier/install.sh @@ -19,7 +19,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -27,7 +27,7 @@ done VERSION_LIST="Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi diff --git a/operator/ascendc/2_features/17_tiling_sink/AddCustomTilingSink/AddCustomTilingSink/install.sh b/operator/ascendc/2_features/17_tiling_sink/AddCustomTilingSink/AddCustomTilingSink/install.sh index d4ee2aa9a..15f3606b6 100644 --- a/operator/ascendc/2_features/17_tiling_sink/AddCustomTilingSink/AddCustomTilingSink/install.sh +++ b/operator/ascendc/2_features/17_tiling_sink/AddCustomTilingSink/AddCustomTilingSink/install.sh @@ -19,7 +19,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac diff --git a/operator/ascendc/2_features/2_tbufpool/run.sh b/operator/ascendc/2_features/2_tbufpool/run.sh index 04d5fd9fc..3f192dea0 100644 --- a/operator/ascendc/2_features/2_tbufpool/run.sh +++ b/operator/ascendc/2_features/2_tbufpool/run.sh @@ -40,7 +40,7 @@ while :; do break ;; *) - echo "[ERROR] Unexpected option: $1" + echo "[ERROR]: Unexpected option: $1" break ;; esac @@ -48,13 +48,13 @@ done RUN_MODE_LIST="cpu sim npu" if [[ " $RUN_MODE_LIST " != *" $RUN_MODE "* ]]; then - echo "ERROR: RUN_MODE error, This sample only support specify cpu, sim or npu!" + echo "[ERROR]: RUN_MODE error, This sample only support specify cpu, sim or npu!" exit -1 fi VERSION_LIST="Ascend310P1 Ascend310P3 Ascend910B1 Ascend910B2 Ascend910B3 Ascend910B4" if [[ " $VERSION_LIST " != *" $SOC_VERSION "* ]]; then - echo "ERROR: SOC_VERSION should be in [$VERSION_LIST]" + echo "[ERROR]: SOC_VERSION should be in [$VERSION_LIST]" exit -1 fi @@ -72,7 +72,7 @@ fi export ASCEND_TOOLKIT_HOME=${_ASCEND_INSTALL_PATH} export ASCEND_HOME_PATH=${_ASCEND_INSTALL_PATH} -echo "Current compile soc version is ${SOC_VERSION}" +echo "[INFO]: Current compile soc version is ${SOC_VERSION}" source ${_ASCEND_INSTALL_PATH}/bin/setenv.bash if [ "${RUN_MODE}" = "sim" ]; then # in case of running op in simulator, use stub .so instead -- Gitee