ABataev added a comment.

In D99350#2894305 <https://reviews.llvm.org/D99350#2894305>, @jdoerfert wrote:

> I don't understand why the cast makes ptxas happy, can you include a test in 
> the runtime so we can make sure that stays that way and is not some ptxas 
> artifact. After all, we still point to a shared memory symbol from global 
> memory which doesn't make too much sense.

Here is the related info 
https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#initializers. 
Take a look at the Examples:

        .const  .u32 foo = 42;
  ...
        .global .u32 p2 = generic(foo); // generic address of foo

After the patch, we have this:

  .shared .align 4 .u32 _ZL1X;
  .global .align 8 .u64 __ZL1X$ref = generic(_ZL1X);

which is similar to the example.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99350/new/

https://reviews.llvm.org/D99350

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to