forked from geohot/cuda_ioctl_sniffer
-
Notifications
You must be signed in to change notification settings - Fork 2
/
driver.sh
executable file
·17 lines (15 loc) · 929 Bytes
/
driver.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash -e
mkdir -p out
./make_sniff.sh
ptxas simple.ptx --gpu-name sm_86 -o out/simple.o # -O1 -v
cuobjdump out/simple.o -sass
clang++ gpu_driver.cc tc_context.cc \
-Iopen-gpu-kernel-modules/kernel-open/common/inc \
-Iopen-gpu-kernel-modules/kernel-open/nvidia-uvm \
-Iopen-gpu-kernel-modules/src/common/sdk/nvidia/inc \
-Iopen-gpu-kernel-modules/src/nvidia/arch/nvalloc/unix/include \
-Iopen-gpu-kernel-modules \
-Iopen-gpu-kernel-modules/src/nvidia/generated -Iopen-gpu-kernel-modules/src/nvidia/inc/libraries -Iopen-gpu-kernel-modules/kernel-open/common/inc -I/usr/local/cuda/include -o out/gpu_driver -Iopen-gpu-kernel-modules -Iopen-gpu-kernel-modules/src/common/sdk/nvidia/inc -lpthread -lcuda
#clang++ gpu_driver.cc -I/usr/local/cuda/include -o out/gpu_driver -Iopen-gpu-kernel-modules -Iopen-gpu-kernel-modules/src/common/sdk/nvidia/inc -lpthread
LD_PRELOAD=out/sniff.so out/gpu_driver
#out/gpu_driver