Hi,
I have created a HybridBSP [1] class which should combine the default BSP
(CPU) class with GPU methods [2].
The abstract HybridBSP class extends the BSP class and adds bspGpu,
setupGpu and cleanupGpu method.
public abstract class HybridBSP<K1, V1, K2, V2, M extends Writable> extends
BSP<K1, V1, K2, V2, M> implements BSPGpuInterface<K1, V1, K2, V2, M> {
@Override
public abstract void bspGpu(BSPPeer<K1, V1, K2, V2, M> peer)
throws IOException, SyncException, InterruptedException;
@Override
public void setupGpu(BSPPeer<K1, V1, K2, V2, M> peer) throws IOException,
SyncException, InterruptedException {
}
@Override
public void cleanupGpu(BSPPeer<K1, V1, K2, V2, M> peer) throws IOException {
}
}
Now I want to add a new scheduling technique which checks the conf property
(gpuBspTaskNum) and executes the bspGpu instead of default bsp method.
e.g., bspTaskNum=3 and gpuBspTaskNum=1
The scheduler should run four bsp tasks simultaneously and execute three
times the bsp method and once the bspGpu. (both defined within one derived
HybridBSP class)
Do I have to modify the taskrunner or create a new SimpleTaskScheduler?
How can I integrate this into Hama?
Thanks!
Martin
[1]
https://github.com/millecker/hama/blob/5d0e8b26abd6b63fa5afad09a2ba960bf9922868/core/src/main/java/org/apache/hama/bsp/gpu/HybridBSP.java
[2]
https://github.com/millecker/hama/blob/5d0e8b26abd6b63fa5afad09a2ba960bf9922868/core/src/main/java/org/apache/hama/bsp/gpu/BSPGpuInterface.java