mc-imperial / gpuverify

GPUVerify: a Verifier for GPU Kernels
http://multicore.doc.ic.ac.uk/tools/GPUVerify/
Other
58 stars 15 forks source link

Adding support for CUDA Cooperative Groups API #38

Closed cs17resch01003 closed 3 years ago

cs17resch01003 commented 3 years ago

As a part of our work (@cs17resch01003 and @sbjoshi) on GPURepair (https://arxiv.org/abs/2011.08373), we have extended Bugle and GPUVerify to support the CUDA Cooperative Groups API (https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#cooperative-groups). This pull request depends on https://github.com/mc-imperial/bugle/pull/8. There are two changes in this pull request:

  1. We have changed the access modifiers of the GPUVerifyErrorReporter class and some methods in it so that it can be extended in GPURepair
  2. To support grid-level synchronization, we have added code to GPUVerify such that the shared variables can be havoced without checking if the threads belong to the same group. We have included comments wherever we have made a code change, please take a look

We have tried to maintain the same code formatting as that of the existing code. Please let us know if any changes are needed or if there are any questions.

One thing we noticed is that the Travis build configuration checks out the code for libclc from version bac1578088e of https://git.llvm.org/git/libclc.git/ which doesn't exist anymore. For GPURepair, we are using https://github.com/llvm/llvm-project/tree/release/8.x/libclc which we believe is the closest to the checked-out version. With that change one of the test cases (OpenCL/pointeranalysistests/manyprocedures) is failing. GPUverify is able to identify null pointer accesses and write-write races for this kernel. This test case is failing even without our code changes. Attaching the output from GPUVerify. Please let us know if any further investigation is needed from our side.

jeroenk commented 3 years ago

Hi @cs17resch01003

Thanks for your merge request. We're committed from our side to get this merged, but both @afd and I are quite busy at the moment, so things might move a bit slowly. Our apologies for this in advance.

To start, two requests:

Thanks,

Jeroen

cs17resch01003 commented 3 years ago

Thank you for the reply. I will make the required changes and raise new pull requests. @sbjoshi