Skip to content

webgpu: remove if-else block of getGlobalIndex #5594

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xhcao
Copy link
Contributor

@xhcao xhcao commented Sep 8, 2021

There is a little performance loss for if-else block when calling
shader getGlobalIndex function at high frequency, so remove if-else
block.

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


This change is Reviewable

@google-cla google-cla bot added the cla: yes label Sep 8, 2021
There is a little performance loss for if-else block when calling
shader getGlobalIndex function at high frequency, so remove if-else
block.
@xhcao
Copy link
Contributor Author

xhcao commented Sep 9, 2021

@qjia7 @haoyunfeix @axinging @gyagp, please take a look, thank you.

@xhcao
Copy link
Contributor Author

xhcao commented Sep 16, 2021

I had run some models on different platforms, Intel TGL and CFL, AMD RX6900XT, no evident performance loses for the if-else block, so I don't want to upstream this patch. Do you have any comments about it?

@rthadur rthadur requested a review from ahmedsabie September 16, 2021 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant