Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[RFC] Address space preserving bitcasts #9423
@maleadt worked towards supporting the CUDA/PTX backend in llvm in Julia. He presented his work in https://groups.google.com/forum/#!topic/julia-dev/doQUqQabC8A, because he will not be able to spend much time on it in the coming months.
I personally would like to see support for this in Julia and planned to work on something similar for the OpenCL/SPIR backend in llvm.
In order to integrate @maleadt work with upstream Julia I plan to submit PRs for separated concerns so that they can be properly discussed.
First up is address space preserving bitcasts.
@maleadt do you have time to explain shortly the rational behind this?
In PTX land pointers live in different address spaces, depending on the type of memory you want to address. This is quote important, because the behaviour of each address space is vastly different (for example, thread-shared memory).
Julia does not care about address spaces, and makes everything live in the default one (0). Worse, the global pointer type objects (
Note that this still lacks support for setting the address space of pointers from within Julia, which is a requirement to make this functionality useful. I was thinking of parameterizing the