Skip to content

Conversation

@zyfncg
Copy link
Contributor

@zyfncg zyfncg commented Feb 10, 2022

PR types

Others

PR changes

Others

Describe

新增Full算子SelectedRows类型的Kernel

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

#include "paddle/pten/kernels/full_kernel.h"

#include "paddle/pten/backends/cpu/cpu_context.h"
#include "paddle/pten/backends/gpu/gpu_context.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里引用gpu_context.h 头文件,是否需要加 #if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) 宏判断?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里可以不加宏应该也没有影响,严谨一些这里先加上宏判断,后面再看情况是否保留

paddle::platform::float16,
paddle::platform::bfloat16,
paddle::platform::complex<float>,
paddle::platform::complex<double>) {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里改为pten::dtype的 namespace?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. thx~

bool,
paddle::platform::float16,
paddle::platform::complex<float>,
paddle::platform::complex<double>) {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. thx~

YuanRisheng
YuanRisheng previously approved these changes Feb 17, 2022
Comment on lines +71 to +72
const auto& str_value =
paddle::any_cast<std::string>(ctx.Attr("str_value"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个有用到吗

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

有用到,case比较特殊

@zyfncg zyfncg merged commit 79f8eec into PaddlePaddle:develop Feb 19, 2022
@zyfncg zyfncg deleted the fill_constant_sr branch February 19, 2022 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants