[PATCH] [NVPTX] noop when kernel pointers are already global

Justin Holewinski jholewinski at nvidia.com
Tue Jun 30 09:37:56 PDT 2015


Agreed.  Jingyue, did you want to make this a part of your patch?

> On Jun 30, 2015, at 12:30 PM, Tobias Grosser <tobias at grosser.es> wrote:
> 
> On 06/30/2015 06:26 PM, Justin Holewinski wrote:
>> Hi Tobias,
>> 
>> One thing to keep in mind is that the CUDA interface expects kernel parameters to be in the generic address space.  If you write kernels that pass arguments as global memory pointers, you are technically violating the contract between host and device.  Now, this just so happens to work since the global->generic and generic->global pointer conversions are no-ops, but as far as I know this is not actually guaranteed and may not be true in the future.
> 
> Interesting. Then maybe the right solution is not to allow this, but rather to give a proper error message in the backend (instead of just crashing)?
> 
> Tobias

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------




More information about the llvm-commits mailing list