Skip to content

Fix allocator_facade.h overloaded error when enabling PADDLE_WITH_CUD…#78813

Open
wuyujiji wants to merge 1 commit intoPaddlePaddle:developfrom
wuyujiji:yuzhe_dev
Open

Fix allocator_facade.h overloaded error when enabling PADDLE_WITH_CUD…#78813
wuyujiji wants to merge 1 commit intoPaddlePaddle:developfrom
wuyujiji:yuzhe_dev

Conversation

@wuyujiji
Copy link
Copy Markdown

@wuyujiji wuyujiji commented Apr 27, 2026

PR Category

Custom Device

PR Types

Bug fixes

Description

032CF94168AF6E539DB7CF2847FCDDC2 如果在FastDeploy里#include "paddle/phi/core/memory/allocation/allocator_facade.h",在天数硬件上编译会报错,看了一下编译的log,应该是同时开启了PADDLE_WITH_CUDA和PADDLE_WITH_CUSTOM_DEVIC导致函数重名报错了,在paddle里allocator_facade.h的代码如下: 4951ADCA75DF7F19481E15D1806925B5 然后malloc.h里也有类似的代码,通过!defined(PADDLE_WITH_CUSTOM_DEVICE)来避免了这个问题: C12D2A9E6947EA8A66FEEF8600326B4C

所以参考malloc.h,在allocator_facade.h里也加上了!defined(PADDLE_WITH_CUSTOM_DEVICE)

是否引起精度变化

@paddle-bot
Copy link
Copy Markdown

paddle-bot Bot commented Apr 27, 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 27, 2026
@wuyujiji
Copy link
Copy Markdown
Author

/re-run all-failed

@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label May 8, 2026
@luotao1 luotao1 removed the HappyOpenSource 快乐开源活动issue与PR label May 8, 2026
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.

3 participants