MatthieuCourbariaux / BinaryNet

Training Deep Neural Networks with Weights and Activations Constrained to +1 or -1
BSD 3-Clause "New" or "Revised" License
1.04k stars 346 forks source link

benchmark error #16

Open zhaishengfu opened 7 years ago

zhaishengfu commented 7 years ago

Hi all, I run the benchmark_cubas.cu and find a really big problem. when the N = 8192, the result is success=1 success=1 that is, both xnor, gemm and cublas is correct but when i change the N to other number(128,100,192,1192,2192,1000, 8195 and so on), the first is always wrong and the second is almost correct(only 100 is wrong), that is, the result is : success = 0; success =1 so, is this a problem??why only 8192 is possible?? anther auestion. when i change the grid and block size to 1, the xnor result is also wrong(success = 0). so, i think maybe the xnor code is not universal .It only works for some limited settings. am i wrong? looking forward to your reply

MatthieuCourbariaux commented 7 years ago

I think you have to keep N a power of 2 (e.g. 1024 and 2048 might work).

Our XNOR kernel indeed only works for some limited settings. It was only meant to be a proof of concept.