Just call cudaGetDevice()to get the device number of the active context, then call cudaGetDevicePropertiesto get the properties of this device. In code that will look something like this:
int device;
cudaGetDevice(&device);
struct cudaDeviceProp props;
cudaGetDeviceProperties(&props, device);
[ : , . ]