From 04cb27103c179852e45a0bad096d3b7de9c0448d Mon Sep 17 00:00:00 2001 From: zouyanlong Date: Thu, 28 Aug 2025 13:02:08 +0800 Subject: [PATCH] fix --- scripts/build.sh | 22 +++++++++------------- scripts/release.sh | 18 ++++++++---------- tests/CMakeLists.txt | 3 --- 3 files changed, 17 insertions(+), 26 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index ac8bf16d..d9849a2f 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -163,14 +163,14 @@ function fn_build_asdops() rm -f $THIRD_PARTY_DIR/asdops/lib/libmki.so 2> /dev/null return 0 fi - cd $THIRD_PARTY_DIR - rm -rf ascend-op-common-lib - branch=$(git symbolic-ref -q --short HEAD || git describe --tags --exact-match 2> /dev/null || echo "commit_id") - [[ "$branch" == *br_personal* || "$branch" == "commit_id" || "$branch" == *revert-mr* ]] && branch=master - echo "current branch for atb and asdops: $branch" - git clone --branch $branch --depth 1 https://szv-open.codehub.huawei.com/OpenBaize/Ascend/ascend-op-common-lib.git - cd ascend-op-common-lib - echo "current commid id of ascend-op-common-lib: $(git rev-parse HEAD)" + [[ -d "$THIRD_PARTY_DIR" ]] && cd $THIRD_PARTY_DIR + echo "Will not git clone the code repository" + if [ -d "$THIRD_PARTY_DIR"/ascend-op-common-lib ]; then + cd "$THIRD_PARTY_DIR"/ascend-op-common-lib + else + echo "Complie asdops failed, Please manually git clone the code repository" + exit 1 + fi [[ -d "$THIRD_PARTY_DIR/Mind-KernelInfra" ]] && mkdir -p 3rdparty && [[ -d "$THIRD_PARTY_DIR/mki" ]] && cp -r $THIRD_PARTY_DIR/mki 3rdparty if [ ! -d "$THIRD_PARTY_DIR/ascend-op-common-lib/3rdparty/ascend-transformer-boost" ]; then mkdir -p $THIRD_PARTY_DIR/ascend-op-common-lib/3rdparty/ascend-transformer-boost @@ -273,7 +273,7 @@ function fn_build_secodefuzz() fi cd $CACHE_DIR rm -rf secodefuzz - git clone -b v2.4.5 --depth=1 https://szv-open.codehub.huawei.com/innersource/Fuzz/secodefuzz.git + cd secodefuzz mkdir build && cd build cmake .. -DCMAKE_BUILD_TYPE=Release @@ -572,9 +572,6 @@ function fn_build_coverage() fn_run_torchatbtest fn_run_kernel_cinterfacetest fi - if [ "$COVERAGE_TYPE" == "FUZZTEST" ];then - fn_run_fuzztest - fi cd $GCOV_DIR $LCOV_PATH -c --directory ./.. --output-file tmp_coverage.info --rc lcov_branch_coverage=1 >> $GCOV_DIR/log.txt @@ -834,7 +831,6 @@ function fn_main() TEST_TIME=30 python3 $CODE_ROOT/tests/apitest/fuzztest/generate_operation_fuzz_test.py $CODE_ROOT $RANDOM_SEED $TEST_TIME fn_build_3rdparty_for_test - fn_build_secodefuzz fn_build fn_build_coverage ;; diff --git a/scripts/release.sh b/scripts/release.sh index 5fbf1260..135ebb2d 100644 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -19,7 +19,7 @@ function fn_build_mki() branch=$(git symbolic-ref -q --short HEAD || git describe --tags --exact-match 2> /dev/null || echo "commit_id") [[ "$branch" == *br_personal* || "$branch" == "commit_id" ]] && branch=master echo "current branch for atb and mki: $branch" - git clone --branch $branch --depth 1 https://szv-open.codehub.huawei.com/OpenBaize/Ascend/Mind-KernelInfra.git + git clone --branch $branch --depth 1 https://gitee.com/ascend/Mind-KernelInfra.git else [[ -d "$THIRD_PARTY_DIR"/Mind-KernelInfra/build ]] && rm -rf $THIRD_PARTY_DIR/Mind-KernelInfra/build [[ -d "$THIRD_PARTY_DIR"/Mind-KernelInfra/output ]] && rm -rf $THIRD_PARTY_DIR/Mind-KernelInfra/output @@ -42,18 +42,16 @@ function fn_build_mki() function fn_build_asdops() { - if [ ! -d "$THIRD_PARTY_DIR"/ascend-op-common-lib ]; then - [[ ! -d "$THIRD_PARTY_DIR" ]] && mkdir $THIRD_PARTY_DIR - cd $THIRD_PARTY_DIR - branch=$(git symbolic-ref -q --short HEAD || git describe --tags --exact-match 2> /dev/null || echo "commit_id") - [[ "$branch" == *br_personal* || "$branch" == "commit_id" ]] && branch=master - echo "current branch for atb and asdops: $branch" - git clone --branch $branch --depth 1 https://szv-open.codehub.huawei.com/OpenBaize/Ascend/ascend-op-common-lib.git - else + [[ -d "$THIRD_PARTY_DIR" ]] && cd $THIRD_PARTY_DIR + echo "Will not git clone the code repository" + if [ -d "$THIRD_PARTY_DIR"/ascend-op-common-lib ]; then + cd $THIRD_PARTY_DIR/ascend-op-common-lib [[ -d "$THIRD_PARTY_DIR"/ascend-op-common-lib/build ]] && rm -rf $THIRD_PARTY_DIR/ascend-op-common-lib/build [[ -d "$THIRD_PARTY_DIR"/ascend-op-common-lib/output ]] && rm -rf $THIRD_PARTY_DIR/ascend-op-common-lib/output + else + echo "Complie asdops failed, Please manually git clone the code repository" + exit 1 fi - cd $THIRD_PARTY_DIR/ascend-op-common-lib mkdir -p $THIRD_PARTY_DIR/ascend-op-common-lib/3rdparty [[ -d "$THIRD_PARTY_DIR"/ascend-op-common-lib/3rdparty/mki ]] && rm -rf $THIRD_PARTY_DIR/ascend-op-common-lib/3rdparty/mki diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index d15dc57a..cb02cea2 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -12,7 +12,4 @@ add_subdirectory(framework) if(USE_UNIT_TEST OR USE_ALL_TEST) add_subdirectory(unittest) add_subdirectory(cinterface) -endif() -if(USE_FUZZ_TEST) - add_subdirectory(apitest/fuzztest) endif() \ No newline at end of file -- Gitee