I implemented matrix adddition and matrix multiplication with texture memroy.

But ,I found an error when the matrices increased.

For matrixAdd:

A: 48 * 80 B:48*80 C=A+B

Set the matrices like above ,the GPU’s and CPU’s results are same and right by attachment rightResult.

The kernel run on GPU is computed by function tex1D.

But, I increase the matrices size:

A:160*160 B:160*160

The GPU’s results showed by attachment wrongResult is wrong, and indicate:

CUDA_SAFE_CALL(cudaMallocArray(&cuArray1,&desc,WA,HA)):invalid argument

And the matrixMul program has the same problem.

I don’t know the reason. Is it possible that texture memory is limited,and the texture size cann’t be as large as you want to be?

Best regards.

[attachment=6846:attachment]

[attachment=6847:attachment]

wrongResult.bmp (474 KB)

(upload://w3AseewuEjJ5h0As1BUAuaCdWam.bmp) (442 KB)