Skip to content

Commit

Permalink
updated Autotunersearch
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneslenfers committed Jul 27, 2022
1 parent 684ac16 commit d31aac2
Showing 1 changed file with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ class AutotunerSearch[P] extends Heuristic[P] {
// todo read in these values
// val doe = size

val doe = 0
val optimizationIterations = Math.min(200, searchSpace.size - 1)
// val doe = 0
val optimizationIterations = Math.min(samples, searchSpace.size - 1)

val configStringOpentuner = {
s"""{
Expand All @@ -223,6 +223,7 @@ class AutotunerSearch[P] extends Heuristic[P] {
"values" : [0, ${size - 1}],
"constraints" : [],
"dependencies": []
"parameter_default" : 0
}
}
}"""
Expand All @@ -243,15 +244,16 @@ class AutotunerSearch[P] extends Heuristic[P] {
},
"design_of_experiment": {
"doe_type": "random sampling",
"number_of_samples": ${doe}
"number_of_samples": ${optimizationIterations}
},
"optimization_iterations": ${optimizationIterations},
"optimization_iterations": 0,
"input_parameters" : {
"i": {
"parameter_type" : "integer",
"values" : [0, ${size - 1}],
"constraints" : [],
"dependencies": []
"parameter_default" : 0
}
}
}"""
Expand All @@ -276,7 +278,8 @@ class AutotunerSearch[P] extends Heuristic[P] {
"parameter_type" : "integer",
"values" : [0, ${size - 1}],
"constraints" : [],
"dependencies": []
"dependencies": [],
"parameter_default" : 0
}
}
}"""
Expand Down Expand Up @@ -343,7 +346,7 @@ class AutotunerSearch[P] extends Heuristic[P] {
// val parametersValues = hypermapper.stdout.readLine().split(",").map(x => x.trim())
val index = hypermapper.stdout.readLine().toInt
// compute sample (including function value aka runtime)
print("[" + i.toString + "/" + (doe + optimizationIterations).toString + "] : ")
print("[" + i.toString + "/" + (0 + optimizationIterations).toString + "] : ")
print(index.toString + " ")

val candidate = searchSpace.apply(index)
Expand Down Expand Up @@ -422,7 +425,7 @@ class AutotunerSearch[P] extends Heuristic[P] {

}

val iterations = 10
val iterations = 1
try {
search(configStringOpentuner, iterations, "exploration", "opentuner")
}
Expand Down

0 comments on commit d31aac2

Please sign in to comment.