Skip to content

Conversation

DrRyanHuang
Copy link
Contributor

@DrRyanHuang DrRyanHuang commented Oct 20, 2025

PR Category

Operator Mechanism

PR Types

Improvements

Description

支持 FastDeploy SOT + CUDAGraph + 开启子图切分推理:PaddlePaddle/FastDeploy#4386

  • 移除 Capture 过程中的 Replay 以避免 CUDA700 错误
  • 另外,当使用 CUDAGraph 时,ParseDeviceContext 在转换 DeviceContext 的过程中会丢失 cuda_graph_allocator_。现修改为,如果检测到CUDAGraph Op的子Op,则直接返回原始的DeviceContext

Copy link

paddle-bot bot commented Oct 20, 2025

你的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.

Copy link
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.

标题说明做了什么,即移除 CUDAGraph capture 后的 replay 以及在 CUDA Graph 中使用相同的 device context,描述再写支持了 FD 基于子图拆分的 CUDA Graph 模式


// for cudagraph op
if (op->GetParentOp()->isa<paddle::dialect::CudaGraphOp>()) {
VLOG(4) << "CudaGraphOp detected, using original device context";
Copy link
Member

Choose a reason for hiding this comment

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

说明是 CUDAGraphOp 内的 OP,并且说明要确保是同一个 devcie context

@DrRyanHuang DrRyanHuang changed the title [CUDAGraph] Support FastDeploy CUDAGraph Inference [CUDAGraph] Remove CUDAGraph replay after capture and use the same device context in CUDA Graph Oct 20, 2025
SigureMo
SigureMo previously approved these changes Oct 20, 2025
Copy link
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 🐾

@codecov-commenter
Copy link

Codecov Report

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

Additional details and impacted files
@@             Coverage Diff             @@
##             develop    #75954   +/-   ##
===========================================
  Coverage           ?   100.00%           
===========================================
  Files              ?         1           
  Lines              ?         3           
  Branches           ?         0           
===========================================
  Hits               ?         3           
  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.

Copy link
Contributor

@From00 From00 left a comment

Choose a reason for hiding this comment

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

LGTM

@DrRyanHuang DrRyanHuang merged commit b381231 into PaddlePaddle:develop Oct 21, 2025
104 of 109 checks passed
@DrRyanHuang DrRyanHuang deleted the ryan_support_cudagraph branch October 21, 2025 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants