How to exam gpu support

Hello,

how to test my gpu, if it supports cuda or not, and if doesn’t support, how to make my app continue working without crashing?

Thank You.

Link your application statically against the CUDART lib. At the beginning of your application, test for a CUDA GPU using whatever method you like. Something similar to what is presented in the cuda deviceQuery sample application:

http://docs.nvidia.com/cuda/cuda-samples/index.html#device-query

would be sensible.

If an error is returned from the cudaDeviceGetProperties call:

http://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g929dcd9a191e17b7498e7ccaa3d16350

Then it is safe to assume you do not have a proper CUDA environment, and should proceed accordingly.

Proper CUDA error checking on all CUDA API calls and kernel calls is always a good practice.