how hook libcuda work
X-XG opened this issue · 1 comments
X-XG commented
After run "./build.sh -t Release -s ON -b OFF", I use "ldd" then find there is libcudart but no libcuda. In fact, hook libcuda is real work, how is this done when the libcuda not dynamic load in runtime. I find the related problem in stack overflow https://stackoverflow.com/questions/49971717/hooking-into-cuda-driver-api-calls
Bruce-Lee-LY commented
Here are a few things you need to make sure:
- LD_PRELOAD does work.
- CUDA Driver API is called in the program.
- CUDA libraries do not call the CUDA Driver API using dlsym.
A better solution is to use the CUDA Driver API to write code.