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

[WIP] Add support to generic address space #994

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

omarahmed1111
Copy link
Contributor

@omarahmed1111 omarahmed1111 commented Dec 30, 2022

PR changes

  • Add "TransformGenericVolatileMemoryAccess" which will replace volatile from loads and stores on generic pointers. It does that so that "mem2reg" and "InferAddressSpace" passes could get rid of generic pointers. Volatile information was not used currently in SPIRVProducerPass so it should be safe to remove it at the moment.
  • Add support for ""to_local", "to_global", "to_private" builtins.
  • Add support for AddrspaceCast instruction handling inside "LongVectorLoweringPass".
  • Handle global variables (partially done).

Global Variables Handling

  • The current approach is to handle global variables with module constants by combining both of them in one buffer. If this direction was taken, it will need more handling to cases where we have module constants and global variables in the same opencl kernels. (There is a TODO for that inside the code)
  • The existing code for that feature is experimental and need to be refactored and may break module constants but as a proof of concept for adding this feature.
  • There is an alternative more concrete and suggested approach which is to add a new buffer for global variables different from module constants buffer.

NOTE: The current status of this PR may cause regressions on some CTS tests.

This contribution is being made by Codeplay on behalf of Samsung.

@omarahmed1111 omarahmed1111 changed the title Add support to generic address space [WIP] Add support to generic address space Jan 4, 2023
@rjodinchr
Copy link
Collaborator

@omarahmed1111 , if it's okay with you, I'll take over the support of generic pointers.

This PR seems to be a mix of generic pointer and program scope global variables. I will only focus on generic pointers for now.

rjodinchr added a commit to rjodinchr/clspv that referenced this pull request Apr 18, 2023
This is taking over some work from google#994
Fixes google#1077
rjodinchr added a commit to rjodinchr/clspv that referenced this pull request Apr 18, 2023
This is taking over some work from google#994
Fixes google#1077
alan-baker pushed a commit that referenced this pull request Apr 19, 2023
This is taking over some work from #994
Fixes #1077

* cl3.0 only uses generic addrspace if feature is enabled
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