Skip to content

Commit

Permalink
[NPU] update npu ut skil scirpts, test=develop (#35360)
Browse files Browse the repository at this point in the history
* [NPU] update npu ut skil scirpts, test=develop

* update, test=develop

* update scripst, test=develop

* add debug code, test=develop

* update
  • Loading branch information
qili93 authored Sep 3, 2021
1 parent e77fd2e commit cec1abc
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions paddle/scripts/paddle_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1703,11 +1703,13 @@ set -x

function parallel_test_base_npu() {
# skipping if no NPU related files changed
if [ ${SKIL_NPU_TEST:-ON} == "ON" ] ; then
npu_cc_files=$(git diff --name-only ${BRANCH} | grep "op_npu.cc" | wc -l)
npu_py_files=$(git diff --name-only ${BRANCH} | grep "python/paddle/fluid/tests/unittests/npu" | wc -l)
if [ "${npu_cc_files}" -eq 0 ] && [ "${npu_py_files}" -eq 0 ] ; then
echo "NO NPU operators files changed, skip NPU unit tests"
if [ ${SKIP_NPU_TEST:-ON} == "ON" ] ; then
fetch_upstream_develop_if_not_exist
git diff --name-only remotes/upstream/$BRANCH
npu_cc_changes=$(git diff --name-only remotes/upstream/$BRANCH | grep "op_npu.cc" || true)
npu_py_changes=$(git diff --name-only remotes/upstream/$BRANCH | grep "op_npu.py" || true)
if [ -z "${npu_cc_changes}" ] && [ -z "${npu_py_changes}" ] ; then
echo "NO NPU operators files changed, skip NPU unit tests!"
exit 0
fi
fi
Expand Down

0 comments on commit cec1abc

Please sign in to comment.