Commit c9f49f32 authored by Paul's avatar Paul
Browse files

Only tune with exaustive tuning

parent 6f227761
...@@ -190,6 +190,7 @@ struct compile_manager ...@@ -190,6 +190,7 @@ struct compile_manager
{ {
problem_cache pc; problem_cache pc;
std::vector<compile_plan> cps; std::vector<compile_plan> cps;
bool exhaustive = false;
template <class... Ts> template <class... Ts>
void add_plan(Ts&&... xs) void add_plan(Ts&&... xs)
...@@ -199,6 +200,8 @@ struct compile_manager ...@@ -199,6 +200,8 @@ struct compile_manager
void update_configs() void update_configs()
{ {
if (not exhaustive)
return;
par_compile(cps.size(), [&](auto i) { cps[i].update_config(); }); par_compile(cps.size(), [&](auto i) { cps[i].update_config(); });
} }
...@@ -230,8 +233,7 @@ struct compile_manager ...@@ -230,8 +233,7 @@ struct compile_manager
void compile_ops::apply(module& m) const void compile_ops::apply(module& m) const
{ {
compile_manager cm; compile_manager cm;
problem_cache pc; cm.exhaustive = exhaustive_tune;
std::vector<compile_plan> cps;
// Find all precompile opes // Find all precompile opes
for(auto ins : iterator_for(m)) for(auto ins : iterator_for(m))
{ {
......
...@@ -39,6 +39,7 @@ struct context; ...@@ -39,6 +39,7 @@ struct context;
struct compile_ops struct compile_ops
{ {
context* ctx = nullptr; context* ctx = nullptr;
bool exhaustive_tune = false;
std::string name() const { return "gpu::compile_ops"; } std::string name() const { return "gpu::compile_ops"; }
void apply(module& m) const; void apply(module& m) const;
}; };
......
...@@ -154,7 +154,7 @@ std::vector<pass> target::get_passes(migraphx::context& gctx, const compile_opti ...@@ -154,7 +154,7 @@ std::vector<pass> target::get_passes(migraphx::context& gctx, const compile_opti
dead_code_elimination{}, dead_code_elimination{},
adjust_allocation{gpu_allocation_model{}}, adjust_allocation{gpu_allocation_model{}},
dead_code_elimination{}, dead_code_elimination{},
compile_ops{&ctx}, compile_ops{&ctx, options.exhaustive_tune},
dead_code_elimination{}, dead_code_elimination{},
promote_literals{}, promote_literals{},
dead_code_elimination{}, dead_code_elimination{},
......
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