未验证 提交 fcab331d 编写于 作者: Z zhupengyang 提交者: GitHub

fix phi xpu kernel tensor transform (#51306)

上级 87c5f23b
......@@ -585,7 +585,9 @@ void ApplyDataTransform(const OpKernelType& expected_kernel_key,
tensor_backend == phi::Backend::XPU) &&
!(def_backend == phi::Backend::ONEDNN &&
tensor_backend == phi::Backend::CPU)) ||
tensor_in->place().GetType() == AllocationType::GPUPINNED) {
tensor_in->place().GetType() == AllocationType::GPUPINNED ||
(platform::is_xpu_place(expected_kernel_key.place_) &&
def_backend == tensor_backend)) {
expected_kernel_key_for_argument_def =
std::make_unique<phi::KernelKey>(
def_backend,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册