Skip to content

Commit

Permalink
update frontend related desc
Browse files Browse the repository at this point in the history
  • Loading branch information
SigureMo committed Aug 4, 2022
1 parent 5ea8a7f commit b971b01
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions rfcs/CINN/APIs/20220802_cinn_api_design_one_hot.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# CINN one_hot 设计文档

| API 名称 | 新增 API 名称 |
| API 名称 | one_hot |
| -------------- | ----------------------------------- |
| 提交作者 | Nyakku Shigure(@SigureMo|
| 提交时间 | 2022-08-02 |
| 版本号 | v0.2 |
| 版本号 | v0.3 |
| 依赖 CINN 版本 | develop |
| 文件名 | 20220802_cinn_api_design_one_hot.md |

Expand Down Expand Up @@ -401,8 +401,8 @@ ir::Tensor OneHot(const ir::Tensor& indices,
API 设计如下:
```cpp
// cinn/frontend/base_builder.h
class BaseBuilder {
// cinn/frontend/net_builder.h
class NetBuilder {
Variable OneHot(const Variable& indices,
const Variable& on_value,
const Variable& off_value,
Expand Down Expand Up @@ -440,7 +440,7 @@ res = builder.one_hot(indices, on_value, off_value, depth=3, axis=-1, dtype="flo
具体规划为:

- 编写 Compute、InferShape、InferDtype、Strategy,并注册算子
- 向前端 BaseBuilder 添加该 API
- 向前端 NetBuilder 添加该 API
- 向前端 Paddle 添加该算子
- 该算子单测

Expand Down

0 comments on commit b971b01

Please sign in to comment.