Hi,
Kernels in CUDA do not launch if there aren’t sufficient resources for executing them right? Do Cublas functions also have a cutoff of that sort? How do we know if we are trying to do something with a cublas function that exceeds the device’s capabilities…
I tried running the following code[codebox]#include <stdio.h>
#include “cublas.h”
#pragma comment(lib, “c:\CUDA\lib\cublas.lib”)
int main()
{
float *array;
cublasInit();
cublasAlloc(102410241024*1024,sizeof(float),&array);
get_cublas_error(“allocation”);
return 0;
}[/codebox]
(the get_cublas_error function simple calls the cublasGetError() function and prints out the error message as a string).
The code compiled and ran… But I am trying to allocate 1TB of space using cublasAlloc and my graphics card’s memory is 1GB. So cublasAlloc shouldn’t succed right? Why am I not getting any error…? I tried looking in the cublas documentation but couldnt find anything about this.
Appreciate any help… On a slightly unrelated note, is cublasSgemm the best function for Matrix multiplication on CUDA?
thanks,
Avinash