junrushao1994 commented on PR #74:
URL: https://github.com/apache/tvm-rfcs/pull/74#issuecomment-1153095059
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]