"vscode:/vscode.git/clone" did not exist on "c55e4d60ced22c2773964de24f8aef89dbd7110d"
Commit 427bbe21 authored by Shucai Xiao's avatar Shucai Xiao
Browse files

changed a scenario and fixed two test cases.

parent cfe5234e
......@@ -28,12 +28,11 @@ static bool try_compute_shape(instruction_ref ins, const std::vector<shape>& inp
auto outputs = ins->outputs();
// If the current instruction has no output, it means it is the last
// instruction and generates a non-standard output. But for unary
// and binary operators, we can still remove it and reshape the output
// to be standard since these operator can handle non-standard inputs
// instruction and generates a non-standard output shape, and the last
// output shape is different from the case with the contiguous operator
if(outputs.empty())
{
return true;
return false;
}
for(auto output : outputs)
......
......@@ -40,7 +40,7 @@ TEST_CASE(non_standard_op)
p.add_instruction(pass_op{}, c);
auto count = std::distance(p.begin(), p.end());
p.compile(eliminate_contiguous_target{});
EXPECT(std::distance(p.begin(), p.end()) == (count - 1));
EXPECT(std::distance(p.begin(), p.end()) == count);
}
TEST_CASE(transpose_gemm)
......
......@@ -61,7 +61,7 @@ TEST_CASE(tanh_shape)
}
EXPECT(p1 != p2);
migraphx::run_passes(p2,
migraphx::run_passes(p1,
{migraphx::gpu::adjust_allocation{}, migraphx::dead_code_elimination{}});
EXPECT(p1 == p2);
}
......
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