[NVVM IR] NVVM IR frontend support for cuda core #906
abhilash1910
started this conversation in
Ideas
Replies: 1 comment
-
Thanks a lot, Abhilash! This is tracked in #452. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Abstract : The cuda/bindings backend of Cuda python has NVVM support through
libnvvm api
. However the frontend of cuda python does not support nvvm ir as input source. Since cuda python allows users to leverage a "pythonic dsl" format for writing the host code (taking care of launch parameters etc), it makes sense to also allow NVVM IR as an alternative input to the already included list of inputs{ptx, c++, lto ir}
etc.Technicalities : The integration seems straightforward as hooking the cuda core frontend with the already existing nvvm ir backend inside cuda bindings. However for the plugin for NVVM, the current proposal dumps only the NVVM IR compiled Program - i.e there is no symbolic linking or processing for downstream tasks. As NVVM currently flows through the PTX pathway, the current design does not add that module as it requires additional design decisions.
Current proposition flow :
Assuming a NVVM IR ASCII string as input as :
Extractions : Currently the proposal does not add anything which relates to the mapping of symbols and follows the existing PTX pathway. NVRTC pathway has a symbolic mapping like so:
Even in the case of PTX or LTO IR backend, users have to manually specify the symbolic linkages:
The current proposition for NVVM IR is same as that of the PTX counterpart, as eventually the NVVM IR boils down to PTX .
However it would be nice to have design which would bypass the ptx counterpart for symbolic execution.
There is a draft local PR which will be linked here for the addition.
Edit: #907
cc @leofang
Beta Was this translation helpful? Give feedback.
All reactions