cuda - Concurrently running two for loops with same number of loop cycles involving GPU and CPU tasks on two GPU -
i have 2 for
loops in code running same number of loop cycles. these 2 loops independent (each loop works on different input data). within 1 loop, there cpu functions , several kernels not running concurrently.
can run these iterations on separate gpus?
you can run involved kernels separately on 2 different gpus.
you have take care synchronization of cpu processings on partial outcomes of 2 gpus. due presence of sequential part, perhaps not experience maximum possible speedup factor of 2
when working 2
gpus.
starting cuda 4.0, can use cudasetdevice()
set current context corresponding given device without need of creating streams enable multi-gpu processing.
Comments
Post a Comment