std::ostream& operator<<(std::ostream & out, const_value_list_with_types l) { size_t i = 0; size_t prev_stage = 0; for(auto n : l.values) { if(i++ > 0) { if (l.use_newlines) { // TODO: Indent here is hard-coded for "graph(": un-hard-code it out << "\n "; if (n->stage() != prev_stage) { out << "-------- stage " << n->stage() << " --------\n "; prev_stage = n->stage(); } } else { out << ", "; } } printValueRef(out, n); out << " : "; if(n->hasType()) out << *n->type(); else out << "UNKNOWN_TYPE"; } return out; }
std::ostream& operator<<(std::ostream & out, const at::ArrayRef<T> & nodes) { size_t i = 0; for(auto n : nodes) { if(i++ > 0) out << ", "; printValueRef(out, n); } return out; }