Hi,
I’m currently porting a matlab code to Cuda which produces a matrix as the final result. I have noticed that values at the random places of the matrix returned from the GPU does not match the ones produced by the matlab code. Tracking it down step by step I found out that the values are not matching at random places after a simple scaling of the matrix. The places where it’s not matching changes from one run to another.
A sample of mis-matching values are given below
[codebox]
Values not matching [246] (0.0005635147, -0.0009828182), (0.0005635147, -0.0009828183)
Values not matching [263] (-0.0010207375, -0.0000709876), (-0.0010207376, -0.0000709876)
Values not matching [272] (-0.0004542154, 0.0011594702), (-0.0004542154, 0.0011594703)
Values not matching [290] (0.0001093576, -0.0010442695), (0.0001093576, -0.0010442697)
Values not matching [238] (-0.0010028849, -0.0004090143), (-0.0010028851, -0.0004090144)
Values not matching [255] (-0.0002247403, 0.0010913066), (-0.0002247403, 0.0010913067)
Values not matching [186] (-0.0003326887, -0.0011114202), (-0.0003326887, -0.0011114203)
Values not matching [203] (0.0009803898, -0.0004338518), (0.0009803899, -0.0004338518)
Values not matching [246] (0.0011994267, 0.0002392598), (0.0011994268, 0.0002392599)
Values not matching [203] (-0.0004072963, -0.0012231999), (-0.0004072963, -0.0012232000)
Values not matching [177] (-0.0011118277, 0.0005138259), (-0.0011118278, 0.0005138259)
Values not matching [263] (0.0009061802, 0.0009969573), (0.0009061803, 0.0009969574)
[/codebox]
I’m working on Tesla C1060 board. How do I get rid of this or it’s a problem with the floating point math in GPU?
Thanks
Shibdas