yaxunl added a comment.

Actually there is one issue with this approach.

HIP have API's to launch kernels, which accept kernel as function pointer 
argument. Currently when taking address of kernel, we get the stub function. 
These kernel launching API's will not work if we use kernel symbol to register 
the kernel. A solution is to return the kernel symbol instead of stub function 
when taking address of the kernel in host compilation, i.e. if a function 
pointer is assigned to a kernel in host code, it gets the kernel symbol instead 
of the stub function. This will make the kernel launching API work.

To keep the triple chevron working, the kernel symbol will be initialized with 
the address of the stub function. For triple chevron call, the address of the 
stub function is loaded from the kernel symbol and invoked.


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

https://reviews.llvm.org/D86376

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

Reply via email to