I am very new to cuda programming. I am now using CUDA8.0 within Visual Studio 2015 and the GPU is Geforce 1060.
As I know the global memory of 1060 is 6GB. However, when I tried to copy the memory from my host to the device by using cudaMemcpy(), such as code below:
cudaMalloc((void **)&d_index_array, 10000 * 3 * sizeof(int)); //copy the index array from host to device;
cudaMalloc((void **)&d_hist, 10000sizeof(float));
cudaMemcpy(d_hist, &hist, 10000*sizeof(float), cudaMemcpyHostToDevice); cudaMemcpy(d_img, &img, 10000*sizeof(float), cudaMemcpyHostToDevice); cudaMemcpy(d_index_array, &index_array, 10000 * 3*sizeof(int), cudaMemcpyHostToDevice);
I will encounter an error as below:
Exception thrown at 0x00007FFCF04090D0 (nvcuda.dll) in xxxx.exe: 0xC0000005: Access violation reading location 0x0000002153120000.
If there is a handler for this exception, the program may be safely continued.
Has anyone encountered this type of problem before? I have searched the issue but it does not seem that I could find any useful solutions. Any advice will be highly appreciated!!Many thanks!