The virtual machine executable object emitted by the VM compiler or the ExecBuilder.
| 27 | |
| 28 | |
| 29 | class VMExecutable(Executable): |
| 30 | """The virtual machine executable object emitted by the VM compiler or the ExecBuilder.""" |
| 31 | |
| 32 | def __init__(self, mod: tvm.runtime.Module): |
| 33 | super().__init__(mod) |
| 34 | self._stats = self.mod["stats"] |
| 35 | self._as_text = self.mod["as_text"] |
| 36 | self._as_python = self.mod["as_python"] |
| 37 | |
| 38 | def stats(self) -> str: |
| 39 | """print the detailed statistics of the executable.""" |
| 40 | return self._stats() |
| 41 | |
| 42 | def as_text(self) -> str: |
| 43 | """print the instructions as text format.""" |
| 44 | return self._as_text() |
| 45 | |
| 46 | def as_python(self) -> str: |
| 47 | """print the instructions as python program.""" |
| 48 | return self._as_python() |
| 49 | |
| 50 | |
| 51 | def _vmcodegen( |