未验证 提交 02888e52 编写于 作者: Y Yuan Shuai 提交者: GitHub

Fix target bug: kHost and kARM not equal. test=develop (#2273)

* Fix bug target for kHost and kARM not equal. test=develop

* Fix license. test=develop
上级 d65b5a29
...@@ -125,7 +125,8 @@ void TypeTargetTransformPass::AddIoCopyInst( ...@@ -125,7 +125,8 @@ void TypeTargetTransformPass::AddIoCopyInst(
VLOG(4) << "------ kernel info -------"; VLOG(4) << "------ kernel info -------";
VLOG(4) << "*in_arg_ty(io_copy kernel input):" << *in_arg_ty; VLOG(4) << "*in_arg_ty(io_copy kernel input):" << *in_arg_ty;
VLOG(4) << "from(last kernel output):" << from; VLOG(4) << "from(last kernel output):" << from;
VLOG(4) << "to:" << to; VLOG(4) << "out_arg_ty(io_copy kernel output):" << *out_arg_ty;
VLOG(4) << "to:" << to << "\n";
// kernel choose branch for opencl backend // kernel choose branch for opencl backend
// judge inst's target whether is kOpenCL // judge inst's target whether is kOpenCL
...@@ -143,7 +144,7 @@ void TypeTargetTransformPass::AddIoCopyInst( ...@@ -143,7 +144,7 @@ void TypeTargetTransformPass::AddIoCopyInst(
if (TargetCompatibleTo(*in_arg_ty, from) && if (TargetCompatibleTo(*in_arg_ty, from) &&
PrecisionCompatibleTo(*in_arg_ty, from) && PrecisionCompatibleTo(*in_arg_ty, from) &&
DeviceCompatibleTo(*in_arg_ty, from) && DeviceCompatibleTo(*in_arg_ty, from) &&
out_arg_ty->target() == to.target()) { TargetCompatibleTo(*out_arg_ty, to)) {
VLOG(4) << "do nothing. opencl found"; VLOG(4) << "do nothing. opencl found";
#else #else
if (TypeCompatible(*in_arg_ty, from) && if (TypeCompatible(*in_arg_ty, from) &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册