graph_runner.py 408 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from lightx2v.utils.profiler import ProfilingContext4Debug


class GraphRunner:
    def __init__(self, runner):
        self.runner = runner
        self.compile()

    def compile(self):
        print("start compile...")
        with ProfilingContext4Debug("compile"):
            self.runner.run_step()
        print("end compile...")

helloyongyang's avatar
helloyongyang committed
15
16
    def run_pipeline(self):
        return self.runner.run_pipeline()