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

webgpu: Add non-shared argminmax program #6778

Merged
merged 3 commits into from
Aug 23, 2022
Merged

Conversation

qjia7
Copy link
Contributor

@qjia7 qjia7 commented Aug 22, 2022

The perf of ArgMax[1, 1025, 2049, 19] in cityscapes architecture in
DeepLabV3 is very poor. With this changes, this op becomes 6.3ms from
22.36ms.

To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.


This change is Reviewable

The perf of ArgMax[1, 1025, 2049, 19] in cityscapes architecture in
DeepLabV3 is very poor. With this changes, this op becomes 6.3ms from
22.36ms.
@qjia7 qjia7 requested review from Linchenn and xhcao August 23, 2022 01:47
Copy link
Collaborator

@Linchenn Linchenn left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@xhcao xhcao left a comment

Choose a reason for hiding this comment

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

LGTM

@qjia7 qjia7 merged commit 25cd4f4 into tensorflow:master Aug 23, 2022
@qjia7 qjia7 deleted the argminmax_opt branch August 23, 2022 02:36
qjia7 added a commit to qjia7/tfjs that referenced this pull request Jun 7, 2023
In PR tensorflow#6778, we ever added the pain argminmax shader to improve the perf
of ArgMax[1, 1025, 2049, 19]. However, we accidently added the output
size condition, which was not verified. This PR removes that condition
and only goes to pain argminmax when the reduce length is very small(<32).
With this change, ArgMax[1,513,513,151] becomes 7.19ms from 13.24ms in
DeepLabV3-ade20k on Intel ADL.
qjia7 added a commit to qjia7/tfjs that referenced this pull request Jun 7, 2023
In PR tensorflow#6778, I ever added the plain argminmax shader to improve the perf
of ArgMax[1, 1025, 2049, 19]. However, I accidently added the output
size condition, which was not verified. This PR removes that condition
and only goes to plain argminmax when the reduce length is very small(<32).
With this change, ArgMax[1,513,513,151] becomes 7.19ms from 13.24ms in
DeepLabV3-ade20k on Intel ADL.
gyagp pushed a commit that referenced this pull request Jun 8, 2023
* webgpu: Tighten the condition to go the plain argminmax

In PR #6778, I ever added the plain argminmax shader to improve the perf
of ArgMax[1, 1025, 2049, 19]. However, I accidently added the output
size condition, which was not verified. This PR removes that condition
and only goes to plain argminmax when the reduce length is very small(<32).
With this change, ArgMax[1,513,513,151] becomes 7.19ms from 13.24ms in
DeepLabV3-ade20k on Intel ADL.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants