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

Improvements to GPU grammars + new benchmark #539

Merged
merged 21 commits into from
Oct 23, 2023
Merged

Conversation

hernanponcedeleon
Copy link
Owner

This PR makes a few improvements to the grammars of PTX and Vulkan and adds a new benchmark for a synchronization barrier which forces threads to wait until all of them reached the barrier.

The benchmark shows that PTX can be stronger than Vulkan in the sense that we can achieve correctness with relaxed operations while Vulkan requires release-acquire.

Signed-off-by: Hernan Ponce de Leon <[email protected]>
Signed-off-by: Hernan Ponce de Leon <[email protected]>
Signed-off-by: Hernan Ponce de Leon <[email protected]>
Signed-off-by: Hernan Ponce de Leon <[email protected]>
Signed-off-by: Hernan Ponce de Leon <[email protected]>
Signed-off-by: Hernan Ponce de Leon <[email protected]>
Signed-off-by: Hernan Ponce de Leon <[email protected]>
Signed-off-by: Hernan Ponce de Leon <[email protected]>
Signed-off-by: Hernan Ponce de Leon <[email protected]>
Signed-off-by: Hernan Ponce de Leon <[email protected]>
Signed-off-by: Hernan Ponce de Leon <[email protected]>
Signed-off-by: Hernan Ponce de Leon <[email protected]>
Signed-off-by: Hernan Ponce de Leon <[email protected]>
@ThomasHaas
Copy link
Collaborator

I was always confused by the distinction made when parsing operations over constants vs. over registers. I thought it was related to semantics differences, but I guess the grammar was just inadequate.

I'm not going to try to wrap my head around the litmus tests, but the remaining code changes seem straightforward (and good :)), so I will approve.

Signed-off-by: Hernan Ponce de Leon <[email protected]>
Signed-off-by: Hernan Ponce de Leon <[email protected]>
@hernanponcedeleon
Copy link
Owner Author

I was always confused by the distinction made when parsing operations over constants vs. over registers. I thought it was related to semantics differences, but I guess the grammar was just inadequate.

It used to be like that due to the modeling of the constant proxy. But this has changed in #531.

@hernanponcedeleon
Copy link
Owner Author

I found a bug in the PTX v7.5 model (the bug comes from the alloy model).
Similart to v6.0. the definition of cause should be let cause = cause-base | (observation?; ...) as stated in the documentation.

@tonghaining can you please translate the test MP-cause-base to the alloy format and open a PR in their repo with a fix to the model and the test?

Signed-off-by: Hernan Ponce de Leon <[email protected]>
@ThomasHaas
Copy link
Collaborator

Your two changes to let cause = ... ended up giving the original model. I guess the Alloy model was correct then, and you misread the documentation?

@hernanponcedeleon
Copy link
Owner Author

I was getting some different results between v6.0 and v7.5 (maybe I built from the wrong branch) due to the control barriers. This made me take a look to where those were used in the cat file and I noticed the union was missing, but I did not noticed the use of ? which was actually making the relation be semantically equivalent.

@hernanponcedeleon hernanponcedeleon merged commit a0ce1fb into development Oct 23, 2023
@hernanponcedeleon hernanponcedeleon deleted the barrier branch October 23, 2023 19:58
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.

4 participants