Closed BHbean closed 9 months ago
I believe your question is two fold:
libcuda.so.1
To do 1, you need to add the following lines in libcuda/Makefile
Before
#--- Make rules ---
lib$(PROG).a: $(OBJS)
echo $(OBJS)
ar rcs $(OUTPUT_DIR)/lib$(PROG).a $(OBJS)
After
#--- Make rules ---
all: lib$(PROG).a lib$(PROG).so
lib$(PROG).a: $(OBJS)
echo $(OBJS)
ar rcs $(OUTPUT_DIR)/lib$(PROG).a $(OBJS)
lib$(PROG).so: $(OBJS)
$(CPP) --shared -o $(OUTPUT_DIR)/lib$(PROG).so $(OBJS)
Then create a symbolic link from gpgpusim-generated libcuda.so
to libcuda.so.1
When running your above program, you will see the following outputs:
WARNING: this function has not been implemented yet
This is shown in cuda_runtime_api.cc meaning the driver APIs are not supported yet
That is a really detailed explanation! Thanks for your reply!
I will try that later and close this issue. Thanks again!
Hello guys, recently we are trying to use gpgpu-sim to simulate some CUDA programs. However, the programs are written by calling CUDA driver API instead of CUDA runtime API. The vec-add.cu for test is listed below:
The test code calls cuMemcpyDtoH (which is CUDA driver API) to copy the first element from device to host, while calling cudaMemcpy (which is CUDA runtime API) to copy the first element from device to host. And we use the following command to compile it into executable:
when running on gpgpu-sim, it turns out the driver function had not been executed at all:
while the executable can be correctly run on a real GPU.
However, in file
libcuda/cuda_api.h
, we can indeed see some interfaces begins with prefixcu
, revealing that they are CUDA driver API.So does gpgpu-sim support CUDA driver API? Does it just ignore the CUDA driver API it detected?