Multiple ptx/cubin files merge and calls


I have two ptx files and I need to call functions from one file to another.
Currently, I can load a single ptx file (does not have any call to functions in different file) using driver api and run it (following the samples in cuda toolkit 5.5 - ptxjit).

I was thinking to merge two ptx files into a single cubin and then using CUDA driver API to run the final cubin. My problems:

  1. I could not find a way to merge two ptx files into a single cubin. Anyone knows how to do that?
  2. Is there an alternate way to load two ptx files and run them using the API?


Have you looked at the cuModule*() and cuLink*() functions?

Do you want to “merge” the PTX files primarily to avoid performing multiple module loads? Or are you actually trying to link the two files because there are dependencies?