[BugFix] Exit if neither modern nor legacy wheel dir not found#5367
Merged
SigureMo merged 4 commits intoPaddlePaddle:developfrom Dec 4, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a critical bug where the build script could incorrectly copy root directory contents to the ops directory when neither modern nor legacy wheel directory structures are found. The fix adds proper error handling to exit early with helpful messages.
- Adds
exit 1to prevent dangerous root directory copying when directory structure detection fails - Provides informative error messages suggesting to clean build directories when compilation fails
- Applied consistently to both GPU ops (build.sh) and XPU ops (custom_ops/xpu_ops/build.sh)
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| build.sh | Adds exit and cleanup guidance when GPU ops directory structure is not found |
| custom_ops/xpu_ops/build.sh | Adds exit and cleanup guidance when XPU ops directory structure is not found |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #5367 +/- ##
==========================================
Coverage ? 59.40%
==========================================
Files ? 325
Lines ? 40273
Branches ? 6097
==========================================
Hits ? 23923
Misses ? 14441
Partials ? 1909
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
YuanRisheng
approved these changes
Dec 4, 2025
liyonghua0910
pushed a commit
to liyonghua0910/FastDeploy
that referenced
this pull request
Dec 5, 2025
…ePaddle#5367) --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
#5156 实现的根据 modern or legacy 目录结构来判断要以何种方式 copy 的逻辑在某些情况可能走到第三个分支,此时就会将根目录里的内容 copy 到 ops 目录,该问题可能是由于某些奇怪的缓存导致的,因为更新后无法复现所以在第三个分支退出以避免 copy 根目录导致的严重问题
Modifications
在 GPU/XPU 的目录结构判断逻辑的第三个分支直接退出,并添加清理构建目录的提示
Usage or Command
Accuracy Tests
Checklist
[FDConfig],[APIServer],[Engine],[Scheduler],[PD Disaggregation],[Executor],[Graph Optimization],[Speculative Decoding],[RL],[Models],[Quantization],[Loader],[OP],[KVCache],[DataProcessor],[BugFix],[Docs],[CI],[Optimization],[Feature],[Benchmark],[Others],[XPU],[HPU],[GCU],[DCU],[Iluvatar],[Metax]]pre-commitbefore commit.releasebranch, make sure the PR has been submitted to thedevelopbranch, then cherry-pick it to thereleasebranch with the[Cherry-Pick]PR tag.