To summarize offline discussion with @areusch:
Q: Is this going to unify current fragmented printing formats?
A: Yes for TIR. After following the standard deprecation procedure (see Section
"Upgrade Plan"), TVMScript will be the only frontend (i.e. user-facing
printer/parsing) for TIR, while the original non-roundtrippable text format
will eventually be deprecated. For serialization/deserialization,
reflection-based JSON format is preserved without change, which is basically
like protobuf for reliably data sharing.
Q: Is JSON serialization going to be deprecated?
A: No. It is a separate issue. TVM's JSON serialization is conceptually similar
to protobuf, which is designed to be reliably persist data, while not
necessarily human-readable, which is different than our goal in this RFC
(frontend).
Q: Is this going to introduce new functionalities that make TVM more fragmented?
A: No. It's a refactoring of existing TIR TVMScript printer. With future
deprecations done, it actually reduces the fragmentation on TIR side.
Q: Why is this called "unified" printer?
A: It provides a unified infrastructure that allows IR developers to extend to
other IRs, for example, Relax, without interfering with each other. More
concretely speaking, as pointed out in the folder structure in the RFC text:
```
src/script/printer/
├── core # Core infra, which is IR-agnostic
│ ├── ir_docsifier.cc
│ └── ...
├── tir # TIR dialect
│ ├── expr.cc
│ ├── stmt.cc
│ └── ...
└── relax # Hypothetical Relax dialect (not part of our RFC)
└── ...
```
TIR developers only need to maintain the `tir` folder, and relax developers
only need to maintain `relax` folder. The IRModule that contains both TIR and
other dialects is allowed to be printed with this infrastructure.
--
Reply to this email directly or view it on GitHub:
https://github.com/apache/tvm-rfcs/pull/74#issuecomment-1153095059
You are receiving this because you are subscribed to this thread.
Message ID: <apache/tvm-rfcs/pull/74/[email protected]>