Skip to content

[Cpp API Compatibility] Remove deepep legacy APIs#78549

Merged
SigureMo merged 11 commits intoPaddlePaddle:developfrom
youge325:remove-deepep-legacy-apis
May 1, 2026
Merged

[Cpp API Compatibility] Remove deepep legacy APIs#78549
SigureMo merged 11 commits intoPaddlePaddle:developfrom
youge325:remove-deepep-legacy-apis

Conversation

@youge325
Copy link
Copy Markdown
Contributor

@youge325 youge325 commented Apr 1, 2026

PR Category

Execute Infrastructure

PR Types

Deprecations

Description

拆分自 #78484

是否引起精度变化

Copilot AI review requested due to automatic review settings April 1, 2026 11:11
@paddle-bot
Copy link
Copy Markdown

paddle-bot Bot commented Apr 1, 2026

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot Bot added the contributor External developers label Apr 1, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 getStreamFromPool overload shape to support an int priority entry point.
  • Remove deprecated legacy APIs that exposed raw CUDA streams (CUDAStream::raw_stream(), Event::record(cudaStream_t), and Tensor::record_stream(cudaStream_t / at::cuda::CUDAStream)).
  • Expose c10::Stream into namespace at to support at::Stream usage.

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.

Comment on lines +109 to +112

namespace at {
using c10::Stream;
}
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
namespace at {
using c10::Stream;
}

Copilot uses AI. Check for mistakes.
@youge325
Copy link
Copy Markdown
Contributor Author

youge325 commented Apr 1, 2026

/re-run all-failed

1 similar comment
@youge325
Copy link
Copy Markdown
Contributor Author

youge325 commented Apr 1, 2026

/re-run all-failed

@youge325
Copy link
Copy Markdown
Contributor Author

youge325 commented Apr 3, 2026

/re-run all-failed

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop@4919688). Learn more about missing BASE report.

Additional details and impacted files
@@             Coverage Diff             @@
##             develop    #78549   +/-   ##
===========================================
  Coverage           ?   100.00%           
===========================================
  Files              ?         1           
  Lines              ?         6           
  Branches           ?         0           
===========================================
  Hits               ?         6           
  Misses             ?         0           
  Partials           ?         0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@youge325 youge325 force-pushed the remove-deepep-legacy-apis branch from f71e518 to 4f6abb2 Compare April 8, 2026 00:51
@youge325 youge325 changed the title [Cpp API Compatibility] Remove deepep legacy apis [Cpp API Compatibility] Remove deepep legacy APIs Apr 8, 2026
@SigureMo
Copy link
Copy Markdown
Member

merge 了下 develop 确认下 #78389 合入后能够监控 PR 的改动,此次 CI 应当挂掉

PaddlePaddle/PaddleFleet#712 合入后 rerun,CI 应当再次通过

@SigureMo
Copy link
Copy Markdown
Member

喔喔,#78595 引入了新的 DeepEP 兼容性 API,稍后 #78595 合入后这边也得单独处理下

@youge325
Copy link
Copy Markdown
Contributor Author

喔喔,#78595 引入了新的 DeepEP 兼容性 API,稍后 #78595 合入后这边也得单独处理下

好的

@SigureMo
Copy link
Copy Markdown
Member

稍等,先不要解决冲突,等一下 https://github.com/PaddlePaddle/Paddle/actions/runs/24223286023/job/70722751293?pr=78549 结果

@SigureMo
Copy link
Copy Markdown
Member

好啦,按照预期挂啦,可以解冲突啦

@youge325
Copy link
Copy Markdown
Contributor Author

/re-run all-failed

@SigureMo
Copy link
Copy Markdown
Member

https://github.com/PaddlePaddle/Paddle/actions/runs/24225463645/job/70726471802?pr=78631

ATen_resize_test 是不是 develop 直接挂了?另一个 PR 也有这个问题,develop 挂了需要尽快修一下,建议单独 PR 处理快速合入,不行就只能把单测禁了

@youge325
Copy link
Copy Markdown
Contributor Author

https://github.com/PaddlePaddle/Paddle/actions/runs/24225463645/job/70726471802?pr=78631

ATen_resize_test 是不是 develop 直接挂了?另一个 PR 也有这个问题,develop 挂了需要尽快修一下,建议单独 PR 处理快速合入,不行就只能把单测禁了

确实挂了,我看看能不能先合一个在 Mac-CPU 跳过测试的 pr

@youge325
Copy link
Copy Markdown
Contributor Author

/re-run all-failed

@youge325
Copy link
Copy Markdown
Contributor Author

上次我给 PaddleFleet checkout DeepGEMM 了,等 PFCCLab/DeepEP#11 合入后再 checkout DeepEP 吧

@youge325 youge325 force-pushed the remove-deepep-legacy-apis branch from 24247eb to 87acb07 Compare April 12, 2026 07:35
@youge325
Copy link
Copy Markdown
Contributor Author

/re-run all-failed

@youge325 youge325 marked this pull request as draft April 12, 2026 11:29
@youge325 youge325 force-pushed the remove-deepep-legacy-apis branch from 87acb07 to c4e8072 Compare April 26, 2026 15:51
@youge325
Copy link
Copy Markdown
Contributor Author

/re-run all-failed

@youge325 youge325 force-pushed the remove-deepep-legacy-apis branch from c4e8072 to 0a92651 Compare April 28, 2026 10:53
@youge325
Copy link
Copy Markdown
Contributor Author

/re-run all-failed

@youge325 youge325 force-pushed the remove-deepep-legacy-apis branch from 4b86d21 to ae1fdd3 Compare April 30, 2026 08:18
@youge325
Copy link
Copy Markdown
Contributor Author

/re-run all-failed

2 similar comments
@youge325
Copy link
Copy Markdown
Contributor Author

/re-run all-failed

@youge325
Copy link
Copy Markdown
Contributor Author

/re-run all-failed

@youge325 youge325 marked this pull request as ready for review April 30, 2026 12:22
@SigureMo
Copy link
Copy Markdown
Member

SigureMo commented May 1, 2026

这个确认不会影响 Hybrid EP 编译了么?另外目前 DeepEP 编译是否会依赖这里的相关符号?ABI 是否有不兼容情况?

@youge325
Copy link
Copy Markdown
Contributor Author

youge325 commented May 1, 2026

这个确认不会影响 Hybrid EP 编译了么?另外目前 DeepEP 编译是否会依赖这里的相关符号?ABI 是否有不兼容情况?

hybrid-ep编译还没本地验证过,deep-ep之前编译没问题,我再编译验证下,ABI兼容检查 0a92651 这里过了

@SigureMo
Copy link
Copy Markdown
Member

SigureMo commented May 1, 2026

hybrid-ep编译还没本地验证过,deep-ep之前编译没问题,我再编译验证下

嗯嗯,Hybrid EP 验证没问题就可以合了,节前 Hybrid EP 合入后因为 Paddle CI 有问题暂时 revert 了,#78846 修复了,节后会再合入一次

@youge325
Copy link
Copy Markdown
Contributor Author

youge325 commented May 1, 2026

image

hybrid-ep验证通过了,但是deep-ep因为最新的commit精化了编译条件,回滚一个提交可以编译通过

@SigureMo
Copy link
Copy Markdown
Member

SigureMo commented May 1, 2026

但是deep-ep因为最新的commit精化了编译条件,回滚一个提交可以编译通过

奇怪,DeepEP 的改动在 Hybrid EP 也 apply 了呀,Hybrid EP 没有一样报错吗

这个应该可以通过设置 PADDLE_CUDA_ARCH_LIST=9.0,10.0,10.3 解决

Copy link
Copy Markdown
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTMeow 🐾

@SigureMo SigureMo merged commit 16239ff into PaddlePaddle:develop May 1, 2026
185 of 191 checks passed
@youge325
Copy link
Copy Markdown
Contributor Author

youge325 commented May 1, 2026

这个应该可以通过设置 PADDLE_CUDA_ARCH_LIST=9.0,10.0,10.3 解决

应该是可以的,本地hybrid-ep编译用的是写好的build.sh脚本,里面配置好了PADDLE_CUDA_ARCH_LIST,deep-ep因为没检测到PADDLE_CUDA_ARCH_LIST环境变量就自动推断了

@youge325 youge325 deleted the remove-deepep-legacy-apis branch May 1, 2026 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants