Hacker News new | ask | show | jobs
by dishsoap 681 days ago
For anyone curious about how this actually works, it looks like a library is injected into your process to hook these functions [1] in order to forward them to the service.

[1] https://pastebin.com/raw/kCYmXr5A

2 comments

How did you figure out these were hooked? I'm assuming some flag that tells ld/ldd to tell you when some symbol is rebound? Also I thought a symbol has to be a weak symbol to be rebound and assuming nvidia doesn't expose weak symbols (why would they) the implication is that their thing is basically LD_PRELOADed?
Yes. While I don't know what they do internally, API remoting has been used for GPUs since at least rCUDA - that's over 10 years ago.

LD_PRELOAD trick allows you to intercept and virtualize calls to the CUDA runtime.

Ah, I assumed/hoped they had some magic that would manage to forward a whole PCIe device.