Skip to content

Conversation

@dynamicheart
Copy link
Contributor

@dynamicheart dynamicheart commented May 14, 2024

@paddle-bot
Copy link

paddle-bot bot commented May 14, 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.

ret = xpu::add_mul_type<float, XPUYType, float>(
dev_ctx.x_context(), x_data, y_data, z_data, x.numel());
}
PADDLE_ENFORCE_XDNN_SUCCESS(ret, "add_mul_type");
Copy link
Contributor

Choose a reason for hiding this comment

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

这里的报错信息支持common::errors::XX 类型提示么?如果支持的话,建议加一下报错类型

Copy link
Contributor Author

Choose a reason for hiding this comment

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

好的, 我研究下

Copy link
Contributor Author

Choose a reason for hiding this comment

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

目前原本的XPUElementwise里面也是调用的PADDLE_ENFORCE_XDNN_SUCCESS,包括其它XPU算子也是用的PADDLE_ENFORCE_XDNN_SUCCESS,至于common::errors::XX报错信息的建议后续可以专门批量去改,看看是否能加到PADDLE_ENFORCE_XDNN_SUCCESS宏里面

return false;
}
#elif defined(PADDLE_WITH_XPU)
if ((op_name == "add" || op_name == "add_") && x == DataType::FLOAT32 &&
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Aurelius84 @zxcd 麻烦看看CUDA版本是否是漏了add_算子,这样XPU和CUDA可以合并,add_(fp32, bf16/fp16)最一开始的需求是来自于main_grad的inplace_add:https://github.com/PaddlePaddle/Paddle/pull/54415/files#diff-1c8fea91efa1fa5f00f4b766fb11723120b74ec26365724cca4be8a0792946d9R62

Copy link
Contributor

@zhangyk0314 zhangyk0314 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@qili93 qili93 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@cqulilujia cqulilujia left a comment

Choose a reason for hiding this comment

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

LGTM

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.

7 participants