I am new to cuda and graphics. I had several questions about cuda, hope someone will have proper answers:
These are for driver API:
-- What is the meaning of a cuda context? when i was reading cuda c book (3.1) i've learned that it is analogous to a process in CPU. I don't understand this, the actual host c code becomes a process in cpu and the device code becomes a code which is named a context?
-- It also said that the libraries can create and attach itself to a cuda context. If that is true why don't libraries just always attach themselves to a context and bother creating another context? the same reason why making a new process in CPU? Also what is the meaning of libraries in this case?? host or device libraries? our device code on PTX or cubin?
-- Is cuda based on preemption or scheduling? I mean cuda runs the context until it is done(0 references)?? and then pops the stack or some kind of deque is involved in this case?
These are for Cuda C (runtime API):
-- If we use Cuda C what is the buttom line of the device code? Context? Cubin? ...? or some kind of GPU Assembly somewhat?
Thanks.