未验证 提交 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, ...@@ -33,9 +33,8 @@ void TraceKernel(const Context& ctx,
auto stream = ctx.stream(); auto stream = ctx.stream();
std::vector<int> reduce_dims; std::vector<int> reduce_dims;
reduce_dims.push_back(out->dims().size()); reduce_dims.push_back(out->dims().size());
kernels:: kernels::TensorReduceImpl<T, T, kps::AddFunctor, kps::IdentityFunctor<T>>(
TensorReduceFunctorImpl<T, T, kps::AddFunctor, kps::IdentityFunctor<T>>( ctx, diag, out, kps::IdentityFunctor<T>(), reduce_dims, stream);
ctx, diag, out, kps::IdentityFunctor<T>(), reduce_dims, stream);
} else { } else {
paddle::operators::math::SetConstant<Context, T> functor; paddle::operators::math::SetConstant<Context, T> functor;
functor(ctx, out, static_cast<T>(0)); functor(ctx, out, static_cast<T>(0));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册