Hey guys,
Not sure if I could post this question here, I guess it is more about the usage of cblas than cublas. So I am comparing a matrix vector multiplication using both cblas and cublas libraries, then compute the 2 norm of the two resulting vectors using cblas_snrm2() and cublasSnrm2() separately. The output of cblas_snrm2() is just weird! What I found out is that if I output the same vector for multiple times, the last one will always be a bit off from the others, for instance,
[codebox]
float aa = cblas_snrm2(leny, resulty, 1);
float bb = cblas_snrm2(leny, resulty, 1);
float cc = cblas_snrm2(leny, resulty, 1);
printf("\n\n2 norm of the resulting vector in Host : %f, %f, %f \n\n", aa, bb, cc);
[/codebox]
the output becomes:
[codebox]2 norm of the resulting vector in Host : 2334610161664.000000, 2334610161664.000000, 2334610171609.432129
[/codebox]
Does anyone know what it is going on here? It is just weird!
Thanks!