Open pieterverstraete opened 10 years ago
It seems like it has something to do with dlopen, because when I use dlopen in cpp code, it also fails.
Would you please let me know the OS you are using?
The result of uname -a
is:
Linux phoenix 3.13-1-amd64 #1 SMP Debian 3.13.5-1 (2014-03-04) x86_64 GNU/Linux
This is because cuCtxCreate
is used, while for more recent API versions cuCtxCreate_v2
should be used. Also see my response at http://stackoverflow.com/questions/22612879/cuda-debug-invalid-kernel-image-error/22634798
cuda.h
contains API-conditional code managing this. I guess CUDA.jl should mirror (part of) this, selecting proper API calls based on the requested version?
I just updated the package, with several bug fixes (e.g. corrected function names and pointer sizes). Please checkout the latest and try again.
I have extended the example that is described in the readme to print out the thread id. The code then looks like this:
I then compile this code to ptx using:
The -arch=sm_20 is added to make the printf work. However, now I cannot load the module into Julia anymore. It keeps complaining about an invalid kernel image:
However, the code does work when I execute the same calls to libcuda (cuInit, cuDeviceGet, cuCtxCreate and cuModuleLoad) from a program written in C++.