GetDeviceProperties returning wrong data

Apr 25, 2013 at 6:38 AM
I've just installed Cudafy.NET v1.21 and compiled and run the included CudafyByExample project. The program runs without reporting errors, however the stats reported by the enum_gpu routine are very wrong.

The program reports my GTX 560's compute capability is 1.1, and the max grid dimension as (2097152, 2097152, 33554432).

Geeks3D GPU Caps Viewer v1.11.1 reports compute capability 2.1 and max grid size as (65535 x 65535 x 65535), which matches the NVidia documentation for this GTX 560.

GeForce GTX 560
Windows 7 64 bit
NVidia CUDA Toolkit v5.0 64 bit
NVidia driver version 306.94
VS 2012 64 bit, configured per Alan Tatourian's steps

The rest of the chapters in the CudafyByExample demo app seem to run ok (Julia sets, sphere shading, etc.)

Any idea what's up with GetDeviceProperties?
Apr 25, 2013 at 3:08 PM
If you are running in OpenCL mode then you would see 1.1 (the OpenCL version that NVIDIA supports).
Apr 25, 2013 at 6:17 PM
Okay... So, how do I make it not run in OpenCL mode? OpenCL is nice and all, but my primary interest in CUDAfy is... CUDA!

Also, if it's reporting OpenCL settings, why is the platform name "NVIDIA CUDA"? And why would OpenCL support max grid dimensions so much larger than what the hardware spec allows?

Output of enum_gpu:

--- General Information for device 0 ---
Name: GeForce GTX 560
Platform Name: NVIDIA CUDA
Device Id: 0
Compute capability: 1.1
Clock rate: 1620
Simulated: False

--- Memory Information for device 0 ---
Total global mem: 1073807360
Total constant Mem: 65536
Max mem pitch: 2147483647
Texture Alignment: 0

--- MP Information for device 0 ---
Shared mem per mp: 49152
Registers per mp: 65536
Threads in warp: 32
Max threads per block: 1024
Max thread dimensions: (1024, 1024, 64)
Max grid dimensions: (2097152, 2097152, 33554432)
Apr 26, 2013 at 5:58 AM
Edited Apr 26, 2013 at 5:59 AM
You take a look at the source code of Program.cs and in the first three lines of Main(...) you change it to Cuda.

I am not 100% sure if the grid dimensions are correct for all OpenCL version however the grid size is not strictly limited by the hardware since blocks are essentially independent from each other.