I see cuda programming guider say only one context(cuda device context) will be active in a host thread at any given time. But I see context can be selected by cuCtxPushCurrent(), so I wondering will it be possible:
Now I have two cuda device A and B. First, I create two context for each of them, contextA for device A in threadA and contextB for device B in threadB. Then I alloc space and get a pointerA in contextA using cudaMalloc() in threadA.
My question is will be possible to use pointerA in threadB after calling cuCtxPushCurrent(contextA)?
If yes, will the cuda kernel function in contextB still excuting after threadB selected contextA?