[Cpp API Compatibility] Remove deepep legacy apis#78549
[Cpp API Compatibility] Remove deepep legacy apis#78549youge325 wants to merge 4 commits intoPaddlePaddle:developfrom
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
There was a problem hiding this comment.
Pull request overview
This PR continues the C++ API compatibility cleanup by removing DeepEP-specific legacy stream/event APIs from the compat headers, aiming to converge on a PyTorch-shaped surface.
Changes:
- Tighten CUDA stream pool initialization by adding error checking and align
getStreamFromPooloverload shape to support anint priorityentry point. - Remove deprecated legacy APIs that exposed raw CUDA streams (
CUDAStream::raw_stream(),Event::record(cudaStream_t), andTensor::record_stream(cudaStream_t / at::cuda::CUDAStream)). - Expose
c10::Streamintonamespace atto supportat::Streamusage.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| paddle/phi/api/include/compat/c10/cuda/CUDAStream.h | Adds C10_CUDA_CHECK for priority range init; adds priority-based getStreamFromPool overload and maps bool overload to it. |
| paddle/phi/api/include/compat/c10/core/Stream.h | Introduces at::Stream aliasing/export of c10::Stream. |
| paddle/phi/api/include/compat/c10/core/Event.h | Removes legacy record(cudaStream_t) overload. |
| paddle/phi/api/include/compat/ATen/ops/record_stream.h | Removes legacy record_stream overloads taking at::cuda::CUDAStream and cudaStream_t. |
| paddle/phi/api/include/compat/ATen/core/TensorBody.h | Removes corresponding legacy record_stream declarations from Tensor. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| namespace at { | ||
| using c10::Stream; | ||
| } |
There was a problem hiding this comment.
Adding namespace at { using c10::Stream; } here conflicts with an existing at::Stream definition in paddle/phi/api/include/compat/ATen/core/TensorBody.h (currently using Stream = c10::Stream;). Since TensorBody.h includes <c10/core/Stream.h>, this will trigger a redefinition error when compiling any TU that includes ATen/core/TensorBody.h.
To fix: keep a single canonical at::Stream definition (either remove the Stream alias from TensorBody.h, or drop this new at::Stream export and rely on the existing one).
| namespace at { | |
| using c10::Stream; | |
| } |
|
/re-run all-failed |
1 similar comment
|
/re-run all-failed |
ShigureNyako
left a comment
There was a problem hiding this comment.
这轮清理方向和 PyTorch 对齐本身我认可:
c10::cuda::CUDAStream上游只有stream(),没有raw_stream()c10::Event上游只有record(const Stream&)getStreamFromPool也确实有int priority形态
但当前时点我还是得先卡住,因为这会造成明确的 BREAKING CHANGE,且下游闭环还没完成:
- PaddleFleet
develop目前仍固定third_party/DeepEP在3fed158b4751a4a89c92902aeb20bb8c8384f1e7。 - 这个版本的 DeepEP 还在直接使用这次要删掉的旧接口:
csrc/event.hpp:event->record(const cudaStream_t&)、at::cuda::getCurrentCUDAStream().raw_stream()csrc/deep_ep.cpp:多处t.record_stream(comm_stream),其中comm_stream仍是cudaStream_t
- DeepEP 侧迁移 PR
PFCCLab/DeepEP#10虽然已经合到了paddle分支(merge commit5f63568c9810b53e999fa56fd6981c40ba4a5d57),但 PaddleFleet 这边还没有把third_party/DeepEPbump 过去。 - 当前 PaddleFleet #712 标题写的是 “update submodule DeepEP”,但 diff 实际只改了
third_party/DeepGEMM,没有更新third_party/DeepEP,所以还不能作为这个 cleanup 的解锁证据。
因此“暂时不能合入”这个判断我认为仍然成立。
请先把 PaddleFleet / 实际下游切到不依赖 raw_stream() / Event::record(cudaStream_t) / Tensor::record_stream(cudaStream_t) 的版本,并给出对应 cross-reference / CI 证据,再来清理这批兼容接口。
dc7610a to
f71e518
Compare
|
我重新看了这次 force-push。 当前 diff 相比上一版,主要是:
这些调整没有改变我上一轮卡住的核心点:下游闭环还没完成。 到目前为止,PaddlePaddle/PaddleFleet#712 的 head 仍然是 因此我这边 blocker 维持不变:还是需要先补齐 DeepEP / PaddleFleet 侧的实际切换,以及对应的 cross-reference / CI 证据,再来清理这批兼容接口。 |
|
/re-run all-failed |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #78549 +/- ##
===========================================
Coverage ? 100.00%
===========================================
Files ? 1
Lines ? 1
Branches ? 0
===========================================
Hits ? 1
Misses ? 0
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
PR Category
Execute Infrastructure
PR Types
Improvements
Description
拆分自 #78484
是否引起精度变化
否