"src/vscode:/vscode.git/clone" did not exist on "01d609a2bd9406dc35f007d9a70303d85aa1d717"
Commit 980cfd49 authored by Brian Pickrell's avatar Brian Pickrell
Browse files

cosmetic

parent d2f06a5f
...@@ -4997,16 +4997,16 @@ TEST_CASE(reduce_max_dynamic_axis0) ...@@ -4997,16 +4997,16 @@ TEST_CASE(reduce_max_dynamic_axis0)
migraphx::program p; migraphx::program p;
auto* mm = p.get_main_module(); auto* mm = p.get_main_module();
migraphx::shape s{migraphx::shape::float_type, {{2, 4, 2}, {3, 5, 3}}}; migraphx::shape s{migraphx::shape::float_type, {{2, 4, 2}, {3, 5, 3}}};
auto input = mm->add_parameter("X", s); auto input = mm->add_parameter("X", s);
std::vector<float> input_data{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
auto reduce_max_op = migraphx::make_op("reduce_max", {{"axes", {0}}}); auto reduce_max_op = migraphx::make_op("reduce_max", {{"axes", {0}}});
mm->add_instruction(reduce_max_op, input); mm->add_instruction(reduce_max_op, input);
p.compile(migraphx::ref::target{}); p.compile(migraphx::ref::target{});
migraphx::parameter_map params0; migraphx::parameter_map params;
migraphx::shape input_fixed_shape0{migraphx::shape::float_type, {2, 5}}; migraphx::shape input_fixed_shape0{migraphx::shape::float_type, {2, 5}};
params0["X"] = migraphx::argument(input_fixed_shape0, input_data.data()); std::vector<float> input_data{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
auto result = p.eval(params0).back(); params["X"] = migraphx::argument(input_fixed_shape0, input_data.data());
auto result = p.eval(params).back();
std::vector<float> results_vector; std::vector<float> results_vector;
result.visit([&](auto output) { results_vector.assign(output.begin(), output.end()); }); result.visit([&](auto output) { results_vector.assign(output.begin(), output.end()); });
std::vector<float> gold = {6, 7, 8, 9, 10}; std::vector<float> gold = {6, 7, 8, 9, 10};
......
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