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

Ast opencl fixes #771

Merged
merged 34 commits into from
Sep 26, 2022
Merged

Ast opencl fixes #771

merged 34 commits into from
Sep 26, 2022

Conversation

sakehl
Copy link
Contributor

@sakehl sakehl commented Sep 5, 2022

Mainly added support for rewriting nested foralls, which are automatically generated by GPU kernels and par blocks.
This is done in the pass SimplifyNestedQuantifiers.scala.

This pass relies on ExpressionEqualityCheck.scala, to compare expressions on equality, whilst getting information like require blockSize == 32 from annotations.

There are some changes in how a GPU kernel is encoded (LangCToCol.scala) and how par blocks are encoded (ParBlockEncoder.scala), to make sure that par blocks and GPU kernels require to have at least one thread running (therefor, we don't have to account for "void" runs of GPU kernels). Which was needed to gather information, which is needed in the expressions equality check, which was used in the simplified nested foralls.

Missing are some examples and unit tests still.

Also a lot of other minor changes are present:

  • added bool type to opencl and cuda headerse
  • After quantifiers are rewritten in simplify relations, to original name is kept (or at least we try to)
  • C arrays and variables will keep their internal name
  • Some things I probably forgot I changed.

@sakehl sakehl temporarily deployed to Default September 5, 2022 13:51 Inactive
@sakehl sakehl temporarily deployed to Default September 5, 2022 13:51 Inactive
@sakehl sakehl temporarily deployed to Default September 5, 2022 13:51 Inactive
@sakehl sakehl temporarily deployed to Default September 5, 2022 13:51 Inactive
@sakehl sakehl temporarily deployed to Default September 5, 2022 13:51 Inactive
@sakehl sakehl temporarily deployed to Default September 5, 2022 13:51 Inactive
@sakehl sakehl temporarily deployed to Default September 5, 2022 13:51 Inactive
@sakehl sakehl temporarily deployed to Default September 5, 2022 13:51 Inactive
@sakehl sakehl temporarily deployed to Default September 5, 2022 13:51 Inactive
@sakehl sakehl temporarily deployed to Default September 5, 2022 13:51 Inactive
Copy link
Member

@pieter-bos pieter-bos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's taking me a bit longer than expected to review everything, so here is a partial review so it doesn't come late in one batch :)

parsers/src/main/java/vct/parsers/transform/CToCol.scala Outdated Show resolved Hide resolved
src/main/java/vct/col/newrewrite/lang/LangCToCol.scala Outdated Show resolved Hide resolved
src/main/java/vct/col/newrewrite/lang/LangCToCol.scala Outdated Show resolved Hide resolved
src/main/java/vct/col/newrewrite/lang/LangCToCol.scala Outdated Show resolved Hide resolved
src/main/java/vct/col/newrewrite/lang/LangCToCol.scala Outdated Show resolved Hide resolved
src/main/java/vct/col/newrewrite/ApplyTermRewriter.scala Outdated Show resolved Hide resolved
src/main/java/vct/col/newrewrite/ParBlockEncoder.scala Outdated Show resolved Hide resolved
src/main/java/vct/col/newrewrite/ParBlockEncoder.scala Outdated Show resolved Hide resolved
src/main/java/vct/col/newrewrite/ParBlockEncoder.scala Outdated Show resolved Hide resolved
src/main/java/vct/col/newrewrite/ParBlockEncoder.scala Outdated Show resolved Hide resolved
@sakehl
Copy link
Contributor Author

sakehl commented Sep 20, 2022

It's taking me a bit longer than expected to review everything, so here is a partial review so it doesn't come late in one batch :)

I fixed the changes you suggested. Only 2 things remain open, see above. Also added barriers with memory fences

col/src/main/java/vct/col/resolve/C.scala Outdated Show resolved Hide resolved
parsers/src/main/java/vct/parsers/ColCParser.scala Outdated Show resolved Hide resolved
@pieter-bos pieter-bos temporarily deployed to Default September 26, 2022 13:48 Inactive
@pieter-bos pieter-bos temporarily deployed to Default September 26, 2022 13:48 Inactive
@pieter-bos pieter-bos temporarily deployed to Default September 26, 2022 13:48 Inactive
@pieter-bos pieter-bos merged commit a2824bd into utwente-fmt:ast Sep 26, 2022
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