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

Add triu op #5329

Merged
merged 24 commits into from
Jul 1, 2021
Merged

Add triu op #5329

merged 24 commits into from
Jul 1, 2021

Conversation

MARD1NO
Copy link
Contributor

@MARD1NO MARD1NO commented Jun 28, 2021

这里顺便记录下guoran的warpprocess kernel的思路(感谢guoran)

首先这个kernel就是拿一个warp去处理一行元素

warp_id: 表示当前线程属于第几个warp
lan_id:表示在这个warp内,第几个线程
num_warp: warp数量

首先

row = i % num_rows; //得到当前第几行
for ...{
    idx = i *num_cols + col; // i代表是warp_id,由于一个warp处理一行,所以i*num_cols等于前面处理过的元素,然后+col表示当前的元素index
    ....
}

doctest运行示例

image

暴力单测

image

tensor接口测试

image

文档示例

image

@MARD1NO MARD1NO marked this pull request as ready for review June 29, 2021 06:36
@MARD1NO MARD1NO requested a review from oneflow-ci-bot June 29, 2021 06:46
@oneflow-ci-bot oneflow-ci-bot removed their request for review June 29, 2021 06:48
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot June 29, 2021 06:48
@oneflow-ci-bot oneflow-ci-bot self-requested a review June 29, 2021 07:52
@oneflow-ci-bot oneflow-ci-bot self-requested a review June 29, 2021 17:25
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot June 29, 2021 18:27
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot June 29, 2021 20:57
@oneflow-ci-bot oneflow-ci-bot self-requested a review June 30, 2021 01:16
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot June 30, 2021 03:42
@oneflow-ci-bot oneflow-ci-bot self-requested a review June 30, 2021 06:10
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot June 30, 2021 07:59
@oneflow-ci-bot oneflow-ci-bot removed their request for review June 30, 2021 09:09
@MARD1NO MARD1NO requested a review from oneflow-ci-bot July 1, 2021 02:10
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot July 1, 2021 06:31
@oneflow-ci-bot oneflow-ci-bot merged commit 976e71f into master Jul 1, 2021
@oneflow-ci-bot oneflow-ci-bot deleted the dev_triu_module branch July 1, 2021 08:26
@zzk0 zzk0 mentioned this pull request Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants