gpgpu - Why should I use the CUDA Driver API instead of CUDA Runtime API? -


why should use cuda driver api, , in cases can't use cuda runtime api (which more convenient driver api)?

the runtime api higher level of abstraction on driver api , it's easier use (the performance gap should minimal). driver api handle-based 1 , provides higher degree of control. runtime api, on contrary, easier use (e.g. can use kernel<<<>>> launch syntax).

that "higher degree of control" means driver api have deal module initialization , memory management in more verbose way, allows more stuff, e.g. disable driver jit optimizations kernel code:

cu_jit_optimization_level - level of optimizations apply generated code (0 - 4), 4 being default , highest level of optimizations. option type: unsigned int

from http://developer.download.nvidia.com/compute/cuda/4_1/rel/toolkit/docs/online/group__cuda__types_gfaa9995214a4f3341f48c5830cea0d8a.html

this isn't possible via code runtime api. finer degree of control means might render things broken or slower, don't use if don't know are.

you should use either runtime api or driver api in application although, with newer cuda versions, runtime api code can peacefully coexist driver api code (http://docs.nvidia.com/cuda/pdf/cuda_c_programming_guide.pdf)

an application can mix runtime api code driver api code.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -