I had a couple of related questions.
Is there any way to know the device ID from a thread in a kernel (not the host)?
I see there are two functions for querying the device ID from the host , first in the runtime API
host device cudaError_t cudaGetDevice ( int* device )
secondly in the driver API
CUresult cuCtxGetDevice ( CUdevice* device )
Are they the Runtime-Driver API counterparts ? Is there any difference between them and could they return different values in any edge case ?