1#pragma once
2
3#include <torch/csrc/lazy/core/ir.h>
4
5#include <string>
6
7namespace torch {
8namespace lazy {
9
10class BackendDevice;
11
12class TORCH_API DumpUtil {
13 public:
14 static std::string ToDot(c10::ArrayRef<const Node*> nodes);
15
16 static std::string PostOrderToDot(
17 c10::ArrayRef<const Node*> post_order,
18 c10::ArrayRef<const Node*> roots);
19
20 static std::string ToText(c10::ArrayRef<const Node*> nodes);
21
22 static std::string PostOrderToText(
23 c10::ArrayRef<const Node*> post_order,
24 c10::ArrayRef<const Node*> roots);
25
26 static std::string ToBackend(
27 c10::ArrayRef<Value> values,
28 const BackendDevice& device);
29};
30
31} // namespace lazy
32} // namespace torch
33