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

[GPU] Add barriers when resolving GPUMappedForall to fix race condition #19635

Merged

Conversation

nirvedhmeshram
Copy link
Contributor

@nirvedhmeshram nirvedhmeshram commented Jan 8, 2025

The barriers added here can be pessimistic and we can look into optimizing them at a later point if needed. However, we end up with a race if we dont have them.
In some local testing I did on a MI300 GPU, I did not find any significant performance impact by these barriers. For example an unaligned matmul + elementwise took 47us and 48us with and without the barriers respectively with TileAndFuse with padding support and the corresponding default path takes 68us. The prefill stage of ToyLLAMA took 325us and 324us respectively with and without barriers while the default path takes 461us.

@nirvedhmeshram nirvedhmeshram merged commit c484058 into iree-org:main Jan 8, 2025
33 checks passed
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.

2 participants