The Driver API is a lower-level API than the Runtime
API. The Driver API has these advantages:
- More control over device contexts
- No C extensions in the host code, so the host code can be compiled with
compilers other than nvcc and the host compiler
it calls by default
Its primary disadvantages are as follows:
- Much more verbose code
- Linking against the CUDA Driver library requires additional
application complexity, since the driver may or may not be installed
on a given target machine
- Requires explicit management of device contexts and device code modules
For more information on the Driver API, refer to Section 3.3
of the CUDA C Programming Guide.