未验证 提交 469d5ab4 编写于 作者: Z zyfncg 提交者: GitHub

fix bug of data transform on xpu (#44262)

上级 aa71c551
......@@ -2103,7 +2103,9 @@ Scope* OperatorWithKernel::PrepareData(
auto tensor_backend = phi::TransToPhiBackend(tensor_in->place());
if ((in_def->backend != tensor_backend &&
(in_def->backend != phi::Backend::GPUDNN ||
tensor_backend != phi::Backend::GPU)) ||
tensor_backend != phi::Backend::GPU) &&
(in_def->backend != phi::Backend::KPS ||
tensor_backend != phi::Backend::XPU)) ||
tensor_in->place().GetType() == AllocationType::GPUPINNED) {
new_expected_kernel_key = std::make_unique<OpKernelType>(
expected_kernel_key.data_type_,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册