未验证 提交 3055d71a 编写于 作者: H houj04 提交者: GitHub

[XPU] add load_combine_op_xpu. test=kunlun (#45436)

上级 79f7f16d
/* Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#include "paddle/fluid/operators/load_combine_op.h"
namespace ops = paddle::operators;
REGISTER_OP_XPU_KERNEL(
load_combine,
ops::LoadCombineOpKernel<paddle::platform::XPUDeviceContext, float>,
ops::LoadCombineOpKernel<paddle::platform::XPUDeviceContext, double>,
ops::LoadCombineOpKernel<paddle::platform::XPUDeviceContext, int>,
ops::LoadCombineOpKernel<paddle::platform::XPUDeviceContext, int8_t>,
ops::LoadCombineOpKernel<paddle::platform::XPUDeviceContext, int64_t>);
......@@ -326,6 +326,12 @@ XPUOpMap& get_kl2_ops() {
XPUKernelSet({pOpKernelType(vartype::INT64, XPUPlace()),
pOpKernelType(vartype::INT32, XPUPlace()),
pOpKernelType(vartype::FP32, XPUPlace())})},
{"load_combine",
XPUKernelSet({pOpKernelType(vartype::FP32, XPUPlace()),
pOpKernelType(vartype::FP64, XPUPlace()),
pOpKernelType(vartype::INT8, XPUPlace()),
pOpKernelType(vartype::INT32, XPUPlace()),
pOpKernelType(vartype::INT64, XPUPlace())})},
{"log", XPUKernelSet({pOpKernelType(vartype::FP32, XPUPlace())})},
{"log_grad", XPUKernelSet({pOpKernelType(vartype::FP32, XPUPlace())})},
{"log_softmax", XPUKernelSet({pOpKernelType(vartype::FP32, XPUPlace())})},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册