Share GPU buffers across different CUDA contexts -
is possible share cudamalloc'ed gpu buffer between different contexts (cpu threads) use same gpu? each context allocates input buffer need filled pre-processing kernel use entire gpu , distribute output them.
this scenario ideal avoid multiple data transfer , gpus. application beamformer, combine multiple antenna signals , generate multiple beams, each beam processed different gpu context. entire processing pipeline beams in place, need add beamforming part. having each thread generate it's own beam duplicate input data i'd avoid (also, it's more efficient generate multiple beams @ 1 go).
each cuda context has it's own virtual memory space, therefore can not use pointer 1 context inside context.
that being said, of cuda 4.0 default there 1 context created per process , not per thread. if have multiple threads running same cuda context, sharing device pointers between threads should work without problems.
Comments
Post a Comment