41{
43
44
45
46
47
48
49
50
51
52
53
54
55
56
63 vector<mir::Operation::Output *> concat_inputs{tail1->
getOutput(0), tail2->getOutput(0)};
65 input->getOutput(0)->setName(
"input");
66 head1->getOutput(0)->setName("head1");
67 head2->getOutput(0)->setName("head2");
68 tail1->getOutput(0)->setName("tail2");
69 tail2->getOutput(0)->setName("tail2");
70 join->getOutput(0)->setName(
"join");
71
72
76 ASSERT_EQ(seq.size(), 6u);
77
78 vector<Operation *> op_seq(seq.size());
79 transform(seq.cbegin(), seq.cend(), op_seq.begin(),
80 [](const unique_ptr<sir::Action> &action) { return getCall(action)->mirOp; });
81
82 vector<Operation *> valid_seq1{
input, head1, tail1, head2, tail2,
join};
83 vector<Operation *> valid_seq2{
input, head2, tail2, head1, tail1,
join};
84 ASSERT_TRUE(op_seq == valid_seq1 || op_seq == valid_seq2);
85}
Output * getOutput(std::size_t index)
Description of tensor concatenation operation.
Constructs inference sequence for given computational graph, gathers list of variables used in artifa...
const std::vector< std::unique_ptr< sir::Action > > & getInferenceSequence() const
void analyze(const mir::Graph *g)
contructs inference sequence
std::string join(const std::string &path1, const std::string &path2)