## API Changes ### DataType to runtime - Rationale: DataType is a runtime data structure - PRs https://github.com/apache/incubator-tvm/pull/4560 - Rename all old reference of tvm::Type to DataType - ExprNode.type -> ExprNode.dtype, Expr.type() -> Expr.dtype() - Move type constructors as static function: Int(bits) -> DataType::Int(bits)
### Node Object Unification - Rationale: remove a few redirected macros and alias, unify node and object - PRs: https://github.com/apache/incubator-tvm/pull/4603 - NodeXYZ -> ObjectXYZ - TVM_DEFINE_NODE_REF: define the class and TVM_DEFINE_OBJECT_REF_METHODS ### IRMutator/Visitor Functor Unification - Rationale: Unify mutator and functor - PRs: https://github.com/apache/incubator-tvm/pull/4607 https://github.com/apache/incubator-tvm/pull/4606 - Add ```#include<tvm/tir/stmt_functor.h>``` for places that need mutator - IRMutator: sub-class StmtMutator or StmtExprMutator instead - IRVisitor: sub-class StmtVisitor or StmtExprVisitor instead ### TVM_REGISTER_API -> TVM_REGISTER_GLOBAL - Rationale: remove indirection - PR: https://github.com/apache/incubator-tvm/pull/4621 - Rename to TVM_REGISTER_GLOBAL in ```runtime/registry.h``` ### SeqStmt - Rationale: avoid nested recursion in long blocks - PR https://github.com/apache/incubator-tvm/pull/4627 - Use SeqStmt instead to constructs sequences ### tir::Call.name -> op - Use op(RelayExpr) to replace the string name. see https://github.com/apache/incubator-tvm/pull/5863 - Remove the call_type field https://github.com/apache/incubator-tvm/pull/5937 ### IRPrinter -> ReprPrinter - Rationale: repr printer is shared across all variants in the stack - PRs https://github.com/apache/incubator-tvm/pull/4622 https://github.com/apache/incubator-tvm/pull/4752 - Rename IRPrinter -> ReprPrinter ### set_body_typed - Rationale: avoid duplication in terms of type signatures - https://github.com/apache/incubator-tvm/pull/4623 - Remove type signature argument in set_body_typed ```c++ // before TVM_REGISTER_GLOBAL("add") .set_body_typed<int(int)>([](int x) { return x + 1; } // after TVM_REGISTER_GLOBAL("add") .set_body_typed([](int x) { return x + 1; } ``` ### Node suffix Convention - Rationale: unify the naming convention throughout the codebase see also https://github.com/apache/incubator-tvm/issues/4648 - PRs https://github.com/apache/incubator-tvm/pull/4649 - Add Node suffix to low level IR nodes - Add ObjectRef classes to the TIR nodes - https://github.com/apache/incubator-tvm/pull/5773 - https://github.com/apache/incubator-tvm/pull/5778 - https://github.com/apache/incubator-tvm/pull/5784 ### tvm::Expr -> PrimExpr - Rationale: the low-level expression is renamed to "primitive" expression in order to bring more unifications. - PR https://github.com/apache/incubator-tvm/pull/4669 - tvm::Expr -> PrimExpr, ExprHash/ExprEqual->ObjectHash/ObjectEqual, VarExpr->Var ### Relay Type/Module/Op - Rationale: unify type system, and module across the stack. - PRs https://github.com/apache/incubator-tvm/pull/4616 https://github.com/apache/incubator-tvm/pull/4678 https://github.com/apache/incubator-tvm/pull/4699 - tvm/relay/module.h -> tvm/ir/module.h - relay::Module -> IRModule ### New Subfolders and Namespaces - ir: Common set of types and IR structures - attrs.h -> ir/attrs.h https://github.com/apache/incubator-tvm/pull/4709 - arith: Arithmetic simplification and integer analysis - arithmetic.h -> arith/analyzer.h arith/bound.h arith/int_set.h arith/pattern.h - https://github.com/apache/incubator-tvm/pull/4722 - target: Target dependent information and codegen - target_info.h -> target/target_info.h https://github.com/apache/incubator-tvm/pull/4721 - codegen.h -> target/codegen.h https://github.com/apache/incubator-tvm/pull/4742 - te namespace: Tensor expression DSL(compute and schedule) - Add namespace to compute/schedule - operation.h -> te/operation.h - schedule.h -> te/schedule.h - schedule_pass.h -> te/schedule_pass.h - tensor.h -> te/tensor.h - https://github.com/apache/incubator-tvm/pull/4727, https://github.com/apache/incubator-tvm/pull/4759 - tir namespace: tensor-level IR - lowered_func.h,buffer.h,data_layout.h -> tir/buffer.h,tir/data_layout.h,tir/lowered_func.h - ir.h -> tir/expr.h, tir/stmt.h - ir_functor_ext.h -> tir/expr_functor.h, tir/stmt_functor.h - https://github.com/apache/incubator-tvm/pull/4740 ### LoweredFunc TIR uses IRModule as basic unit of transformation instead of LoweredFunc. - https://github.com/apache/incubator-tvm/pull/5233 ### ir_pass.h - The IRModule->IRModule transformations are moved to tir/transform.h - The IRModule->Analaysis result passes are moved to tir/analysis.h ### Simplify - Simplify function is removed, use Analyzer in arith/analyzer.h instead - https://github.com/apache/incubator-tvm/pull/5385 ### BuildConfig - BuildConfig-> PassContext https://github.com/apache/incubator-tvm/pull/5668 ### Runtime Misc - ThreadScope::make -> ThreadScope::Create - StorageScope::make -> StorageScope::Create - https://github.com/apache/incubator-tvm/pull/5784 ### tvm.module -> tvm.runtime.module API changes wrt to runtime.Module https://github.com/apache/incubator-tvm/pull/4837 - tvm.module.load -> tvm.runtime.load_module - tvm.module.enabled -> tvm.runtime.enabled - tvm.module.system_lib -> tvm.runtime.system_lib ### tvm.ir API changes wrt to tvm.ir https://github.com/apache/incubator-tvm/pull/4862 - tvm.relay.Module -> tvm.IRModule ### tvm.target API change wrt to tvm.target https://github.com/apache/incubator-tvm/pull/4872 ### tvm.te API change wrt to https://github.com/apache/incubator-tvm/pull/4943 - tvm.create_schedule -> tvm.te.create_schedule - tvm.placeholder -> tvm.te.placeholder - tvm.compute -> tvm.te.compute -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/apache/incubator-tvm/issues/6486#issuecomment-702472106