Commit c9f49f32 authored by Paul's avatar Paul
Browse files

Only tune with exaustive tuning

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