Skip to content

GagarinHuang/Task-Allocation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Task-Allocation

Task allocation for heterogenous computing CPU-GPU using integer programming

Requiring packages

numpy, pulp

Run

Command

python3 allocation.py [arg1] [arg2] [arg3] [arg4]

arg1 the number of unit counts.
e.g. for one CPU within N cores and one GPU, arg1 = N
arg2 the filename of tasks number. e.g. tasks.txt
format: task1 batch size, task2 batch size, task3 batch size, ...
arg3 the filename of task time cost. e.g. cost.txt
format:
cost_g1 cost_c1
cost_g2 cost_c2
...
cost_gi means the time cost of i-th task assigned to gpu
cost_ci means the time cost of i-th task assigned to cpu (one core)
arg4 the time limit of whole prgram

Example

python3 allocation.py 8 tasks.txt cost.txt 10

Constraint

At present only support one single CPU within multiple cores and one single GPU.
If want to support CPUs-GPUs, need to modify function 'generate_t' in allocation.py, which means generating time cost matrix.

About

Task allocation for heterogenous computing units

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages