cuda driver API and runtime API


I found that in the cuda SDK, the deviceQuery.cpp for linux uses cuda driver API but the deviceQuery.cpp for MAC os uses the runtime API. why is that?


There are two different examples, deviceQuery and deviceQueryDrv.
The fist one is using the runtime API, the second one the driver API.

OK, i see. thanks

in the linux version, deviceQuery.cpp do use cuDeviceGet, cuDeviceGetCount etc functions (begin with cu), which are the drive API, am i right?

the difference between the deviceQuery and deviceQueryDrv is call of CU_SAFE_CALL_NO_SYNC( ) function.

But for the Mac version, deviceQuery.cpp does use cudaGetDeviceCount () etc functions (begin with cuda). it is not like the deviceQuery.cpp of linux version. But the deviceQueryDrv.cpp of mac version is like the one of linux version.

Previously, i thought the deviceQuery.cpp should be almost same for different OSs.