Skip to content

Improvements to GPU grammars + new benchmark#539

Merged
hernanponcedeleon merged 21 commits intodevelopmentfrom
barrier
Oct 23, 2023
Merged

Improvements to GPU grammars + new benchmark#539
hernanponcedeleon merged 21 commits intodevelopmentfrom
barrier

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 <hernanl.leon@huawei.com>
Signed-off-by: Hernan Ponce de Leon <hernanl.leon@huawei.com>
Signed-off-by: Hernan Ponce de Leon <hernanl.leon@huawei.com>
Signed-off-by: Hernan Ponce de Leon <hernanl.leon@huawei.com>
Signed-off-by: Hernan Ponce de Leon <hernanl.leon@huawei.com>
Signed-off-by: Hernan Ponce de Leon <hernanl.leon@huawei.com>
Signed-off-by: Hernan Ponce de Leon <hernanl.leon@huawei.com>
Signed-off-by: Hernan Ponce de Leon <hernanl.leon@huawei.com>
Signed-off-by: Hernan Ponce de Leon <hernanl.leon@huawei.com>
Signed-off-by: Hernan Ponce de Leon <hernanl.leon@huawei.com>
Signed-off-by: Hernan Ponce de Leon <hernanl.leon@huawei.com>
Signed-off-by: Hernan Ponce de Leon <hernanl.leon@huawei.com>
Signed-off-by: Hernan Ponce de Leon <hernanl.leon@huawei.com>
@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 <hernanl.leon@huawei.com>
Signed-off-by: Hernan Ponce de Leon <hernanl.leon@huawei.com>
@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.

Signed-off-by: Hernan Ponce de Leon <hernanl.leon@huawei.com>
Signed-off-by: Hernan Ponce de Leon <hernanl.leon@huawei.com>
Signed-off-by: Hernan Ponce de Leon <hernanl.leon@huawei.com>
@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 <hernanl.leon@huawei.com>
@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?

Signed-off-by: Hernan Ponce de Leon <hernanl.leon@huawei.com>
Signed-off-by: Hernan Ponce de Leon <hernanl.leon@huawei.com>
@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