Commit ec1ac8c0 authored by mei-ye's avatar mei-ye
Browse files

fix test/miopen error

parent 7437ebf4
...@@ -29,6 +29,9 @@ struct op_info ...@@ -29,6 +29,9 @@ struct op_info
weight_map["hip::load_literal"] = std::make_pair(1, 1); weight_map["hip::load_literal"] = std::make_pair(1, 1);
weight_map["hip::allocate"] = std::make_pair(0, 1); weight_map["hip::allocate"] = std::make_pair(0, 1);
weight_map["@outline"] = std::make_pair(0, 1); weight_map["@outline"] = std::make_pair(0, 1);
weight_map["slice"] = std::make_pair(1, 1);
weight_map["squeeze"] = std::make_pair(1, 1);
weight_map["unsqueeze"] = std::make_pair(1, 1);
weight_map["gpu::convolution"] = std::make_pair(4, 0); weight_map["gpu::convolution"] = std::make_pair(4, 0);
weight_map["gpu::conv_bias_relu"] = std::make_pair(4, 0); weight_map["gpu::conv_bias_relu"] = std::make_pair(4, 0);
weight_map["gpu::pooling"] = std::make_pair(2, 0); weight_map["gpu::pooling"] = std::make_pair(2, 0);
...@@ -45,7 +48,7 @@ struct op_info ...@@ -45,7 +48,7 @@ struct op_info
} }
else else
{ {
return std::make_pair(1, 0); return std::make_pair(1, is_context_free(op) ? 1 : 0);
} }
} }
std::unordered_map<std::string, std::pair<int, int>> weight_map; std::unordered_map<std::string, std::pair<int, int>> weight_map;
......
...@@ -130,7 +130,10 @@ migraphx::argument run_gpu(migraphx::program& p) ...@@ -130,7 +130,10 @@ migraphx::argument run_gpu(migraphx::program& p)
EXPECT(is_shared(ctx, p.get_context())); EXPECT(is_shared(ctx, p.get_context()));
p.dry_run(m); p.dry_run(m);
EXPECT(is_shared(ctx, p.get_context())); EXPECT(is_shared(ctx, p.get_context()));
return migraphx::gpu::from_gpu(p.eval(m)); auto eval = p.eval(m);
p.finish();
auto ret_val = migraphx::gpu::from_gpu(eval);
return ret_val;
} }
template <class V> template <class V>
......
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