Skip to content
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

【PaddlePaddle Hackathon 4 No.231】为TVM PaddlePaddle前端完善 dropout/gelu/hard_sigmoid/pixel_shuffle 算子支持程度 #511

Merged
merged 1 commit into from
Apr 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions rfcs/TVM/20230410_paddle2tvm_design_fix_ops1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
## 方案名称
为TVM PaddlePaddle前端完善 dropout/gelu/hard_sigmoid/pixel_shuffle 算子支持程度设计文档

| API名称 | dropout/gelu/hard_sigmoid/pixel_shuffle |
|---|---|
|提交作者<input type="checkbox" class="rowselector hidden"> | MayYouBeProsperous |
|提交时间<input type="checkbox" class="rowselector hidden"> | 2023-04-10 |
|版本号 | V1.0 |
|依赖CINN版本<input type="checkbox" class="rowselector hidden"> | develop |
|文件名 | 20230410_paddle2tvm_design_fix_ops1.md<br> |

# 方案描述
为TVM PaddlePaddle前端完善 dropout/gelu/hard_sigmoid/pixel_shuffle 算子支持程度,并完善算子测试。


# 方案流程

**1. dropout算子**

完善 dropout 算子的丢弃概率参数支持。

[Paddle的 dropout 文档](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/dropout_cn.html#dropout)

**2. gelu**

完善 gelu 算子的 approximate 参数支持。

[Paddle的 gelu 算子文档](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/gelu_cn.html#gelu)

**3. hard_sigmoid 算子**

完善 hard_sigmoid 算子的 offset 参数支持。

[Paddle的 hard_sigmoid 算子文档](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/hardsigmoid_cn.html#hardsigmoid)

**4. pixel_shuffle 算子**

完善 pixel_shuffle 算子的 data_format 参数("NCHW"或"NHWC")支持。

[Paddle的 roi_align 算子文档](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/pixel_shuffle_cn.html#pixel-shuffle)

# 方案运行效果
参考[单测代码](https://github.com/apache/tvm/blob/main/tests/python/frontend/paddlepaddle/test_forward.py),设计并通过各个算子的单测。


# 项目提交时间计划
4月10日 ~ 4月15日完成算子适配

4月16日 ~ 4月20日完成算子适配的单测