Mark Harris from NVIDIA recently gave some advice on making your application faster by using cudaDeviceGetAttribute() instead of udaGetDeviceProperties() in specific cases. Check out the full details here:
https://devblogs.nvidia.com/cuda-pro-tip-the-fast-way-to-query-device-properties/