Skip to content
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

[XPU][PHI Kernels] bind rsqrt、bitwise_or、arange_tensor for xpu #58950

Merged
merged 3 commits into from
Nov 16, 2023

Conversation

lj970926
Copy link
Contributor

@lj970926 lj970926 commented Nov 13, 2023

PR types

New features

PR changes

OPs

Description

  1. bind rsqrt and bitwise_or kernels for xpu
  2. fix bugs caused by the name changing in previous PR for arange.
  3. replate the CPU implementation of XPU arange_tensor Kernel with xpu::range

Copy link

paddle-bot bot commented Nov 13, 2023

你的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 Nov 13, 2023
{"arange_tensor",
XPUKernelSet({phi::DataType::FLOAT32,
phi::DataType::INT32,
phi::DataType::INT64})},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

#58381 这个PR把kernel的名字从arange改成了arange_tensor,导致xpu不能从xpu2/3_op_list中找到对应的kernel信息从而触发fallback


int ret = xpu::range<T>(
dev_ctx.x_context(), out_data, start_value, step_value, size);
PADDLE_ENFORCE_XDNN_SUCCESS(ret, "range");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

原来的CPU实现替换为xpu::range

DenseTensor* out) {
// Same reason as bitwise_and
LogicalOrKernel<T, Context>(ctx, x, y, out);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

bitwise_or之前已有已有单测

Copy link
Contributor

@runzhech runzhech left a comment

Choose a reason for hiding this comment

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

lgtm

@QingshuChen QingshuChen merged commit 29bd66f into PaddlePaddle:develop Nov 16, 2023
28 checks passed
SecretXV pushed a commit to SecretXV/Paddle that referenced this pull request Nov 28, 2023
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.

None yet

4 participants