Commit 874523e4 authored by EYRAUD-DUBOIS Lionel's avatar EYRAUD-DUBOIS Lionel

DP2: discretization parametrisation now as described in the paper

parent a9efa51f
...@@ -292,7 +292,7 @@ resources. All of these only work with two types of resources. ...@@ -292,7 +292,7 @@ resources. All of these only work with two types of resources.
dual approximation, dynamic-programming based algorithm. Based on the simpler algorithm from dual approximation, dynamic-programming based algorithm. Based on the simpler algorithm from
[Scheduling Independent Tasks on Multi-cores with GPU Accelerators](https://hal.inria.fr/hal-00921357), described [Scheduling Independent Tasks on Multi-cores with GPU Accelerators](https://hal.inria.fr/hal-00921357), described
in Section 5.2. Also described in [Scheduling Independent Tasks on Multi-cores with GPU Accelerators](https://hal.inria.fr/hal-01081625), in Section 5.2. Also described in [Scheduling Independent Tasks on Multi-cores with GPU Accelerators](https://hal.inria.fr/hal-01081625),
Section 5.2. Additional option: `disc` selects the discretization precision (default 50.0) Section 5.2. Additional option: `disc` selects the discretization precision (default 3.0)
+ `dualhp` + `dualhp`
dual approximation, heteroprio-based greedy algorithm. Inspired from [Scheduling Data Flow Program in XKaapi: A dual approximation, heteroprio-based greedy algorithm. Inspired from [Scheduling Data Flow Program in XKaapi: A
New Affinity Based Algorithm for Heterogeneous Architectures](https://hal.inria.fr/hal-01081629v1), with only the New Affinity Based Algorithm for Heterogeneous Architectures](https://hal.inria.fr/hal-01081629v1), with only the
......
...@@ -14,7 +14,7 @@ class IndepDP2 : public IndepAllocator { ...@@ -14,7 +14,7 @@ class IndepDP2 : public IndepAllocator {
double tryGuess(Instance &, std::vector<int> taskSet, double maxGPUload, double maxlen, double tryGuess(Instance &, std::vector<int> taskSet, double maxGPUload, double maxlen,
IndepResult & result, bool getResult); IndepResult & result, bool getResult);
double epsilon = 0.01; double epsilon = 0.01;
double discretizationConstant = 50.0; double discretizationConstant = 3.0;
public: public:
IndepDP2(const AlgOptions& opt); IndepDP2(const AlgOptions& opt);
......
...@@ -11,7 +11,7 @@ using namespace std; ...@@ -11,7 +11,7 @@ using namespace std;
IndepDP2::IndepDP2(const AlgOptions& opt): IndepAllocator(opt) { IndepDP2::IndepDP2(const AlgOptions& opt): IndepAllocator(opt) {
verbosity = opt.asInt("verb_DP2", verbosity); verbosity = opt.asInt("verb_DP2", verbosity);
discretizationConstant = opt.asDouble("disc", 50.0); discretizationConstant = opt.asDouble("disc", 3.0);
} }
...@@ -29,7 +29,7 @@ double IndepDP2::tryGuess(Instance& instance, std::vector<int> taskSet, double m ...@@ -29,7 +29,7 @@ double IndepDP2::tryGuess(Instance& instance, std::vector<int> taskSet, double m
if(maxGPUload < 0) maxGPUload = 1; if(maxGPUload < 0) maxGPUload = 1;
double ratio = maxGPUload / (discretizationConstant * taskSet.size()); double ratio = maxlen / (discretizationConstant * taskSet.size());
vector<int> discreteGPUtimings(instance.nbTaskTypes); vector<int> discreteGPUtimings(instance.nbTaskTypes);
for(int i = 0; i < instance.nbTaskTypes; i++) for(int i = 0; i < instance.nbTaskTypes; i++)
discreteGPUtimings[i] = ceil(instance.execTimes[1][i] / ratio); discreteGPUtimings[i] = ceil(instance.execTimes[1][i] / ratio);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment