jitify icon indicating copy to clipboard operation
jitify copied to clipboard

Is it possible to create program from cuBin or PTX?

Open FdyCN opened this issue 3 years ago • 3 comments

Hi guys, i used jitify.hpp in my project, and it works just fine. However, i still have a question: according to this: https://github.com/NVIDIA/jitify/blob/b22bf7d1dce113c8f67d195c7e6e497858b6fdb8/jitify.hpp#L3507 seems it's no way to create progtam from cuBin or PTX? or how can i create a CUFunction by giving cuBin or PTX? Thank you very much!

FdyCN avatar Jul 13 '22 03:07 FdyCN

In the jitify2 API (under development) you can do this: https://github.com/NVIDIA/jitify/blob/ca7f794/jitify2.hpp#L2153

benbarsdell avatar Jul 13 '22 04:07 benbarsdell

In the jitify2 API (under development) you can do this: https://github.com/NVIDIA/jitify/blob/ca7f794/jitify2.hpp#L2153

@benbarsdell Thx a lot, glad to hear that. i reviewed this branch. and is this tool necessary? https://github.com/NVIDIA/jitify/blob/jitify2/jitify2_preprocess.cpp Must i use this tool to pre-build or pre-compiling obj when i have some headers dependencies in my kernel source?Can cuBin( PTX ) carry these dependencies( it can be regard as another kind of pre-build)?

I appreciate and wait for jitify2 : )

FdyCN avatar Jul 13 '22 07:07 FdyCN

Sorry I missed this. You don't have to use jitify2_preprocess, other workflows are possible. If you are starting from ptx/cubin, you can create a CompiledProgramData object directly from ptx or cubin and then just link and execute it.

benbarsdell avatar May 21 '23 00:05 benbarsdell