"...targets/git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "9607aef2674ffa5452e6b4aa48760e5e8e23a37a"
Commit de1d1056 authored by Paul's avatar Paul
Browse files

Add single entry test

parent 1f819bf1
......@@ -136,7 +136,22 @@ std::vector<std::size_t> get_wait_for(migraphx::instruction_ref ins)
return wf;
}
TEST_CASE(test1)
TEST_CASE(single_entry)
{
instruction_map stream;
migraphx::program p;
auto one = p.add_literal(1);
auto onep1 = p.add_instruction(unary_op{}, one);
auto onep2 = p.add_instruction(unary_op{}, one);
auto binary = p.add_instruction(binary_op{}, onep1, onep2);
p.compile(schedule_target{&stream});
EXPECT(stream.at(onep1) != stream.at(onep2));
EXPECT(stream.at(binary) == 0);
EXPECT(get_wait_for(binary) == get_wait_for(stream[binary], {stream[onep1], stream[onep2]}));
EXPECT(check_conflicts(p, onep1, onep2));
}
TEST_CASE(double_entry)
{
instruction_map stream;
migraphx::program p;
......
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