From 2dfee00b82dec75f22945e71eaedf9eb608e70f3 Mon Sep 17 00:00:00 2001 From: lishangfan Date: Fri, 19 Sep 2025 10:28:47 +0800 Subject: [PATCH] clean code --- atvc/examples/ops_aclnn/add/AclNNInvocationNaive/run.sh | 1 + atvc/examples/ops_aclnn/add/install.sh | 1 + atvc/examples/ops_aclnn/reduce_sum/AclNNInvocationNaive/run.sh | 1 + atvc/examples/ops_aclnn/reduce_sum/install.sh | 1 + atvc/examples/ops_pytorch/add/run.sh | 1 + atvc/examples/ops_pytorch/reduce_sum/run.sh | 1 + 6 files changed, 6 insertions(+) diff --git a/atvc/examples/ops_aclnn/add/AclNNInvocationNaive/run.sh b/atvc/examples/ops_aclnn/add/AclNNInvocationNaive/run.sh index b085a061..ca741d02 100644 --- a/atvc/examples/ops_aclnn/add/AclNNInvocationNaive/run.sh +++ b/atvc/examples/ops_aclnn/add/AclNNInvocationNaive/run.sh @@ -7,6 +7,7 @@ # INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. # See LICENSE in the root of the software repository for the full text of the License. # ====================================================================================================================== +set -e if [ -n "$ASCEND_INSTALL_PATH" ]; then _ASCEND_INSTALL_PATH=$ASCEND_INSTALL_PATH diff --git a/atvc/examples/ops_aclnn/add/install.sh b/atvc/examples/ops_aclnn/add/install.sh index 2e41482d..b6342d6c 100644 --- a/atvc/examples/ops_aclnn/add/install.sh +++ b/atvc/examples/ops_aclnn/add/install.sh @@ -7,6 +7,7 @@ # INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. # See LICENSE in the root of the software repository for the full text of the License. # ====================================================================================================================== +set -e SHORT=v:,i:, LONG=soc-version:,install-path:, diff --git a/atvc/examples/ops_aclnn/reduce_sum/AclNNInvocationNaive/run.sh b/atvc/examples/ops_aclnn/reduce_sum/AclNNInvocationNaive/run.sh index a950a390..f320ed84 100644 --- a/atvc/examples/ops_aclnn/reduce_sum/AclNNInvocationNaive/run.sh +++ b/atvc/examples/ops_aclnn/reduce_sum/AclNNInvocationNaive/run.sh @@ -7,6 +7,7 @@ # INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. # See LICENSE in the root of the software repository for the full text of the License. # ====================================================================================================================== +set -e if [ -n "$ASCEND_INSTALL_PATH" ]; then _ASCEND_INSTALL_PATH=$ASCEND_INSTALL_PATH diff --git a/atvc/examples/ops_aclnn/reduce_sum/install.sh b/atvc/examples/ops_aclnn/reduce_sum/install.sh index a3a01bc8..c9bf32e5 100644 --- a/atvc/examples/ops_aclnn/reduce_sum/install.sh +++ b/atvc/examples/ops_aclnn/reduce_sum/install.sh @@ -7,6 +7,7 @@ # INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. # See LICENSE in the root of the software repository for the full text of the License. # ====================================================================================================================== +set -e SHORT=v:,i:, LONG=soc-version:,install-path:, diff --git a/atvc/examples/ops_pytorch/add/run.sh b/atvc/examples/ops_pytorch/add/run.sh index 2650c7dc..bd56049e 100644 --- a/atvc/examples/ops_pytorch/add/run.sh +++ b/atvc/examples/ops_pytorch/add/run.sh @@ -7,6 +7,7 @@ # INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. # See LICENSE in the root of the software repository for the full text of the License. # ====================================================================================================================== +set -e torch_location=$(python3 -c "import torch; print(torch.__path__[0])") torch_npu_location=$(python3 -c "import torch_npu; print(torch_npu.__path__[0])") diff --git a/atvc/examples/ops_pytorch/reduce_sum/run.sh b/atvc/examples/ops_pytorch/reduce_sum/run.sh index 2650c7dc..bd56049e 100644 --- a/atvc/examples/ops_pytorch/reduce_sum/run.sh +++ b/atvc/examples/ops_pytorch/reduce_sum/run.sh @@ -7,6 +7,7 @@ # INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. # See LICENSE in the root of the software repository for the full text of the License. # ====================================================================================================================== +set -e torch_location=$(python3 -c "import torch; print(torch.__path__[0])") torch_npu_location=$(python3 -c "import torch_npu; print(torch_npu.__path__[0])") -- Gitee