"...composable_kernel_onnxruntime.git" did not exist on "82fae390fb3f8ebaaff5dfeae439b4a1a703d363"
Commit 8dd49c16 authored by Paul's avatar Paul
Browse files

Format

parent 17589448
...@@ -113,7 +113,10 @@ struct compile_plan ...@@ -113,7 +113,10 @@ struct compile_plan
instruction_ref ins; instruction_ref ins;
optional<tuning_config> config = nullopt; optional<tuning_config> config = nullopt;
std::vector<compiled_result> results = {}; std::vector<compiled_result> results = {};
void update_config(bool exhaustive) { config = get_tuning_config(*ctx, ins, preop, exhaustive); } void update_config(bool exhaustive)
{
config = get_tuning_config(*ctx, ins, preop, exhaustive);
}
template <class Vector> template <class Vector>
void add_compiles(Vector& compiles, problem_cache& pc) void add_compiles(Vector& compiles, problem_cache& pc)
{ {
......
...@@ -63,7 +63,8 @@ compile_op(const std::string& name, context& ctx, const std::vector<shape>& inpu ...@@ -63,7 +63,8 @@ compile_op(const std::string& name, context& ctx, const std::vector<shape>& inpu
return compiler_map().at(name).compile_op(ctx, inputs, v); return compiler_map().at(name).compile_op(ctx, inputs, v);
} }
optional<tuning_config> get_tuning_config(context& ctx, instruction_ref ins, const operation& op, bool exhaustive) optional<tuning_config>
get_tuning_config(context& ctx, instruction_ref ins, const operation& op, bool exhaustive)
{ {
return compiler_map().at(op.name()).get_tuning_config(ctx, ins, op, exhaustive); return compiler_map().at(op.name()).get_tuning_config(ctx, ins, op, exhaustive);
} }
......
...@@ -91,7 +91,8 @@ compiler_replace ...@@ -91,7 +91,8 @@ compiler_replace
compile(context& ctx, instruction_ref ins, const operation& op, const value& solution); compile(context& ctx, instruction_ref ins, const operation& op, const value& solution);
operation operation
compile_op(const std::string& name, context& ctx, const std::vector<shape>& inputs, const value& v); compile_op(const std::string& name, context& ctx, const std::vector<shape>& inputs, const value& v);
optional<tuning_config> get_tuning_config(context& ctx, instruction_ref ins, const operation& op, bool exhaustive); optional<tuning_config>
get_tuning_config(context& ctx, instruction_ref ins, const operation& op, bool exhaustive);
template <class T> template <class T>
void register_compiler() void register_compiler()
...@@ -125,7 +126,8 @@ template <class Derived> ...@@ -125,7 +126,8 @@ template <class Derived>
struct compiler : auto_register_compiler<Derived> struct compiler : auto_register_compiler<Derived>
{ {
const Derived& derived() const { return static_cast<const Derived&>(*this); } const Derived& derived() const { return static_cast<const Derived&>(*this); }
optional<tuning_config> get_tuning_config(context&, instruction_ref, const operation&, bool) const optional<tuning_config>
get_tuning_config(context&, instruction_ref, const operation&, bool) const
{ {
return nullopt; return nullopt;
} }
......
...@@ -439,7 +439,7 @@ struct ck_gemm_compiler : compiler<ck_gemm_compiler> ...@@ -439,7 +439,7 @@ struct ck_gemm_compiler : compiler<ck_gemm_compiler>
optional<tuning_config> optional<tuning_config>
get_tuning_config(context& ctx, instruction_ref ins, const operation& op, bool exhaustive) const get_tuning_config(context& ctx, instruction_ref ins, const operation& op, bool exhaustive) const
{ {
if (not exhaustive and not enabled(MIGRAPHX_TUNE_CK{})) if(not exhaustive and not enabled(MIGRAPHX_TUNE_CK{}))
return nullopt; return nullopt;
tuning_config tc; tuning_config tc;
auto shapes = to_shapes(ins->inputs()); auto shapes = to_shapes(ins->inputs());
......
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