Commit 0f4fdade authored by Paul's avatar Paul
Browse files

Fix memory conflict bug

parent 85405766
...@@ -380,6 +380,9 @@ void schedule::apply(program& p) const ...@@ -380,6 +380,9 @@ void schedule::apply(program& p) const
{ {
auto args = merge.second[j]; auto args = merge.second[j];
args.insert(args.begin(), ins1); args.insert(args.begin(), ins1);
// Add input arguments as a conflict
for(auto arg:merge.second[j])
args.insert(args.end(), arg->inputs().begin(), arg->inputs().end());
p.insert_instruction(merge.first, op::identity{}, args); p.insert_instruction(merge.first, op::identity{}, args);
} }
}); });
......
...@@ -56,7 +56,7 @@ std::vector<pass> target::get_passes(migraphx::context& gctx) const ...@@ -56,7 +56,7 @@ std::vector<pass> target::get_passes(migraphx::context& gctx) const
schedule{gpu::schedule_model{ctx.get_current_device().nstreams()}}, schedule{gpu::schedule_model{ctx.get_current_device().nstreams()}},
memory_coloring{"hip::allocate"}, memory_coloring{"hip::allocate"},
dead_code_elimination{}, dead_code_elimination{},
// eliminate_workspace{}, eliminate_workspace{},
eliminate_allocation{"hip::allocate"}, eliminate_allocation{"hip::allocate"},
check_context<context>{}, check_context<context>{},
dead_code_elimination{} dead_code_elimination{}
......
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