-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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 flip op to phi kernel #39822
Conversation
Thanks for your contribution! |
paddle/phi/kernels/flip_kernel.h
Outdated
|
||
#include <vector> | ||
#include "paddle/phi/core/dense_tensor.h" | ||
#include "paddle/phi/core/device_context.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.
device_context这个头文件不加也可以,这里没用到
#include "paddle/fluid/platform/place.h" | ||
#include "paddle/phi/backends/gpu/gpu_context.h" | ||
#include "paddle/phi/core/kernel_registry.h" | ||
#include "paddle/phi/kernels/flip_kernel.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.
|
||
#include "paddle/fluid/memory/malloc.h" | ||
#include "paddle/fluid/memory/memcpy.h" | ||
#include "paddle/fluid/platform/place.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.
place这个建议换成phi的#include "paddle/phi/common/place.h"
const std::vector<int>& axis, | ||
DenseTensor* out) { | ||
const auto gplace = dev_ctx.GetPlace(); | ||
auto cplace = paddle::platform::CPUPlace(); |
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.
paddle::platform::CPUPlace();
建议用phi::CPUPlace
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.
@chenwhql thx 都已修改重跑 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.
LGTM
PR types
Others
PR changes
Others
Describe
迁移算子库