diff --git a/operator/ascendc/0_introduction/0_helloworld/run.sh b/operator/ascendc/0_introduction/0_helloworld/run.sh index 430d087bf2770d4941602b279c0053a01d82003e..c08a3f74936073a6d54960000db5e97b0ba80121 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 1c6b5ef46391dd6d996f4fe6325c1b821360a21b..6d7a2c9d54a4caff7bc49d73d3c997b438753a8f 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 456a674a253b9de325f2d772035fa5709e3ab377..39d09c98309044c2693a133a27df7a1be089715d 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 38be8f48a5cb247c0fa502f20db4c2651a1b5f5d..bcb5a15b39bbdbdf5963e54d5a8ea8847abef45d 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 ab64938f2794a50bb9a5a6f6fad2df42015d18b2..c86c7a6250071c413bafee1ddae78aa61aff922e 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 0012db2a0d173590f85472427863a4e0d1145e45..1ca7720b91dbf17d4136ac5d5a9ded3822ce804b 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 c3bbcb7a6bb7a118c1c9fa93827f05d9dfde5794..ae46c5ab12b1eb752185497ed24aefc0a375eb59 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 38be8f48a5cb247c0fa502f20db4c2651a1b5f5d..bcb5a15b39bbdbdf5963e54d5a8ea8847abef45d 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 d66cd3aa4dbccb94314a663b9001bb03f3656121..6725992d51996a6d72f5b973ffbaaaf0e80a0855 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 d092dcd7854e3a2e236875dee4ad6fa5c1a24274..a30696938dbd7d9e57abdd709c09cf649ebdc4c3 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 42b822522e4055b1e491fa51b600578311f2926c..7ba62608aeeba892e29160ed4d5ddf051c30aee8 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 e98fed73e4e17853a232a5b3bfdb3d8884e2120b..9595670fa91c74ec60ead35b1efad9debc184d5a 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 08570fe0988d34ae547881d94755b1ce66bb78c9..9204f113f90547080b2bbab65b56c0bc017e8087 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 08570fe0988d34ae547881d94755b1ce66bb78c9..9204f113f90547080b2bbab65b56c0bc017e8087 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 08570fe0988d34ae547881d94755b1ce66bb78c9..9204f113f90547080b2bbab65b56c0bc017e8087 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 08570fe0988d34ae547881d94755b1ce66bb78c9..9204f113f90547080b2bbab65b56c0bc017e8087 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 08570fe0988d34ae547881d94755b1ce66bb78c9..9204f113f90547080b2bbab65b56c0bc017e8087 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 7dab3141f6c9c8773234046555ee259c46d65f53..f66ba50c6103703e748b555988617f64dcfe1c62 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 f09ddb4758bcf84cc4ea6bc674bc2bb73f35dac5..5224706024edd0f6ae3086a9a0bf24c0cb7f5183 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 a652bf4789ab666876d5a2f57d8c9d27ccc96f97..00bdad141673e4eafe28f774488426ca5e2496a1 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 e2aff02594ede6388d567d2ac4d2a4932f24cd1c..7ad4ee9f8adca0bed838fc42597d22e9012e8ab3 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 acd409c6f7dc9a31e83d5991aa963bbddd1a9ce1..01ae806abc9d3a0ddfe25747706a09d74b95a8a3 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 497954c8ecbdb6e69a129f68f78776d7c1de3f86..0db77830a5c2d1bf745079560ed5793b1363241b 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 4a47761eed05a582132f7dee4d9f60f236e76456..95302115d2b8e6ba728679915736c3be755d5abc 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 0202346ce1c2b0dde45f58f6d1f74454bfded82a..1572b14adf9e8862d83b03a3f042c4c45cf79c9a 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 127c9a0f0e6e71cc1b8ac927c8f09078590b35a0..c206f4983ee7a82cff9fd98b95f3ae6bd86a41a3 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 f83616b885317554969e6c8a16f4614008b3a700..583e4a69ff6192c3045389854c24d734f90d18c9 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 f83616b885317554969e6c8a16f4614008b3a700..583e4a69ff6192c3045389854c24d734f90d18c9 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 5f06bb334c0ec5d48c98385e10838576c7930eab..b77f5227390bcc6dfefba796d6f52a1549f8a122 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 5f06bb334c0ec5d48c98385e10838576c7930eab..b77f5227390bcc6dfefba796d6f52a1549f8a122 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 5f06bb334c0ec5d48c98385e10838576c7930eab..b77f5227390bcc6dfefba796d6f52a1549f8a122 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 5f06bb334c0ec5d48c98385e10838576c7930eab..b77f5227390bcc6dfefba796d6f52a1549f8a122 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 74524bd16d217e562d5d7c53147a4bbc22a5ced3..60883d35745a67b9a5f991776789ca85c51a57f5 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 e04eb1c62206f7ccde1433075a5004b7aa1b02b8..7f30925aca9a45b75d9b921031323718b8be848c 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 6b6d239641f5be091849e9fb9813cd7274b79314..804bef0402c37698522848f441881a3786abe523 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 c6dd79858842c6b2d1be00f9282d84c1f4cbcf16..9eb5de4669a8bd4f9cb56b9c3e6245914e721aec 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 c6dd79858842c6b2d1be00f9282d84c1f4cbcf16..9eb5de4669a8bd4f9cb56b9c3e6245914e721aec 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 3c46b63a54b0e8d5b4d68b5601c949f27eb54fc1..f8c4a01a85c260e31c598bad034d2c6e1980480f 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 b0de91dfd335434ceda09f0a918ba5e9c2a17d87..2d1bff7a411be54b7ae2446de74b26b6a8afb11f 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 873e4bdc523e82f77c8d2fc4049b6490fe8d0277..05edc62ca0425f78b6bb39f8ad7715562d518b47 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 c6dd79858842c6b2d1be00f9282d84c1f4cbcf16..9eb5de4669a8bd4f9cb56b9c3e6245914e721aec 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 57e8771dbb6f769b09663ce74dbe2e77ce96c8fa..4b29064ca516e5745b3ecf888a26be1cf906facc 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 41f6be73c6af52cda124b0740bde4c01be546a0a..4b74830f0f3fcf2b8f3a956bf9122c41006e67d7 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 2bd031331f394a4a209e3cbef84576095c342d58..cf4f5950b8f066d68232d51039244d441e952036 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 f39cfda923a77fd1d73c58ae73cc110d36f4e5ca..49623f8044710c6532fffea0baebc9b12d77e3e1 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 64bc86a70345887f1200cb185e4669046be5f2ba..4fc65b243919e68237bd9ffe7a8feb956be30da3 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 e701007efe780823480c7dba29a4d68d0c7b14f6..fb432e7ae30bbd11088109acb328de1adaca3f71 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 314fea9ca4eb1ca72ce44d3e5c43d0c6218940a9..48efe5f455e2f0c40a4b96b197b34f2354adcd36 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 9c6122e132e0481e39a8feac07d37eadeddf62d8..ec7c6280c8eebb3ae6eee74216531902315ce99c 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 2a37ba800a1ea8de6f0d5181da379c1f46abf69b..4db6545fbb95c4fa45334565ab9fc04a2b2c151e 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 50530d46cb6d722e30877ce832cb99b56c50af82..09b6924874deb3930acfe471a7c9da633873b0c0 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 6467d834532b3cca22140cd74981aa403cbe5e18..805dcc8612c22559e0c9b4a3cdb95d38d26bf523 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 11050aa560054b236361f2cdede4c87d0235ae8c..0bb67501edbb5746e76e4927ceb9c136858c9703 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 bb72829aaf8c42ce8589b37c9269c8c769308127..11c9a169581a9ff7ef2cf0ad9d4c62691ba1c8c2 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 6467d834532b3cca22140cd74981aa403cbe5e18..805dcc8612c22559e0c9b4a3cdb95d38d26bf523 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 fcb90ffeee4147cdf0f8197092e4feb757b1f736..db5b1db08335064863c3aea2d2228ad2ab149125 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 782b395efc3c1670ae5795c43a9cf1b377ca263c..eaf8ebde18d427b6d97342addf016de44cfd7573 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 5efbbfe621fba4cb132c9ae036a83f2499aed7b5..67d0f3ad6c77b6cf6019928c7fe4dc594ea97434 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 92b089d86610cfbf345f4e4726d648f670a1605f..bdecf496fde12bfd3d972ace42e58252eb8d18e1 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 70f27a9545437ac021f45cceec7c01eb03921515..59dcf4e579ec7d783b9ae9739e8d19ee9aba26c2 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 b38325a40c20b27e6eb4671e1f9239529c60370e..23734a78ae46d291fe32e9ec5553d7d30129b59b 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 7ff642101fb00debfa7ac1983ceae8370f7ca949..d85b7f5f221b9fcb1bcd65e14422f78af8f31902 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 3e39eb84ed4d1d0f17fdb7cb772c5cc113a4a47e..c8b55cde52a4f9d082b1db997e20765ea9be0405 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 bda9aaff67e91aa0bb7cc9d0914bf0548b181c57..2dff708d6d197a9dc4d5815439b3e74d272898f6 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 b60d42817bfefa950801d46e7cc5e977749b49f6..480fcdf86780f1a7987e50919a23ad849cb3fffc 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 86998dc6cdc8af33d0f0033037ff9d8dcd17dbde..17d93f334f86ea9663ffa48da46d1addc4857825 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 dd9f877e7fee7d676f4f2c5fe8db94984740bc3d..0d37d1595bccaa26e01a7a4650a909e5a8b9d3c7 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 d3e54dc3109f58e2036420ea25766ba052f4cfc8..284a2cf58931cdcadbed576588fc5a5cf0d3b1dd 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 59b11009bd0022b37d64165c7368caab41237834..b65411bb6fd0881862f37ea92e36485b81a17c6f 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 d4ee2aa9aef3859b93ae67b394d8681a0828a732..15f3606b662ef3686d9830755f8e4e57d73bb502 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 04d5fd9fccd78442157ea2d8bfd3618365c41f8a..3f192dea0ef2bf66ded703655c7f93d71628a766 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