Skip to content

[XPU] do not use null stream when CDNN_CLUSTER_PARALLEL is ON #67276

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 14, 2024

Conversation

lj970926
Copy link
Contributor

@lj970926 lj970926 commented Aug 9, 2024

PR Category

Custom Device

PR Types

Bug fixes

Description

  1. Do not use null stream when CDNN Cluster Parallel is ON.
    框架中的dev_ctx.Alloc调用使用默认流(null)的allocator,然而,XPU开启CDNN cluster并行之后,实际使用的是新创建的stream,而非null stream。这会导致框架的dev_ctx.Alloc和重载的XHPC中的alloc使用不同的显存池,如下图所示。由于CDNN_CLUSTER并行开启后,null stream实际上并未使用,所以该问题不会影响精度。
a8694cd33e3056be1127c8e2c09dc766 本PR将XPU行为对齐GPU,在创建`XPUContext`及对应`XPUStream`时,设置`AllocatorFacade`的默认Stream,从而使所有`dev_ctx.Alloc`使用和XHPCBufferManager相同的stream,如下图所示: 35e3b0caf8693e8a3bdb308f2a81aa2f

Copy link

paddle-bot bot commented Aug 9, 2024

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

@houj04 houj04 merged commit c0fced7 into PaddlePaddle:develop Aug 14, 2024
31 checks passed
@houj04 houj04 added the XPU label Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants