diff --git a/scripts/check_clang_format.sh b/scripts/check_clang_format.sh index 836ce7c7..2425345b 100644 --- a/scripts/check_clang_format.sh +++ b/scripts/check_clang_format.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2019 Huawei Technologies Co., Ltd +# Copyright 2019-2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -90,11 +90,9 @@ if [ "X${mode}" == "Xall" ]; then find inc -type f -name "*" | grep "\.h$\|\.cc$" >> "${CHECK_LIST_FILE}" || true elif [ "X${mode}" == "Xchanged" ]; then # --diff-filter=ACMRTUXB will ignore deleted files in commit - git diff --diff-filter=ACMRTUXB --name-only | grep "src" | grep "\.h$\|\.cc$" > "${CHECK_LIST_FILE}" || true - git diff --diff-filter=ACMRTUXB --name-only | grep "inc" | grep "\.h$\|\.cc$" >> "${CHECK_LIST_FILE}" || true + git diff --diff-filter=ACMRTUXB --name-only | grep "^inc\|^src" | grep "\.h$\|\.cc$" > "${CHECK_LIST_FILE}" || true else # "X${mode}" == "Xlastcommit" - git diff --diff-filter=ACMRTUXB --name-only HEAD~ HEAD | grep "src" | grep "\.h$\|\.cc$" > "${CHECK_LIST_FILE}" || true - git diff --diff-filter=ACMRTUXB --name-only HEAD~ HEAD | grep "inc" | grep "\.h$\|\.cc$" >> "${CHECK_LIST_FILE}" || true + git diff --diff-filter=ACMRTUXB --name-only HEAD~ HEAD | grep "^inc\|^src" | grep "\.h$\|\.cc$" > "${CHECK_LIST_FILE}" || true fi CHECK_RESULT_FILE=__code_format_check_result__ diff --git a/scripts/format_source_code.sh b/scripts/format_source_code.sh index 81d19f4b..1fd0b4f6 100644 --- a/scripts/format_source_code.sh +++ b/scripts/format_source_code.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2019 Huawei Technologies Co., Ltd +# Copyright 2019-2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -89,11 +89,10 @@ if [[ "X${mode}" == "Xall" ]]; then find src -type f -name "*" | grep "\.h$\|\.cc$" > "${FMT_FILE_LIST}" || true find inc -type f -name "*" | grep "\.h$\|\.cc$" >> "${FMT_FILE_LIST}" || true elif [[ "X${mode}" == "Xchanged" ]]; then - git diff --name-only | grep "src" | grep "\.h$\|\.cc$" > "${FMT_FILE_LIST}" || true - git diff --name-only | grep "inc" | grep "\.h$\|\.cc$" >> "${FMT_FILE_LIST}" || true + # --diff-filter=ACMRTUXB will ignore deleted files in commit + git diff --diff-filter=ACMRTUXB --name-only | grep "^inc\|^src" | grep "\.h$\|\.cc$" >> "${FMT_FILE_LIST}" || true else # "X${mode}" == "Xlastcommit" - git diff --name-only HEAD~ HEAD | grep "src" | grep "\.h$\|\.cc$" > "${FMT_FILE_LIST}" || true - git diff --name-only HEAD~ HEAD | grep "inc" | grep "\.h$\|\.cc$" >> "${FMT_FILE_LIST}" || true + git diff --diff-filter=ACMRTUXB --name-only HEAD~ HEAD | grep "^inc\|^src" | grep "\.h$\|\.cc$" > "${FMT_FILE_LIST}" || true fi while read line; do diff --git a/third_party/fwkacllib/inc/ops/nonlinear_fuc_ops.h b/third_party/fwkacllib/inc/ops/nonlinear_fuc_ops.h index 39357494..8c1985d1 100644 --- a/third_party/fwkacllib/inc/ops/nonlinear_fuc_ops.h +++ b/third_party/fwkacllib/inc/ops/nonlinear_fuc_ops.h @@ -124,9 +124,9 @@ REG_OP(Relu6) * z: A Tensor of type RealNumberType. */ REG_OP(Relu6Grad) - .INPUT(y, TensorType::RealNumberType()) - .INPUT(dy, TensorType::RealNumberType()) - .OUTPUT(z, TensorType::RealNumberType()) + .INPUT(gradients, TensorType::RealNumberType()) + .INPUT(features, TensorType::RealNumberType()) + .OUTPUT(backprops, TensorType::RealNumberType()) .OP_END_FACTORY_REG(Relu6Grad) /**