From c3aaa7e441899049c5d2747adcc1eb4bd3747298 Mon Sep 17 00:00:00 2001 From: FocusLuo Date: Thu, 11 Dec 2025 16:36:37 +0800 Subject: [PATCH] [BugFix] Fixed build script issue on Intel HPU platforms (#5455) * [INTEL HPU] Fixed build script issue for non-gpu platforms Signed-off-by: Luo, Focus * [INTEL HPU] PR CI HPU will not use fixed version of fastdeploy_intel_hpu Signed-off-by: Luo, Focus --------- Signed-off-by: Luo, Focus Co-authored-by: YuBaoku <49938469+EmmonsCurse@users.noreply.github.com> --- custom_ops/setup_ops.py | 9 ++++++++- scripts/run_ci_hpu.sh | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/custom_ops/setup_ops.py b/custom_ops/setup_ops.py index 2bbde8814..1e5136985 100644 --- a/custom_ops/setup_ops.py +++ b/custom_ops/setup_ops.py @@ -672,7 +672,14 @@ elif paddle.device.is_compiled_with_custom_device("metax_gpu"): ), ) elif paddle.is_compiled_with_custom_device("intel_hpu"): - pass + setup( + name="fastdeploy_ops", + ext_modules=CppExtension( + sources=[ + "gpu_ops/get_output.cc", + ] + ), + ) else: use_bf16 = envs.FD_CPU_USE_BF16 == "True" diff --git a/scripts/run_ci_hpu.sh b/scripts/run_ci_hpu.sh index cc8e8d554..2dc0284a7 100755 --- a/scripts/run_ci_hpu.sh +++ b/scripts/run_ci_hpu.sh @@ -36,7 +36,7 @@ wget -q https://paddle-qa.bj.bcebos.com/suijiaxin/HPU/third-party/cutlass.tar.gz wget -q https://paddle-qa.bj.bcebos.com/suijiaxin/HPU/third-party/json.tar.gz && tar -xzf json.tar.gz -C custom_ops/third_party/ && mv custom_ops/third_party/json custom_ops/third_party/nlohmann_json chmod +x build.sh bash build.sh || exit 1 -pip install dist/fastdeploy_intel_hpu-2.3.0.dev0-py3-none-any.whl --force-reinstall +pip install dist/fastdeploy_intel_hpu-*.whl --force-reinstall #to install dependencies echo "pip others"