Commit f374143f authored by Paul's avatar Paul
Browse files

Tidy fixes

parent 20360b3b
...@@ -21,8 +21,6 @@ struct module_pass_manager ...@@ -21,8 +21,6 @@ struct module_pass_manager
virtual ~module_pass_manager() {} virtual ~module_pass_manager() {}
}; };
module& get_module(module_pass_manager& mpm);
void run_passes(module& mod, const std::vector<pass>& passes, tracer trace = tracer{}); void run_passes(module& mod, const std::vector<pass>& passes, tracer trace = tracer{});
void run_passes(program& prog, const std::vector<pass>& passes, tracer trace = tracer{}); void run_passes(program& prog, const std::vector<pass>& passes, tracer trace = tracer{});
......
...@@ -812,15 +812,6 @@ inline auto precompile_name(std::string s) // NOLINT ...@@ -812,15 +812,6 @@ inline auto precompile_name(std::string s) // NOLINT
}); });
} }
template <class... Ms>
auto conv_bias_pointwise(Ms... ms)
{
return precompile_name("pointwise")(
match::either_arg(0, 1)(bias_shape(match::used_once()).bind("bias"),
fusable_conv(match::used_once()).bind("conv")),
ms...);
}
struct find_conv_bias struct find_conv_bias
{ {
context* ctx = nullptr; context* ctx = nullptr;
......
...@@ -15,12 +15,12 @@ struct context; ...@@ -15,12 +15,12 @@ struct context;
struct code_object_op struct code_object_op
{ {
value::binary code_object; value::binary code_object{};
std::string symbol_name; std::string symbol_name = "";
std::size_t global; std::size_t global = 0;
std::size_t local; std::size_t local = 0;
std::vector<shape> expected_inputs; std::vector<shape> expected_inputs{};
shape output; shape output{};
std::int64_t output_arg = -1; std::int64_t output_arg = -1;
kernel k{}; kernel k{};
......
...@@ -15,7 +15,7 @@ struct fuse_mlir ...@@ -15,7 +15,7 @@ struct fuse_mlir
{ {
context* ctx = nullptr; context* ctx = nullptr;
std::string name() const { return "gpu::fuse_mlir"; } std::string name() const { return "gpu::fuse_mlir"; }
void apply(module_pass_manager& m) const; void apply(module_pass_manager& mpm) const;
}; };
} // namespace gpu } // namespace gpu
......
...@@ -23,7 +23,7 @@ struct mlir_compiler : compiler<mlir_compiler> ...@@ -23,7 +23,7 @@ struct mlir_compiler : compiler<mlir_compiler>
compiler_replace insert(code_object_op co) const compiler_replace insert(code_object_op co) const
{ {
return [=](module& m, instruction_ref ins) { return [co=std::move(co)](module& m, instruction_ref ins) {
auto mlir = insert_mlir(m, ins, co, ins->inputs()); auto mlir = insert_mlir(m, ins, co, ins->inputs());
m.replace_instruction(ins, mlir); m.replace_instruction(ins, mlir);
}; };
......
...@@ -495,7 +495,7 @@ struct mlir_program ...@@ -495,7 +495,7 @@ struct mlir_program
mlirMIGraphXAddBackendPipeline(pm.get(), hacked_tname.c_str(), "amdgcn-amd-amdhsa", ""); mlirMIGraphXAddBackendPipeline(pm.get(), hacked_tname.c_str(), "amdgcn-amd-amdhsa", "");
mlirPassManagerRun(pm.get(), mmodule.get()); mlirPassManagerRun(pm.get(), mmodule.get());
code_object_op op; code_object_op op{};
op.symbol_name = "main"; op.symbol_name = "main";
op.code_object = get_binary(); op.code_object = get_binary();
std::tie(op.global, op.local) = get_launch_params(); std::tie(op.global, op.local) = get_launch_params();
...@@ -605,6 +605,7 @@ std::string dump_mlir(const module&) { return {}; } ...@@ -605,6 +605,7 @@ std::string dump_mlir(const module&) { return {}; }
code_object_op compile_mlir(const context&, const module&) { return {}; } code_object_op compile_mlir(const context&, const module&) { return {}; }
instruction_ref instruction_ref
// cppcheck-suppress funcArgNamesDifferent
insert_mlir(module& m, instruction_ref, code_object_op, const std::vector<instruction_ref>&) insert_mlir(module& m, instruction_ref, code_object_op, const std::vector<instruction_ref>&)
{ {
return m.end(); return m.end();
......
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