Commit 5de36e4a authored by charlie's avatar charlie
Browse files

Tidy fixes

parent b21d8118
...@@ -43,7 +43,7 @@ struct select_module ...@@ -43,7 +43,7 @@ struct select_module
std::string name() const { return "select_module"; } std::string name() const { return "select_module"; }
shape compute_shape(const std::vector<shape>&, std::vector<module_ref>) const shape compute_shape(const std::vector<shape>&, const std::vector<module_ref>&) const
{ {
return shape{output_dyn_shapes}; return shape{output_dyn_shapes};
} }
...@@ -72,7 +72,7 @@ struct select_module ...@@ -72,7 +72,7 @@ struct select_module
{ {
MIGRAPHX_THROW("SELECT_MODULE: no compatible submodules found for given input shapes"); MIGRAPHX_THROW("SELECT_MODULE: no compatible submodules found for given input shapes");
} }
auto module_to_run = *module_iter; auto* module_to_run = *module_iter;
std::unordered_map<std::string, argument> params; std::unordered_map<std::string, argument> params;
// add input parameters // add input parameters
......
...@@ -369,7 +369,7 @@ struct miopen_apply ...@@ -369,7 +369,7 @@ struct miopen_apply
apply_map.emplace("select_module", [=](instruction_ref ins) { apply_map.emplace("select_module", [=](instruction_ref ins) {
std::vector<instruction_ref> inputs = ins->inputs(); std::vector<instruction_ref> inputs = ins->inputs();
auto mod_args = ins->module_inputs(); auto mod_args = ins->module_inputs();
for(auto smod : mod_args) for(auto* smod : mod_args)
{ {
smod->use_local_alloc = true; smod->use_local_alloc = true;
auto last_ins = std::prev(smod->end()); auto last_ins = std::prev(smod->end());
......
...@@ -7285,7 +7285,7 @@ TEST_CASE(select_module_add_test) ...@@ -7285,7 +7285,7 @@ TEST_CASE(select_module_add_test)
auto literal_ins = mm->add_literal(migraphx::literal{lit_s, {6}}); auto literal_ins = mm->add_literal(migraphx::literal{lit_s, {6}});
// create batch submodules // create batch submodules
auto create_submodule = [&](std::size_t batch_size, std::string module_name) { auto create_submodule = [&](std::size_t batch_size, const std::string& module_name) {
auto* submod = p.create_module(module_name); auto* submod = p.create_module(module_name);
migraphx::shape sm_shape{migraphx::shape::float_type, {batch_size, 4}}; migraphx::shape sm_shape{migraphx::shape::float_type, {batch_size, 4}};
auto sm_input = submod->add_parameter("data", sm_shape); auto sm_input = submod->add_parameter("data", sm_shape);
...@@ -7329,7 +7329,7 @@ TEST_CASE(select_module_reduce_test0) ...@@ -7329,7 +7329,7 @@ TEST_CASE(select_module_reduce_test0)
migraphx::program p; migraphx::program p;
// create batch submodules // create batch submodules
auto create_submodule = [&](std::size_t batch_size, std::string module_name) { auto create_submodule = [&](std::size_t batch_size, const std::string& module_name) {
auto* submod = p.create_module(module_name); auto* submod = p.create_module(module_name);
migraphx::shape sm_shape{migraphx::shape::float_type, {batch_size, 2, 2}}; migraphx::shape sm_shape{migraphx::shape::float_type, {batch_size, 2, 2}};
auto sm_input = submod->add_parameter("data", sm_shape); auto sm_input = submod->add_parameter("data", sm_shape);
...@@ -7375,7 +7375,7 @@ TEST_CASE(select_module_reduce_test1) ...@@ -7375,7 +7375,7 @@ TEST_CASE(select_module_reduce_test1)
migraphx::program p; migraphx::program p;
// create batch submodules // create batch submodules
auto create_submodule = [&](std::size_t batch_size, std::string module_name) { auto create_submodule = [&](std::size_t batch_size, const std::string& module_name) {
auto* submod = p.create_module(module_name); auto* submod = p.create_module(module_name);
migraphx::shape sm_shape{migraphx::shape::float_type, {batch_size, 2, 2}}; migraphx::shape sm_shape{migraphx::shape::float_type, {batch_size, 2, 2}};
auto sm_input = submod->add_parameter("data", sm_shape); auto sm_input = submod->add_parameter("data", sm_shape);
......
...@@ -37,7 +37,7 @@ struct test_select_module_add : verify_program<test_select_module_add> ...@@ -37,7 +37,7 @@ struct test_select_module_add : verify_program<test_select_module_add>
auto literal_ins = mm->add_literal(migraphx::literal{lit_s, {6}}); auto literal_ins = mm->add_literal(migraphx::literal{lit_s, {6}});
// create batch submodules // create batch submodules
auto create_submodule = [&](std::size_t batch_size, std::string module_name) { auto create_submodule = [&](std::size_t batch_size, const std::string& module_name) {
auto* submod = p.create_module(module_name); auto* submod = p.create_module(module_name);
migraphx::shape sm_shape{migraphx::shape::float_type, {batch_size, 4}}; migraphx::shape sm_shape{migraphx::shape::float_type, {batch_size, 4}};
auto sm_input = submod->add_parameter("data", sm_shape); auto sm_input = submod->add_parameter("data", sm_shape);
......
...@@ -34,8 +34,8 @@ struct test_select_module_reduce : verify_program<test_select_module_reduce> ...@@ -34,8 +34,8 @@ struct test_select_module_reduce : verify_program<test_select_module_reduce>
migraphx::program p; migraphx::program p;
// create batch submodules // create batch submodules
auto create_submodule = [&](std::size_t batch_size, std::string module_name) { auto create_submodule = [&](std::size_t batch_size, const std::string& module_name) {
auto submod = p.create_module(module_name); auto* submod = p.create_module(module_name);
migraphx::shape sm_shape{migraphx::shape::float_type, {batch_size, 2, 2}}; migraphx::shape sm_shape{migraphx::shape::float_type, {batch_size, 2, 2}};
auto sm_input = submod->add_parameter("data", sm_shape); auto sm_input = submod->add_parameter("data", sm_shape);
auto reduce_ins = auto reduce_ins =
......
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