vetter/shoc

Verifying the available code's CC

Closed this issue · 1 comments

I ran into an interesting potential problem with SHOC when trying to figure out why CUDA BFS wasn't working on my current laptop.

BFS needs compute capability 1.2 for atomics. The BFS code checks whether the target device is at least CC 1.2, but doesn't check (doesn't have a way to check?) whether the code was compiled for CC 1.2. For whatever reason, our default CUDA_CPPFLAGS didn't include compilation for CC 1.2 - it had 1.0, 1.1, 1.3, and 2.0. Presumably, at runtime the kernel selected by the CUDA runtime was the CC 1.1 version. BFS ran but because it requires the atomics from 1.2, its verification of the results computed on the GPU failed.

So the problem is: the BFS code checked the CC of the device, but couldn't tell that it didn't have CC 1.2 code available to run on it. Is there a way to check at run time which version of the code will be used?

Looks like this was fixed some time ago by deprecating CC < 1.2. Closing.