Parla.py icon indicating copy to clipboard operation
Parla.py copied to clipboard

More Robust PID Faking in VECs

Open insertinterestingnamehere opened this issue 4 years ago • 2 comments

In order to load CUDA into a VEC, we added support for faking the PID. (CUDA picks a port to use based off the current PID, so we can't load multiple copies of it without faking the PID). Currently we just make up a PID and hope for the best. It'd be nice if we could make this infrastructure more robust. For example, we could launch a separate empty process for each and then associate it's PID as the fake to use within a VEC. There probably are other options as well.

We should probably ask the CUDA developers to fix things on their end, but I doubt we'll see any sort of quick response there (if any at all). Given that they break ABI with CUDA so frequently, being able to load it into a linker namespace seems like a reasonable ask.

I don't think an empty process is a good idea. The problem is that /proc/<pid> would be total lies at that point. What about using the thread ID of a empty thread? I think threads are in the same "ID space" as processes on LInux still. Though I could be wrong.

arthurp avatar May 11 '21 19:05 arthurp