未验证 提交 87f4a681 编写于 作者: H hong 提交者: GitHub

Fix trace conflict (#39421)

* add trace op

* bug fix

* bug fix; test=develop

* thrust bug fix; test=develop

* remove useless register; test=develop

* fix bug; test=develop

* update trace kernel; test=develop

* move kernel args to trace_sig; test=develop

* try to fix trace kernel conflict; test=develop
上级 8e1b0204
......@@ -33,9 +33,8 @@ void TraceKernel(const Context& ctx,
auto stream = ctx.stream();
std::vector<int> reduce_dims;
reduce_dims.push_back(out->dims().size());
kernels::
TensorReduceFunctorImpl<T, T, kps::AddFunctor, kps::IdentityFunctor<T>>(
ctx, diag, out, kps::IdentityFunctor<T>(), reduce_dims, stream);
kernels::TensorReduceImpl<T, T, kps::AddFunctor, kps::IdentityFunctor<T>>(
ctx, diag, out, kps::IdentityFunctor<T>(), reduce_dims, stream);
} else {
paddle::operators::math::SetConstant<Context, T> functor;
functor(ctx, out, static_cast<T>(0));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册