Skip to content

[XPU] fix index's datatype, using int64 instead of int, part 1 (a-f) #72431

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
May 7, 2025

Conversation

cqulilujia
Copy link
Contributor

PR Category

Custom Device

PR Types

Bug fixes

Description

Use int64 datatype for index instead of int in kernels , part 1 (a-f)

Copy link

paddle-bot bot commented Apr 23, 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.

@paddle-bot paddle-bot bot added the XPU label Apr 23, 2025
@@ -46,5 +46,31 @@ inline void ExtractNCWHD(const phi::DDim &dims,
: 1;
}
}

inline void ExtractNCWHD(const phi::DDim &dims,
Copy link
Contributor Author

@cqulilujia cqulilujia Apr 24, 2025

Choose a reason for hiding this comment

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

增加int64类型函数重载

@@ -61,7 +61,7 @@ void GatherGradKernel(const Context& dev_ctx,
dev_ctx.template Alloc<T>(x_grad);
using XPUType = typename XPUTypeTrait<T>::Type;

int r = XPU_SUCCESS;
int r = 0;
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

@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

@zhouquan32
Copy link
Contributor

LGTM

@houj04 houj04 merged commit cefc437 into PaddlePaddle:develop May 7, 2025
39 of 43 checks passed
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.

5 participants