Skip to content

Commit

Permalink
add hm knob
Browse files Browse the repository at this point in the history
  • Loading branch information
mattfel1 committed Oct 22, 2020
1 parent c9c0c4f commit be7b055
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/spatial/Spatial.scala
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ trait Spatial extends Compiler with ParamLoader {
cli.opt[Unit]("experiment").action{(_,_) => spatialConfig.dseMode = DSEMode.Experiment; spatialConfig.enableArchDSE = true; spatialConfig.enableRuntimeModel = true }.text("Enable DSE experimental mode.").hidden()
cli.opt[Unit]("hypermapper").action{(_,_) => spatialConfig.dseMode = DSEMode.HyperMapper; spatialConfig.enableArchDSE = true; spatialConfig.enableRuntimeModel = true }.text("Enable hypermapper dse.").hidden()
cli.opt[Int]("threads").action{(t,_) => spatialConfig.threads = t }.text("Set number of threads to use in tuning.")
cli.opt[Int]("hypermapper_evalsPerIter").action{(t,_) => spatialConfig.hypermapper_doeSamples = t }.text("Set number of evaluations per optimization iteration hypermapper should use.")
cli.opt[Int]("hypermapper_doeSamples").action{(t,_) => spatialConfig.hypermapper_doeSamples = t }.text("Set number of random samples hypermapper should use in design of experiment.")
cli.opt[Int]("hypermapper_iters").action{(t,_) => spatialConfig.hypermapper_iters = t }.text("Set number of optimization iterations for hypermapper.")

Expand Down
1 change: 1 addition & 0 deletions src/spatial/SpatialConfig.scala
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class SpatialConfig extends Config {
var allowInsanity: Boolean = false
var codeWindow: Int = 50
var hypermapper_doeSamples: Int = 10000
var hypermapper_evalsPerIter: Int = 1
var hypermapper_iters: Int = 5

var enableArchDSE: Boolean = false
Expand Down
2 changes: 1 addition & 1 deletion src/spatial/dse/HyperMapperDSE.scala
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ trait HyperMapperDSE extends argon.passes.Traversal { this: DSEAnalyzer =>
| "enable_feasible_predictor": true
| },
| "timestamp": "Timestamp",
| "evaluations_per_optimization_iteration": 100,
| "evaluations_per_optimization_iteration": ${spatialConfig.hypermapper_evalsPerIter},
| "run_directory": "$dir",
| "output_data_file": "${config.name}_output_dse_samples.csv",
| "output_pareto_file": "${config.name}_output_pareto.csv",
Expand Down

0 comments on commit be7b055

Please sign in to comment.