-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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] move argsort to phi #40151
[phi] move argsort to phi #40151
Conversation
Thanks for your contribution! |
output->share_dims(input); | ||
indices->share_dims(input); | ||
output->share_lod(input); | ||
indices->share_lod(input); |
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.
output 和indices 还需要设置一下dtype
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,thx
output->share_dims(input); | ||
indices->share_dims(input); | ||
output->share_lod(input); | ||
indices->share_lod(input); |
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.
dtype也设置一下
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,thx
DenseTensor tmp_out; | ||
tmp_out.Resize(trans_dims); | ||
T* t_out = dev_ctx.template Alloc<T>(&tmp_out); | ||
dev_ctx.template Alloc<T>(output); |
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,thx
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
move argsort to phi