"docs/git@developer.sourcefind.cn:xdb4_94051/vllm.git" did not exist on "eda1a7cad3b58d33353ce8f4145c66237a65c238"
Commit 5c2a9f2e authored by Paul's avatar Paul
Browse files

Generate configs

parent 059fa4cc
......@@ -110,6 +110,8 @@ struct compile_plan
}
const compiled_result& benchmark() const
{
if(results.empty())
MIGRAPHX_THROW("No configs to tune");
if(results.size() == 1)
return results.front();
std::cout << "Benchmarking " << preop.name() << ": " << results.size() << " configs"
......
......@@ -411,6 +411,17 @@ struct ck_gemm_compiler : compiler<ck_gemm_compiler>
m.replace_instruction(ins2, code_object, ins2->inputs());
}};
}
optional<tuning_config> get_tuning_config(context& ctx, instruction_ref ins, const operation& op) const
{
tuning_config tc;
auto shapes = to_shapes(ins->inputs());
auto problem = create_problem(shapes, create_settings(ins, op));
auto solutions = problem.GetSolutions(ctx.get_current_device().get_gfx_name());
tc.solutions.resize(solutions.size());
std::iota(tc.solutions.begin(), tc.solutions.end(), 0);
return tc;
}
};
} // namespace gpu
......
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