Skip to content

Commit

Permalink
fix compile bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
YuanRisheng committed Jan 21, 2022
1 parent 5aca6fb commit 794e60f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions paddle/pten/api/include/kernel_signature.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ using sum_kernel = void (*)(const DeviceContext&,
const DenseTensor&,
const std::vector<int64_t>&,
bool,
DataType,
DenseTensor*);

using subtract_kernel = void (*)(const DeviceContext&,
Expand Down
6 changes: 6 additions & 0 deletions paddle/pten/core/kernel_alias_name.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ namespace pten {
// the key is kernel_name in fluid, the value is the kernel_name in pten
// the key is sorted by key's alphabet
const std::unordered_map<std::string, std::string> kernel_alias_name_map = {
{"elementwise_add", "add_raw"},
{"elementwise_div", "divide_raw"},
{"elementwise_mul", "muliply_raw"},
{"elementwise_sub", "subtract_raw"},
{"fill_any_like", "full_like"},
{"fill_constant", "full"},
{"flatten_contiguous_range", "flatten"},
Expand All @@ -28,6 +32,8 @@ const std::unordered_map<std::string, std::string> kernel_alias_name_map = {
{"matmul_v2_grad", "matmul_grad"},
{"matmul_v2_grad_grad", "matmul_double_grad"},
{"matmul_v2_triple_grad", "matmul_triple_grad"},
{"reduce_mean", "mean_raw"},
{"reduce_sum", "sum_raw"},
{"reshape2", "reshape"},
{"reshape2_grad", "reshape_grad"},
{"reshape2_grad_grad", "reshape_double_grad"},
Expand Down

0 comments on commit 794e60f

Please sign in to comment.