Closed Runkli closed 2 years ago
As loadBufferCount is an int, while cudaMemcpyToSymbol requires a pointer, I changed the argument to &loadBufferCount. However now I am faced with "cudaErrorNoKernelImageForDevice" error, according to NVIDIA it means:
"that there is no kernel image available that is suitable for the device. This can occur when a user specifies code generation options for a particular CUDA source file that do not include the corresponding device configuration. "
So I've either compiled incorrectly for my MX150, or that my GPU may not be supported at all
MX150 compute capability is 6.1 (according to NVIDIA device query sample code), so I added the gencode flag to the cmake command:
cd .build
make clean
cmake -DCMAKE_INSTALL_PREFIX=/home/ilknull/carlsim6 -DCMAKE_BUILD_TYPE=Release ../. -DCARLSIM_CUDA_GENCODE=-gencode arch=compute_61,code=sm_61
make install
Yet I still get the same error (cudaErrorNoKernelImageForDevice)
At lines 337:
CUDA_CHECK_ERRORS(cudaMemcpyToSymbol(loadBufferCount, &bufferCnt, sizeof(int), 0, cudaMemcpyHostToDevice));
CUDA_CHECK_ERRORS(cudaMemcpyToSymbol(loadBufferSize, &bufSize, sizeof(int), 0, cudaMemcpyHostToDevice));
loadBuffer variables are being moved from Host to Device, while during declaration they are already "device\" variables. Commenting these out presents me with a "cudaErrorInvalidTexture" error at line 266, cudaBindTexture(__null, groupIdInfo_tex, runtimeData[netId].groupIdInfo, sizeof(int3) * networkConfigs[netId].numGroups)
...
I realize now that the CARLSIM_CUDA_GENCODE flag is used as a variable of its own containing the gencode, such as:
./carlsim/kernel/CMakeLists.txt: #-gencode arch=compute_${CARLSIM_CUDA_GENCODE},code=sm_${CARLSIM_CUDA_GENCODE}
and not the entire flag that you would pass to NVCC, as shown in the README
-DCARLSIM_CUDA_GENCODE=-gencode arch=compute_61,code=sm_61
However passing -DCARLSIM_CUDA_GENCODE=61
results in a make install error:
nvcc fatal : A single input file is required for a non-link phase when an outputfile is specified
CMake Error at carlsim-cuda_generated_snn_gpu_module.cu.o.Release.cmake:220 (message):
Error generating
/home/ilknull/Files/featCARLsim6/.build/CMakeFiles/carlsim-cuda.dir/carlsim/kernel/src/gpu_module/./carlsim-cuda_generated_snn_gpu_module.cu.o
make[2]: *** [CMakeFiles/carlsim-cuda.dir/build.make:77: CMakeFiles/carlsim-cuda.dir/carlsim/kernel/src/gpu_module/carlsim-cuda_generated_snn_gpu_module.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:316: CMakeFiles/carlsim-cuda.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Though this may be a misunderstanding on my behalf also...
@Runkli I don't know if you have already tried this but you could try removing all code containing compute_xx and sm_xx that is not the latest compute_xx that your GPU supports. I think older compute_xx may cause problems with CARLsim running on newer GPUs from Nvidia.
The user tried to build from an early feature branch of the CARLsim5 repository. With the CARLsim6 repository this issue was resolved. Furthermore, setting CARLSIM_CUDA_GENCODE in cMake is now optional.
Below is my output when running the hello_world sample:
Is this a problem in the source code or the way I'm running my code?