-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[Phi] Migrate cholesky_solve op to phi #40387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Phi] Migrate cholesky_solve op to phi #40387
Conversation
Thanks for your contribution! |
f975cc1
to
76ef141
Compare
76ef141
to
818d144
Compare
818d144
to
f83f084
Compare
f83f084
to
8d378b7
Compare
8d378b7
to
9f4fa87
Compare
phi::funcs::ForRange<Context> out_for_range(dev_ctx, out->numel()); | ||
phi::funcs::ConjFunctor<T> out_functor( | ||
out->data<T>(), out->numel(), out->data<T>()); | ||
out_for_range(out_functor); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里可以直接调用phi::ConjKernel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改
#include "paddle/phi/kernels/transpose_kernel.h" | ||
|
||
// See Note [ Why still include the fluid headers? ] | ||
#include "paddle/fluid/operators/tril_triu_op.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#40007 这个PR 将会删除这个头文件了,你看下如何解冲突?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个CI要过了,那个需要重新push,先合这个吧避免delay进度
DenseTensor out_conj; | ||
out_conj.Resize(out.dims()); | ||
phi::funcs::ForRange<Context> out_for_range(dev_ctx, out.numel()); | ||
phi::funcs::ConjFunctor<T> out_functor( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以用phi::ConjKernel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
共轭均已修改
commonterm.data<T>(), | ||
commonterm.numel(), | ||
dev_ctx.template Alloc<T>(&commonterm_conj)); | ||
commonterm_for_range(commonterm_functor); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
const auto H = y_bst_dims_vec[y_bst_ndim - 2]; | ||
const auto W = y_bst_dims_vec[y_bst_ndim - 1]; | ||
phi::funcs::ForRange<Context> y_for_range(dev_ctx, dy_bst.numel()); | ||
paddle::operators::TrilTriuCompute<T> tril_triu_functor( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TrilTriu 也正在迁移,看下如何避免冲突
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
看下谁先过CI吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个op添加了benchmark脚本了吗
已经合入了 |
9f4fa87
to
4af01b1
Compare
4af01b1
to
8c223cd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR types
Function optimization
PR changes
OPs
Describe
[Phi] migrate cholesky_solve op to phi.