return res;
}
+loco::TensorShape push_shape(const loco::Push *m)
+{
+ loco::TensorShape res;
+
+ res.rank(m->rank());
+
+ for (uint32_t axis = 0; axis < m->rank(); ++axis)
+ {
+ res.dim(axis) = m->dim(axis);
+ }
+
+ return res;
+}
+
+loco::TensorShape pull_shape(const loco::Pull *m)
+{
+ loco::TensorShape res;
+
+ res.rank(m->rank());
+
+ for (uint32_t axis = 0; axis < m->rank(); ++axis)
+ {
+ res.dim(axis) = m->dim(axis);
+ }
+
+ return res;
+}
+
std::ostream &operator<<(std::ostream &os, const loco::Dimension &d)
{
os << (d.known() ? std::to_string(d.value()) : std::string{"?"});
res.arg("index", node->indexed() ? pp::fmt(node->index()) : pp::fmt('?'));
res.arg("from", symbol_lookup(*_symtbl, node->from()));
- res.arg("shape", pp::fmt(pretty(tensor_shape(node))));
+ res.arg("shape", pp::fmt(pretty(push_shape(node))));
res.state(NodeDesc::State::Complete);
return res;
res.arg("index", node->indexed() ? pp::fmt(node->index()) : pp::fmt('?'));
// TODO Print dtype
- res.arg("shape", pp::fmt(pretty(tensor_shape(node))));
+ res.arg("shape", pp::fmt(pretty(pull_shape(node))));
res.state(NodeDesc::State::PartiallyKnown);
return res;