Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to create program from cuBin or PTX? #106

Open
FdyCN opened this issue Jul 13, 2022 · 3 comments
Open

Is it possible to create program from cuBin or PTX? #106

FdyCN opened this issue Jul 13, 2022 · 3 comments

Comments

@FdyCN
Copy link

FdyCN commented Jul 13, 2022

Hi guys, i used jitify.hpp in my project, and it works just fine. However, i still have a question:
according to this:

jitify/jitify.hpp

Line 3507 in b22bf7d

inline Program program(std::string source,

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!

@benbarsdell
Copy link
Member

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

@FdyCN
Copy link
Author

FdyCN commented Jul 13, 2022

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 : )

@benbarsdell
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants