You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 27, 2021. It is now read-only.
This PR changes how we work with and store address-space pointers: instead of casting them to and from generic pointers, directly work with their in-address space representation. That means we don't have to addrspacecast anymore, just inttoptr ... addrspace(...)* directly.
For WMMA, this requires 1.5's Base.AddrSpacePtr, because otherwise we select intrinsics for the generic case which leads to illegal memory accesses (cc @thomasfaingnaert).
Will this completely eliminate all addrspacecasts in kernels? LLVM doesn't seem to handle them too well. In particular, I've noticed issues with the LSV and SeparateConstOffsetFromGEP passes.
For vectorisation in #629, I use the CUDA C++ approach of casting to float4* before loading/storing, which I'm not a big fan of. I suspect that, with this change, I can just call unsafe_load and unsafe_store! directly, so long as I use the correct alignment. The LSV pass will then handle the rest.
(Also, since AddrSpacePtr was backported to 1.4.1, the WMMA tests should still pass for non-debug 1.4.1 I believe, so 1.5 is too strict a requirement)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR changes how we work with and store address-space pointers: instead of casting them to and from generic pointers, directly work with their in-address space representation. That means we don't have to
addrspacecastanymore, justinttoptr ... addrspace(...)*directly.For WMMA, this requires 1.5's Base.AddrSpacePtr, because otherwise we select intrinsics for the generic case which leads to illegal memory accesses (cc @thomasfaingnaert).
Fixes #641.