From f88c159de16af963c4755458998c122ead2882b3 Mon Sep 17 00:00:00 2001 From: Nyakku Shigure Date: Thu, 4 Dec 2025 16:45:48 +0800 Subject: [PATCH] [BugFix] Exit if neither modern nor legacy wheel dir not found (#5367) --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- build.sh | 3 +++ custom_ops/xpu_ops/build.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/build.sh b/build.sh index 27f6d249f..8608435c1 100644 --- a/build.sh +++ b/build.sh @@ -96,6 +96,9 @@ function copy_ops(){ TMP_PACKAGE_DIR="${LEGACY_PACKAGE_DIR}" else echo -e "${RED}[Error]${NONE} Neither modern nor legacy directory for gpu ops found in ${OPS_TMP_DIR}" + echo -e "${BLUE}[Info]${NONE} Maybe the compilation failed, please clean the build directory (currently ${BUILD_DIR}) and egg directory (currently ${EGG_DIR}) and try again." + echo -e "${BLUE}[Info]${NONE} If the build still fails, please try to use a clean FastDeploy code and a clean environment to compile again." + exit 1 fi # Handle CPU ops directory compatibility between modern and legacy naming diff --git a/custom_ops/xpu_ops/build.sh b/custom_ops/xpu_ops/build.sh index 220f1974d..7b8623465 100755 --- a/custom_ops/xpu_ops/build.sh +++ b/custom_ops/xpu_ops/build.sh @@ -54,6 +54,9 @@ elif [ -d "${LEGACY_PACKAGE_DIR}" ]; then CUSTOM_OP_DLL_PATH="${TMP_PACKAGE_DIR}/fastdeploy_ops_pd_.so" else echo -e "${RED}[Error]${NONE} Neither modern nor legacy directory for xpu ops found in ${OPS_TMP_DIR}" + echo -e "${BLUE}[Info]${NONE} Maybe the compilation failed, please clean the build directory and try again." + echo -e "${BLUE}[Info]${NONE} If the build still fails, please try to use a clean FastDeploy code and a clean environment to compile again." + exit 1 fi mkdir -p ${TMP_PACKAGE_DIR}/libs