diff --git a/include/tvm/arith/analyzer.h b/include/tvm/arith/analyzer.h index 84e5fd94f861..2be573942ebb 100644 --- a/include/tvm/arith/analyzer.h +++ b/include/tvm/arith/analyzer.h @@ -94,8 +94,6 @@ class ConstIntBoundNode : public Object { .def_ro("max_value", &ConstIntBoundNode::max_value); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const ConstIntBoundNode* other, SEqualReducer equal) const { return equal(min_value, other->min_value) && equal(max_value, other->max_value); } @@ -220,8 +218,6 @@ class ModularSetNode : public Object { .def_ro("base", &ModularSetNode::base); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const ModularSetNode* other, SEqualReducer equal) const { return equal(coeff, other->coeff) && equal(base, other->base); } diff --git a/include/tvm/arith/iter_affine_map.h b/include/tvm/arith/iter_affine_map.h index 3e6226278580..5ac1bed4a7bd 100644 --- a/include/tvm/arith/iter_affine_map.h +++ b/include/tvm/arith/iter_affine_map.h @@ -66,7 +66,6 @@ namespace arith { */ class IterMapExprNode : public PrimExprNode { public: - static constexpr bool _type_has_method_visit_attrs = false; static constexpr const char* _type_key = "arith.IterMapExpr"; static constexpr const uint32_t _type_child_slots = 2; TVM_DECLARE_BASE_OBJECT_INFO(IterMapExprNode, PrimExprNode); @@ -106,8 +105,6 @@ class IterMarkNode : public Object { .def_ro("extent", &IterMarkNode::extent); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const IterMarkNode* other, SEqualReducer equal) const { equal->MarkGraphNode(); return equal(source, other->source) && equal(extent, other->extent); @@ -167,8 +164,6 @@ class IterSplitExprNode : public IterMapExprNode { .def_ro("scale", &IterSplitExprNode::scale); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const IterSplitExprNode* other, SEqualReducer equal) const { return equal(source, other->source) && equal(lower_factor, other->lower_factor) && equal(extent, other->extent) && equal(scale, other->scale); @@ -235,8 +230,6 @@ class IterSumExprNode : public IterMapExprNode { .def_ro("base", &IterSumExprNode::base); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const IterSumExprNode* other, SEqualReducer equal) const { return equal(args, other->args) && equal(base, other->base); } @@ -307,8 +300,6 @@ class IterMapResultNode : public Object { .def_ro("padding_predicate", &IterMapResultNode::padding_predicate); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "arith.IterMapResult"; TVM_DECLARE_FINAL_OBJECT_INFO(IterMapResultNode, Object); }; diff --git a/include/tvm/ir/attrs.h b/include/tvm/ir/attrs.h index 8715643d709a..bd27f50dbd48 100644 --- a/include/tvm/ir/attrs.h +++ b/include/tvm/ir/attrs.h @@ -82,7 +82,7 @@ class AttrFieldInfoNode : public Object { } static constexpr const char* _type_key = "ir.AttrFieldInfo"; - static constexpr bool _type_has_method_visit_attrs = false; + static constexpr bool _type_has_method_sequal_reduce = false; static constexpr bool _type_has_method_shash_reduce = false; TVM_DECLARE_FINAL_OBJECT_INFO(AttrFieldInfoNode, Object); diff --git a/include/tvm/ir/diagnostic.h b/include/tvm/ir/diagnostic.h index 29fd49384cf6..06d3efc5bd91 100644 --- a/include/tvm/ir/diagnostic.h +++ b/include/tvm/ir/diagnostic.h @@ -74,8 +74,6 @@ class DiagnosticNode : public Object { .def_ro("message", &DiagnosticNode::message); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const DiagnosticNode* other, SEqualReducer equal) const { return equal(this->level, other->level) && equal(this->span, other->span) && equal(this->message, other->message); @@ -174,8 +172,6 @@ class DiagnosticRendererNode : public Object { refl::ObjectDef().def_ro("renderer", &DiagnosticRendererNode::renderer); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "DiagnosticRenderer"; TVM_DECLARE_FINAL_OBJECT_INFO(DiagnosticRendererNode, Object); }; @@ -214,8 +210,6 @@ class DiagnosticContextNode : public Object { .def_ro("diagnostics", &DiagnosticContextNode::diagnostics); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const DiagnosticContextNode* other, SEqualReducer equal) const { return equal(module, other->module) && equal(diagnostics, other->diagnostics); } diff --git a/include/tvm/ir/env_func.h b/include/tvm/ir/env_func.h index aac4595e0628..095bb6d439f6 100644 --- a/include/tvm/ir/env_func.h +++ b/include/tvm/ir/env_func.h @@ -54,8 +54,6 @@ class EnvFuncNode : public Object { refl::ObjectDef().def_ro("name", &EnvFuncNode::name); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const EnvFuncNode* other, SEqualReducer equal) const { // name uniquely identifies the env function. return name == other->name; diff --git a/include/tvm/ir/global_info.h b/include/tvm/ir/global_info.h index 4583b858c7a9..8c199b3e9b1a 100644 --- a/include/tvm/ir/global_info.h +++ b/include/tvm/ir/global_info.h @@ -78,8 +78,6 @@ class VDeviceNode : public GlobalInfoNode { .def_ro("memory_scope", &VDeviceNode::memory_scope); } - static constexpr bool _type_has_method_visit_attrs = false; - TVM_DLL bool SEqualReduce(const VDeviceNode* other, SEqualReducer equal) const { return equal(target, other->target) && equal(vdevice_id, other->vdevice_id) && equal(memory_scope, other->memory_scope); @@ -114,8 +112,6 @@ class DummyGlobalInfoNode : public GlobalInfoNode { refl::ObjectDef(); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "ir.DummyGlobalInfo"; TVM_DLL bool SEqualReduce(const DummyGlobalInfoNode* other, SEqualReducer equal) const { diff --git a/include/tvm/ir/global_var_supply.h b/include/tvm/ir/global_var_supply.h index 29be4482c82f..35b429a72564 100644 --- a/include/tvm/ir/global_var_supply.h +++ b/include/tvm/ir/global_var_supply.h @@ -81,8 +81,6 @@ class GlobalVarSupplyNode : public Object { refl::ObjectDef(); } - static constexpr bool _type_has_method_visit_attrs = false; - /*! \brief The NameSupply used to generate unique name hints to GlobalVars. */ NameSupply name_supply_; diff --git a/include/tvm/ir/instrument.h b/include/tvm/ir/instrument.h index c571c09777fd..64bc78ff4a0e 100644 --- a/include/tvm/ir/instrument.h +++ b/include/tvm/ir/instrument.h @@ -142,8 +142,6 @@ class PassInstrumentNode : public Object { refl::ObjectDef().def_ro("name", &PassInstrumentNode::name); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "instrument.PassInstrument"; TVM_DECLARE_BASE_OBJECT_INFO(PassInstrumentNode, Object); }; diff --git a/include/tvm/ir/module.h b/include/tvm/ir/module.h index fa4086327e69..0d33b9308de6 100644 --- a/include/tvm/ir/module.h +++ b/include/tvm/ir/module.h @@ -140,8 +140,6 @@ class IRModuleNode : public Object { .def_ro("global_infos", &IRModuleNode::global_infos); } - static constexpr bool _type_has_method_visit_attrs = false; - TVM_DLL bool SEqualReduce(const IRModuleNode* other, SEqualReducer equal) const; TVM_DLL void SHashReduce(SHashReducer hash_reduce) const; diff --git a/include/tvm/ir/name_supply.h b/include/tvm/ir/name_supply.h index ad95c3171ed5..853bd8eb53af 100644 --- a/include/tvm/ir/name_supply.h +++ b/include/tvm/ir/name_supply.h @@ -81,8 +81,6 @@ class NameSupplyNode : public Object { */ bool ContainsName(const String& name, bool add_prefix = true); - static constexpr bool _type_has_method_visit_attrs = false; - // Prefix for all GlobalVar names. It can be empty. std::string prefix_; diff --git a/include/tvm/ir/op.h b/include/tvm/ir/op.h index eaf639a5a478..6d488cb9df50 100644 --- a/include/tvm/ir/op.h +++ b/include/tvm/ir/op.h @@ -103,8 +103,6 @@ class OpNode : public RelaxExprNode { .def_ro("support_level", &OpNode::support_level); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const OpNode* other, SEqualReducer equal) const { // pointer equality is fine as there is only one op with the same name. return this == other; diff --git a/include/tvm/ir/source_map.h b/include/tvm/ir/source_map.h index f888b6762336..86a8a4decd4d 100644 --- a/include/tvm/ir/source_map.h +++ b/include/tvm/ir/source_map.h @@ -53,8 +53,6 @@ class SourceNameNode : public Object { refl::ObjectDef().def_ro("name", &SourceNameNode::name); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr bool _type_has_method_sequal_reduce = true; bool SEqualReduce(const SourceNameNode* other, SEqualReducer equal) const { @@ -112,8 +110,6 @@ class SpanNode : public Object { .def_ro("end_column", &SpanNode::end_column); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr bool _type_has_method_sequal_reduce = true; bool SEqualReduce(const SpanNode* other, SEqualReducer equal) const { @@ -149,8 +145,6 @@ class SequentialSpanNode : public SpanNode { refl::ObjectDef().def_ro("spans", &SequentialSpanNode::spans); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "ir.SequentialSpan"; TVM_DECLARE_FINAL_OBJECT_INFO(SequentialSpanNode, SpanNode); @@ -206,8 +200,6 @@ class SourceNode : public Object { .def_ro("source", &SourceNode::source); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "ir.Source"; TVM_DECLARE_FINAL_OBJECT_INFO(SourceNode, Object); }; @@ -237,8 +229,6 @@ class SourceMapObj : public Object { refl::ObjectDef().def_ro("source_map", &SourceMapObj::source_map); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const SourceMapObj* other, SEqualReducer equal) const { return equal(source_map, other->source_map); } diff --git a/include/tvm/ir/transform.h b/include/tvm/ir/transform.h index 353f0a69cbf3..d5a3321407de 100644 --- a/include/tvm/ir/transform.h +++ b/include/tvm/ir/transform.h @@ -134,8 +134,6 @@ class PassContextNode : public Object { .def_ro("diag_ctx", &PassContextNode::diag_ctx); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "transform.PassContext"; static constexpr bool _type_has_method_sequal_reduce = false; TVM_DECLARE_FINAL_OBJECT_INFO(PassContextNode, Object); @@ -325,8 +323,6 @@ class PassInfoNode : public Object { .def_ro("traceable", &PassInfoNode::traceable); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "transform.PassInfo"; static constexpr bool _type_has_method_sequal_reduce = false; TVM_DECLARE_FINAL_OBJECT_INFO(PassInfoNode, Object); @@ -383,8 +379,6 @@ class PassNode : public Object { */ virtual IRModule operator()(IRModule mod, const PassContext& pass_ctx) const = 0; - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "transform.Pass"; TVM_DECLARE_BASE_OBJECT_INFO(PassNode, Object); }; @@ -448,8 +442,6 @@ class SequentialNode : public PassNode { .def_ro("passes", &SequentialNode::passes); } - static constexpr bool _type_has_method_visit_attrs = false; - /*! * \brief Get the pass information/meta data. */ diff --git a/include/tvm/ir/type.h b/include/tvm/ir/type.h index a07cdd5b9ebe..87a1174c931a 100644 --- a/include/tvm/ir/type.h +++ b/include/tvm/ir/type.h @@ -116,8 +116,6 @@ class PrimTypeNode : public TypeNode { refl::ObjectDef().def_ro("dtype", &PrimTypeNode::dtype); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const PrimTypeNode* other, SEqualReducer equal) const { return equal(dtype, other->dtype); } @@ -172,8 +170,6 @@ class PointerTypeNode : public TypeNode { .def_ro("storage_scope", &PointerTypeNode::storage_scope); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const PointerTypeNode* other, SEqualReducer equal) const { // Make "global" equal to "" String lhs_scope = storage_scope.empty() ? "global" : storage_scope; @@ -225,8 +221,6 @@ class TupleTypeNode : public TypeNode { .def_ro("span", &TupleTypeNode::span); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const TupleTypeNode* other, SEqualReducer equal) const { return equal(fields, other->fields); } @@ -296,8 +290,6 @@ class FuncTypeNode : public TypeNode { .def_ro("span", &FuncTypeNode::span); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const FuncTypeNode* other, SEqualReducer equal) const { // type params first as they defines type vars. return equal(arg_types, other->arg_types) && equal(ret_type, other->ret_type); @@ -341,8 +333,6 @@ class TensorMapTypeNode : public TypeNode { refl::ObjectDef().def_ro("span", &TensorMapTypeNode::span); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const TensorMapTypeNode* other, SEqualReducer equal) const { return equal(span, other->span); } diff --git a/include/tvm/meta_schedule/arg_info.h b/include/tvm/meta_schedule/arg_info.h index aa10bdf5e209..538fdc9d6ce8 100644 --- a/include/tvm/meta_schedule/arg_info.h +++ b/include/tvm/meta_schedule/arg_info.h @@ -91,8 +91,6 @@ class TensorInfoNode : public ArgInfoNode { .def_ro("shape", &TensorInfoNode::shape); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "meta_schedule.TensorInfo"; TVM_DECLARE_FINAL_OBJECT_INFO(TensorInfoNode, ArgInfoNode); diff --git a/include/tvm/meta_schedule/builder.h b/include/tvm/meta_schedule/builder.h index a603aed158f2..712cbbbe6e2a 100644 --- a/include/tvm/meta_schedule/builder.h +++ b/include/tvm/meta_schedule/builder.h @@ -52,8 +52,6 @@ class BuilderInputNode : public runtime::Object { .def_ro("params", &BuilderInputNode::params); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "meta_schedule.BuilderInput"; TVM_DECLARE_FINAL_OBJECT_INFO(BuilderInputNode, runtime::Object); }; @@ -90,8 +88,6 @@ class BuilderResultNode : public runtime::Object { .def_ro("error_msg", &BuilderResultNode::error_msg); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "meta_schedule.BuilderResult"; TVM_DECLARE_FINAL_OBJECT_INFO(BuilderResultNode, runtime::Object); }; @@ -159,8 +155,6 @@ class PyBuilderNode : public BuilderNode { refl::ObjectDef().def_ro("f_build", &PyBuilderNode::f_build); } - static constexpr bool _type_has_method_visit_attrs = false; - Array Build(const Array& build_inputs) final { ICHECK(f_build != nullptr) << "PyBuilder's Build method not implemented!"; return f_build(build_inputs); diff --git a/include/tvm/meta_schedule/cost_model.h b/include/tvm/meta_schedule/cost_model.h index 5e9a62274058..32a6d441b4f4 100644 --- a/include/tvm/meta_schedule/cost_model.h +++ b/include/tvm/meta_schedule/cost_model.h @@ -74,7 +74,6 @@ class CostModelNode : public runtime::Object { virtual std::vector Predict(const TuneContext& context, const Array& candidates) = 0; - static constexpr bool _type_has_method_visit_attrs = false; static constexpr const char* _type_key = "meta_schedule.CostModel"; TVM_DECLARE_BASE_OBJECT_INFO(CostModelNode, Object); }; @@ -133,8 +132,6 @@ class PyCostModelNode : public CostModelNode { std::vector Predict(const TuneContext& context, const Array& candidates); - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "meta_schedule.PyCostModel"; TVM_DECLARE_FINAL_OBJECT_INFO(PyCostModelNode, CostModelNode); }; diff --git a/include/tvm/meta_schedule/task_scheduler.h b/include/tvm/meta_schedule/task_scheduler.h index d88a2cc00c72..75529e835d88 100644 --- a/include/tvm/meta_schedule/task_scheduler.h +++ b/include/tvm/meta_schedule/task_scheduler.h @@ -75,8 +75,6 @@ class TaskRecordNode : public runtime::Object { .def_ro("runner_futures", &TaskRecordNode::runner_futures); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "meta_schedule.TaskRecord"; TVM_DECLARE_FINAL_OBJECT_INFO(TaskRecordNode, Object); }; @@ -157,8 +155,6 @@ class TaskSchedulerNode : public runtime::Object { .def_ro("remaining_tasks_", &TaskSchedulerNode::remaining_tasks_); } - static constexpr bool _type_has_method_visit_attrs = false; - /*! * \brief Fetch the next task id. * \return The next task id. @@ -249,8 +245,6 @@ class PyTaskSchedulerNode : public TaskSchedulerNode { refl::ObjectDef(); } - static constexpr bool _type_has_method_visit_attrs = false; - int NextTaskId() final; Array JoinRunningTask(int task_id) final; void Tune(Array tasks, Array task_weights, int max_trials_global, diff --git a/include/tvm/node/script_printer.h b/include/tvm/node/script_printer.h index 5fa54c5c8136..af1e015d7bc3 100644 --- a/include/tvm/node/script_printer.h +++ b/include/tvm/node/script_printer.h @@ -147,8 +147,6 @@ class PrinterConfigNode : public Object { .def_ro("obj_to_annotate", &PrinterConfigNode::obj_to_annotate); } - static constexpr bool _type_has_method_visit_attrs = false; - Array GetBuiltinKeywords(); static constexpr const char* _type_key = "script.PrinterConfig"; diff --git a/include/tvm/relax/binding_rewrite.h b/include/tvm/relax/binding_rewrite.h index 6c017ccc3446..a5f476eb7031 100644 --- a/include/tvm/relax/binding_rewrite.h +++ b/include/tvm/relax/binding_rewrite.h @@ -75,8 +75,6 @@ class DataflowBlockRewriteNode : public Object { .def_ro("root_fn", &DataflowBlockRewriteNode::root_fn_); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "relax.DataflowBlockRewrite"; TVM_DECLARE_FINAL_OBJECT_INFO(DataflowBlockRewriteNode, Object); diff --git a/include/tvm/relax/dataflow_pattern.h b/include/tvm/relax/dataflow_pattern.h index 5e4a002467bf..57049e704291 100644 --- a/include/tvm/relax/dataflow_pattern.h +++ b/include/tvm/relax/dataflow_pattern.h @@ -221,7 +221,6 @@ class PatternSeqNode final : public Object { refl::ObjectDef().def_ro("patterns", &PatternSeqNode::patterns); } - static constexpr bool _type_has_method_visit_attrs = false; static constexpr const char* _type_key = "relax.dpl.PatternSeq"; TVM_DECLARE_BASE_OBJECT_INFO(PatternSeqNode, Object); }; @@ -354,7 +353,6 @@ class ExprPatternNode : public DFPatternNode { refl::ObjectDef().def_ro("expr", &ExprPatternNode::expr); } - static constexpr bool _type_has_method_visit_attrs = false; static constexpr const char* _type_key = "relax.dpl.ExprPattern"; TVM_DECLARE_FINAL_OBJECT_INFO(ExprPatternNode, DFPatternNode); }; @@ -384,7 +382,6 @@ class VarPatternNode : public DFPatternNode { refl::ObjectDef().def_ro("name", &VarPatternNode::name); } - static constexpr bool _type_has_method_visit_attrs = false; static constexpr const char* _type_key = "relax.dpl.VarPattern"; static constexpr const uint32_t _type_child_slots = 1; TVM_DECLARE_BASE_OBJECT_INFO(VarPatternNode, DFPatternNode); @@ -462,7 +459,6 @@ class ConstantPatternNode : public DFPatternNode { refl::ObjectDef(); } - static constexpr bool _type_has_method_visit_attrs = false; static constexpr const char* _type_key = "relax.dpl.ConstantPattern"; TVM_DECLARE_FINAL_OBJECT_INFO(ConstantPatternNode, DFPatternNode); }; @@ -506,8 +502,6 @@ class CallPatternNode : public DFPatternNode { .def_ro("args", &CallPatternNode::args); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "relax.dpl.CallPattern"; TVM_DECLARE_FINAL_OBJECT_INFO(CallPatternNode, DFPatternNode); }; @@ -532,7 +526,6 @@ class PrimArrPatternNode : public DFPatternNode { refl::ObjectDef().def_ro("fields", &PrimArrPatternNode::fields); } - static constexpr bool _type_has_method_visit_attrs = false; static constexpr const char* _type_key = "relax.dpl.PrimArrPattern"; TVM_DECLARE_FINAL_OBJECT_INFO(PrimArrPatternNode, DFPatternNode); }; @@ -570,8 +563,6 @@ class FunctionPatternNode : public DFPatternNode { .def_ro("body", &FunctionPatternNode::body); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "relax.dpl.FunctionPattern"; TVM_DECLARE_FINAL_OBJECT_INFO(FunctionPatternNode, DFPatternNode); }; @@ -605,7 +596,6 @@ class TuplePatternNode : public DFPatternNode { refl::ObjectDef().def_ro("fields", &TuplePatternNode::fields); } - static constexpr bool _type_has_method_visit_attrs = false; static constexpr const char* _type_key = "relax.dpl.TuplePattern"; TVM_DECLARE_FINAL_OBJECT_INFO(TuplePatternNode, DFPatternNode); }; @@ -634,7 +624,6 @@ class UnorderedTuplePatternNode : public DFPatternNode { &UnorderedTuplePatternNode::fields); } - static constexpr bool _type_has_method_visit_attrs = false; static constexpr const char* _type_key = "relax.dpl.UnorderedTuplePattern"; TVM_DECLARE_FINAL_OBJECT_INFO(UnorderedTuplePatternNode, DFPatternNode); }; @@ -666,7 +655,6 @@ class TupleGetItemPatternNode : public DFPatternNode { .def_ro("index", &TupleGetItemPatternNode::index); } - static constexpr bool _type_has_method_visit_attrs = false; static constexpr const char* _type_key = "relax.dpl.TupleGetItemPattern"; TVM_DECLARE_FINAL_OBJECT_INFO(TupleGetItemPatternNode, DFPatternNode); }; @@ -697,8 +685,6 @@ class AndPatternNode : public DFPatternNode { .def_ro("right", &AndPatternNode::right); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "relax.dpl.AndPattern"; TVM_DECLARE_FINAL_OBJECT_INFO(AndPatternNode, DFPatternNode); }; @@ -729,8 +715,6 @@ class OrPatternNode : public DFPatternNode { .def_ro("right", &OrPatternNode::right); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "relax.dpl.OrPattern"; TVM_DECLARE_FINAL_OBJECT_INFO(OrPatternNode, DFPatternNode); }; @@ -758,8 +742,6 @@ class NotPatternNode : public DFPatternNode { refl::ObjectDef().def_ro("reject", &NotPatternNode::reject); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "relax.dpl.NotPattern"; TVM_DECLARE_FINAL_OBJECT_INFO(NotPatternNode, DFPatternNode); }; @@ -785,7 +767,6 @@ class WildcardPatternNode : public DFPatternNode { refl::ObjectDef(); } - static constexpr bool _type_has_method_visit_attrs = false; static constexpr const char* _type_key = "relax.dpl.WildcardPattern"; TVM_DECLARE_FINAL_OBJECT_INFO(WildcardPatternNode, DFPatternNode); }; @@ -822,8 +803,6 @@ class StructInfoPatternNode : public DFPatternNode { .def_ro("struct_info", &StructInfoPatternNode::struct_info); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "relax.dpl.StructInfoPattern"; TVM_DECLARE_FINAL_OBJECT_INFO(StructInfoPatternNode, DFPatternNode); }; @@ -850,8 +829,6 @@ class ShapePatternNode : public DFPatternNode { .def_ro("shape", &ShapePatternNode::shape); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "relax.dpl.ShapePattern"; TVM_DECLARE_FINAL_OBJECT_INFO(ShapePatternNode, DFPatternNode); }; @@ -884,8 +861,6 @@ class SameShapeConstraintNode : public DFConstraintNode { refl::ObjectDef().def_ro("args", &SameShapeConstraintNode::args); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "relax.dpl.SameShapeConstraint"; TVM_DECLARE_FINAL_OBJECT_INFO(SameShapeConstraintNode, DFConstraintNode); }; @@ -916,8 +891,6 @@ class DataTypePatternNode : public DFPatternNode { .def_ro("dtype", &DataTypePatternNode::dtype); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "relax.dpl.DataTypePattern"; TVM_DECLARE_FINAL_OBJECT_INFO(DataTypePatternNode, DFPatternNode); }; @@ -948,8 +921,6 @@ class AttrPatternNode : public DFPatternNode { .def_ro("attrs", &AttrPatternNode::attrs); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "relax.dpl.AttrPattern"; TVM_DECLARE_FINAL_OBJECT_INFO(AttrPatternNode, DFPatternNode); }; @@ -982,8 +953,6 @@ class ExternFuncPatternNode : public DFPatternNode { &ExternFuncPatternNode::global_symbol_); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "relax.dpl.ExternFuncPattern"; TVM_DECLARE_FINAL_OBJECT_INFO(ExternFuncPatternNode, DFPatternNode); }; diff --git a/include/tvm/relax/distributed/global_info.h b/include/tvm/relax/distributed/global_info.h index 3b9663d04ba4..89cdec14b0d8 100644 --- a/include/tvm/relax/distributed/global_info.h +++ b/include/tvm/relax/distributed/global_info.h @@ -53,8 +53,6 @@ class DeviceMeshNode : public GlobalInfoNode { .def_ro("device_range", &DeviceMeshNode::device_range); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "relax.distributed.DeviceMesh"; bool SEqualReduce(const DeviceMeshNode* other, SEqualReducer equal) const { diff --git a/include/tvm/relax/distributed/struct_info.h b/include/tvm/relax/distributed/struct_info.h index f1dba2312206..3b4a4a0d1d2a 100644 --- a/include/tvm/relax/distributed/struct_info.h +++ b/include/tvm/relax/distributed/struct_info.h @@ -51,8 +51,6 @@ class PlacementSpecNode : public Object { .def_ro("kind", &PlacementSpecNode::kind); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const PlacementSpecNode* other, SEqualReducer equal) const { return equal(axis, other->axis) && equal(kind, other->kind); } @@ -91,8 +89,6 @@ class ShardingNode : public PlacementSpecNode { refl::ObjectDef().def_ro("sharding_dim", &ShardingNode::sharding_dim); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const ShardingNode* other, SEqualReducer equal) const { return equal(sharding_dim, other->sharding_dim); } @@ -115,8 +111,6 @@ class PlacementNode : public Object { refl::ObjectDef().def_ro("dim_specs", &PlacementNode::dim_specs); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const PlacementNode* other, SEqualReducer equal) const { return equal(dim_specs, other->dim_specs); } @@ -167,8 +161,6 @@ class DTensorStructInfoNode : public StructInfoNode { .def_ro("tensor_sinfo", &DTensorStructInfoNode::tensor_sinfo); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const DTensorStructInfoNode* other, SEqualReducer equal) const { return equal(tensor_sinfo, other->tensor_sinfo) && equal(device_mesh, other->device_mesh) && equal(placement, other->placement); diff --git a/include/tvm/relax/exec_builder.h b/include/tvm/relax/exec_builder.h index 616982e78750..92664f572eba 100644 --- a/include/tvm/relax/exec_builder.h +++ b/include/tvm/relax/exec_builder.h @@ -143,8 +143,6 @@ class ExecBuilderNode : public Object { refl::ObjectDef(); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "relax.ExecBuilder"; TVM_DECLARE_FINAL_OBJECT_INFO(ExecBuilderNode, Object); diff --git a/include/tvm/relax/expr.h b/include/tvm/relax/expr.h index df512186696e..20d899925d7e 100644 --- a/include/tvm/relax/expr.h +++ b/include/tvm/relax/expr.h @@ -60,8 +60,6 @@ class IdNode : public Object { refl::ObjectDef().def_ro("name_hint", &IdNode::name_hint); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const IdNode* other, SEqualReducer equal) const { return equal.FreeVarEqualImpl(this, other); } @@ -175,8 +173,6 @@ class CallNode : public ExprNode { .def_ro("sinfo_args", &CallNode::sinfo_args); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const CallNode* other, SEqualReducer equal) const { // skip sinfo_args check for primitive ops. return equal(op, other->op) && equal(args, other->args) && equal(attrs, other->attrs) && @@ -234,8 +230,6 @@ class TupleNode : public ExprNode { refl::ObjectDef().def_ro("fields", &TupleNode::fields); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const TupleNode* other, SEqualReducer equal) const { // struct info can be deterministically derived from fields. return equal(fields, other->fields); @@ -301,8 +295,6 @@ class TupleGetItemNode : public ExprNode { .def_ro("index", &TupleGetItemNode::index); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const TupleGetItemNode* other, SEqualReducer equal) const { // struct info can be deterministically tuple and index. return equal(tuple, other->tuple) && equal(index, other->index); @@ -372,8 +364,6 @@ class ShapeExprNode : public LeafExprNode { refl::ObjectDef().def_ro("values", &ShapeExprNode::values); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const ShapeExprNode* other, SEqualReducer equal) const { // struct info can be deterministically derived from values. return equal(values, other->values); @@ -409,8 +399,6 @@ class VarNode : public LeafExprNode { refl::ObjectDef().def_ro("vid", &VarNode::vid); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const VarNode* other, SEqualReducer equal) const { equal->MarkGraphNode(); return equal(vid, other->vid) && equal(struct_info_, other->struct_info_); @@ -450,8 +438,6 @@ class DataflowVarNode : public VarNode { refl::ObjectDef(); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const DataflowVarNode* other, SEqualReducer equal) const { equal->MarkGraphNode(); return equal(vid, other->vid) && equal(struct_info_, other->struct_info_); @@ -502,8 +488,6 @@ class ConstantNode : public LeafExprNode { refl::ObjectDef().def_ro("data", &ConstantNode::data); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const ConstantNode* other, SEqualReducer equal) const { // struct info can be deterministically derived from data. return equal(data, other->data) && equal(struct_info_, other->struct_info_); @@ -550,8 +534,6 @@ class PrimValueNode : public LeafExprNode { refl::ObjectDef().def_ro("value", &PrimValueNode::value); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const PrimValueNode* other, SEqualReducer equal) const { // struct info can be deterministically derived from data. return equal(value, other->value); @@ -601,8 +583,6 @@ class StringImmNode : public LeafExprNode { refl::ObjectDef().def_ro("value", &StringImmNode::value); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const StringImmNode* other, SEqualReducer equal) const { // struct info can be deterministically derived from data. return equal(value, other->value); @@ -644,8 +624,6 @@ class DataTypeImmNode : public LeafExprNode { refl::ObjectDef().def_ro("value", &DataTypeImmNode::value); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const DataTypeImmNode* other, SEqualReducer equal) const { // struct info can be deterministically derived from data. return equal(value, other->value); @@ -687,7 +665,6 @@ class BindingNode : public Object { .def_ro("var", &BindingNode::var) .def_ro("span", &BindingNode::span); } - static constexpr bool _type_has_method_visit_attrs = false; static constexpr const char* _type_key = "relax.expr.Binding"; static constexpr const bool _type_has_method_sequal_reduce = true; @@ -729,8 +706,6 @@ class MatchCastNode : public BindingNode { .def_ro("struct_info", &MatchCastNode::struct_info); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const MatchCastNode* other, SEqualReducer equal) const; void SHashReduce(SHashReducer hash_reduce) const; @@ -764,8 +739,6 @@ class VarBindingNode : public BindingNode { .def_ro("value", &VarBindingNode::value); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const VarBindingNode* other, SEqualReducer equal) const; void SHashReduce(SHashReducer hash_reduce) const; @@ -792,8 +765,6 @@ class BindingBlockNode : public Object { refl::ObjectDef().def_ro("bindings", &BindingBlockNode::bindings); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const BindingBlockNode* other, SEqualReducer equal) const { return equal(bindings, other->bindings); } @@ -856,8 +827,6 @@ class SeqExprNode : public ExprNode { .def_ro("body", &SeqExprNode::body); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const SeqExprNode* other, SEqualReducer equal) const { return equal(blocks, other->blocks) && equal(body, other->body) && equal(struct_info_, other->struct_info_); @@ -923,8 +892,6 @@ class IfNode : public ExprNode { .def_ro("false_branch", &IfNode::false_branch); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const IfNode* other, SEqualReducer equal) const { equal->MarkGraphNode(); return equal(cond, other->cond) && equal(true_branch, other->true_branch) && @@ -999,8 +966,6 @@ class FunctionNode : public BaseFuncNode { .def_ro("is_pure", &FunctionNode::is_pure); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const FunctionNode* other, SEqualReducer equal) const { equal->MarkGraphNode(); return equal.DefEqual(params, other->params) && equal(body, other->body) && @@ -1104,8 +1069,6 @@ class ExternFuncNode : public BaseFuncNode { refl::ObjectDef().def_ro("global_symbol", &ExternFuncNode::global_symbol); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const ExternFuncNode* other, SEqualReducer equal) const { return equal(global_symbol, other->global_symbol) && equal(struct_info_, other->struct_info_); } diff --git a/include/tvm/relax/struct_info.h b/include/tvm/relax/struct_info.h index 689586838009..acb4ff51e98d 100644 --- a/include/tvm/relax/struct_info.h +++ b/include/tvm/relax/struct_info.h @@ -40,8 +40,6 @@ class ObjectStructInfoNode : public StructInfoNode { refl::ObjectDef(); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const ObjectStructInfoNode* other, SEqualReducer equal) const { return true; } void SHashReduce(SHashReducer hash_reduce) const { hash_reduce(0); } @@ -79,8 +77,6 @@ class PrimStructInfoNode : public StructInfoNode { .def_ro("dtype", &PrimStructInfoNode::dtype); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const PrimStructInfoNode* other, SEqualReducer equal) const { return equal(value, other->value) && equal(dtype, other->dtype); } @@ -132,8 +128,6 @@ class ShapeStructInfoNode : public StructInfoNode { .def_ro("ndim", &ShapeStructInfoNode::ndim); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const ShapeStructInfoNode* other, SEqualReducer equal) const { return equal(values, other->values) && equal(ndim, other->ndim); } @@ -213,8 +207,6 @@ class TensorStructInfoNode : public StructInfoNode { .def_ro("ndim", &TensorStructInfoNode::ndim); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const TensorStructInfoNode* other, SEqualReducer equal) const { return equal(shape, other->shape) && equal(ndim, other->ndim) && equal(vdevice, other->vdevice) && equal(dtype, other->dtype); @@ -275,8 +267,6 @@ class TupleStructInfoNode : public StructInfoNode { refl::ObjectDef().def_ro("fields", &TupleStructInfoNode::fields); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const TupleStructInfoNode* other, SEqualReducer equal) const { return equal(fields, other->fields); } @@ -357,8 +347,6 @@ class FuncStructInfoNode : public StructInfoNode { .def_ro("purity", &FuncStructInfoNode::purity); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const FuncStructInfoNode* other, SEqualReducer equal) const { return equal.DefEqual(params, other->params) && equal(ret, other->ret) && equal(purity, other->purity) && equal(derive_func, other->derive_func); diff --git a/include/tvm/relax/tir_pattern.h b/include/tvm/relax/tir_pattern.h index d39dcc2f0002..f3a0bdc54337 100644 --- a/include/tvm/relax/tir_pattern.h +++ b/include/tvm/relax/tir_pattern.h @@ -53,8 +53,6 @@ class MatchResultNode : public Object { .def_ro("matched_buffers", &MatchResultNode::matched_buffers); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "relax.MatchResult"; TVM_DECLARE_FINAL_OBJECT_INFO(MatchResultNode, Object); }; diff --git a/include/tvm/relax/transform.h b/include/tvm/relax/transform.h index 27f226042864..dd3e2c350e6e 100644 --- a/include/tvm/relax/transform.h +++ b/include/tvm/relax/transform.h @@ -405,8 +405,6 @@ class FusionPatternNode : public Object { .def_ro("attrs_getter", &FusionPatternNode::attrs_getter); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "relax.transform.FusionPattern"; TVM_DECLARE_FINAL_OBJECT_INFO(FusionPatternNode, Object); }; @@ -466,8 +464,6 @@ class PatternCheckContextNode : public Object { .def_ro("value_to_bound_var", &PatternCheckContextNode::value_to_bound_var); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "relax.transform.PatternCheckContext"; TVM_DECLARE_FINAL_OBJECT_INFO(PatternCheckContextNode, Object); }; diff --git a/include/tvm/relax/type.h b/include/tvm/relax/type.h index 753330caf1d6..39350ef79798 100644 --- a/include/tvm/relax/type.h +++ b/include/tvm/relax/type.h @@ -49,8 +49,6 @@ class ShapeTypeNode : public TypeNode { refl::ObjectDef().def_ro("ndim", &ShapeTypeNode::ndim); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const ShapeTypeNode* other, SEqualReducer equal) const { return equal(ndim, other->ndim); } @@ -91,8 +89,6 @@ class TensorTypeNode : public TypeNode { .def_ro("dtype", &TensorTypeNode::dtype); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const TensorTypeNode* other, SEqualReducer equal) const { return equal(ndim, other->ndim) && equal(dtype, other->dtype); } @@ -142,8 +138,6 @@ class ObjectTypeNode : public TypeNode { refl::ObjectDef(); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const ObjectTypeNode* other, SEqualReducer equal) const { return true; } void SHashReduce(SHashReducer hash_reduce) const { hash_reduce(0); } @@ -166,8 +160,6 @@ class PackedFuncTypeNode : public TypeNode { refl::ObjectDef(); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const PackedFuncTypeNode* other, SEqualReducer equal) const { return true; } void SHashReduce(SHashReducer hash_reduce) const { hash_reduce(0); } diff --git a/include/tvm/script/ir_builder/base.h b/include/tvm/script/ir_builder/base.h index 4fe5c519eedb..e16aa2237da2 100644 --- a/include/tvm/script/ir_builder/base.h +++ b/include/tvm/script/ir_builder/base.h @@ -73,8 +73,6 @@ class IRBuilderFrameNode : public runtime::Object { // `callbacks` is not registered as it's not visited. } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "script.ir_builder.IRBuilderFrame"; TVM_DECLARE_BASE_OBJECT_INFO(IRBuilderFrameNode, runtime::Object); @@ -170,8 +168,6 @@ class IRBuilderNode : public runtime::Object { .def_ro("result", &IRBuilderNode::result); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "script.ir_builder.IRBuilder"; TVM_DECLARE_FINAL_OBJECT_INFO(IRBuilderNode, runtime::Object); diff --git a/include/tvm/script/ir_builder/ir/frame.h b/include/tvm/script/ir_builder/ir/frame.h index 764ff0507b04..5f92f209a535 100644 --- a/include/tvm/script/ir_builder/ir/frame.h +++ b/include/tvm/script/ir_builder/ir/frame.h @@ -61,8 +61,6 @@ class IRModuleFrameNode : public IRBuilderFrameNode { .def_ro("global_infos", &IRModuleFrameNode::global_infos); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "script.ir_builder.IRModuleFrame"; TVM_DECLARE_FINAL_OBJECT_INFO(IRModuleFrameNode, IRBuilderFrameNode); diff --git a/include/tvm/script/ir_builder/relax/frame.h b/include/tvm/script/ir_builder/relax/frame.h index a56e5305535e..12e59d31403b 100644 --- a/include/tvm/script/ir_builder/relax/frame.h +++ b/include/tvm/script/ir_builder/relax/frame.h @@ -39,8 +39,6 @@ class RelaxFrameNode : public IRBuilderFrameNode { refl::ObjectDef(); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "script.ir_builder.relax.RelaxFrame"; TVM_DECLARE_BASE_OBJECT_INFO(RelaxFrameNode, IRBuilderFrameNode); }; @@ -70,8 +68,6 @@ class SeqExprFrameNode : public RelaxFrameNode { .def_ro("output", &SeqExprFrameNode::output); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "script.ir_builder.relax.SeqExprFrame"; TVM_DECLARE_BASE_OBJECT_INFO(SeqExprFrameNode, RelaxFrameNode); @@ -128,8 +124,6 @@ class FunctionFrameNode : public SeqExprFrameNode { // `block_builder` is not registered as it's not visited. } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "script.ir_builder.relax.FunctionFrame"; TVM_DECLARE_FINAL_OBJECT_INFO(FunctionFrameNode, SeqExprFrameNode); @@ -171,8 +165,6 @@ class BlockFrameNode : public RelaxFrameNode { // `block_ended` is not registered as it's not visited. } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "script.ir_builder.relax.BlockFrame"; TVM_DECLARE_FINAL_OBJECT_INFO(BlockFrameNode, RelaxFrameNode); @@ -214,8 +206,6 @@ class IfFrameNode : public RelaxFrameNode { .def_ro("var_name", &IfFrameNode::var_name); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "script.ir_builder.relax.IfFrame"; TVM_DECLARE_FINAL_OBJECT_INFO(IfFrameNode, RelaxFrameNode); @@ -254,8 +244,6 @@ class ThenFrameNode : public SeqExprFrameNode { refl::ObjectDef(); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "script.ir_builder.relax.ThenFrame"; TVM_DECLARE_FINAL_OBJECT_INFO(ThenFrameNode, SeqExprFrameNode); @@ -294,8 +282,6 @@ class ElseFrameNode : public SeqExprFrameNode { refl::ObjectDef(); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "script.ir_builder.relax.ElseFrame"; TVM_DECLARE_FINAL_OBJECT_INFO(ElseFrameNode, SeqExprFrameNode); diff --git a/include/tvm/script/ir_builder/tir/frame.h b/include/tvm/script/ir_builder/tir/frame.h index c3d3d46e7f98..e9087588ffb6 100644 --- a/include/tvm/script/ir_builder/tir/frame.h +++ b/include/tvm/script/ir_builder/tir/frame.h @@ -43,8 +43,6 @@ class TIRFrameNode : public IRBuilderFrameNode { refl::ObjectDef().def_ro("stmts", &TIRFrameNode::stmts); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "script.ir_builder.tir.TIRFrame"; TVM_DECLARE_BASE_OBJECT_INFO(TIRFrameNode, IRBuilderFrameNode); }; @@ -99,8 +97,6 @@ class PrimFuncFrameNode : public TIRFrameNode { .def_ro("root_alloc_buffers", &PrimFuncFrameNode::root_alloc_buffers); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "script.ir_builder.tir.PrimFuncFrame"; TVM_DECLARE_FINAL_OBJECT_INFO(PrimFuncFrameNode, TIRFrameNode); @@ -171,8 +167,6 @@ class BlockFrameNode : public TIRFrameNode { .def_ro("no_realize", &BlockFrameNode::no_realize); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "script.ir_builder.tir.BlockFrame"; TVM_DECLARE_FINAL_OBJECT_INFO(BlockFrameNode, TIRFrameNode); @@ -207,8 +201,6 @@ class BlockInitFrameNode : public TIRFrameNode { refl::ObjectDef(); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "script.ir_builder.tir.BlockInitFrame"; TVM_DECLARE_FINAL_OBJECT_INFO(BlockInitFrameNode, TIRFrameNode); @@ -266,8 +258,6 @@ class ForFrameNode : public TIRFrameNode { // `f_make_for_loop` is not registered as it's not visited. } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "script.ir_builder.tir.ForFrame"; TVM_DECLARE_FINAL_OBJECT_INFO(ForFrameNode, TIRFrameNode); @@ -309,8 +299,6 @@ class AssertFrameNode : public TIRFrameNode { .def_ro("message", &AssertFrameNode::message); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "script.ir_builder.tir.AssertFrame"; TVM_DECLARE_FINAL_OBJECT_INFO(AssertFrameNode, TIRFrameNode); @@ -351,8 +339,6 @@ class LetFrameNode : public TIRFrameNode { .def_ro("value", &LetFrameNode::value); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "script.ir_builder.tir.LetFrame"; TVM_DECLARE_FINAL_OBJECT_INFO(LetFrameNode, TIRFrameNode); @@ -395,8 +381,6 @@ class LaunchThreadFrameNode : public TIRFrameNode { .def_ro("iter_var", &LaunchThreadFrameNode::iter_var); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "script.ir_builder.tir.LaunchThreadFrame"; TVM_DECLARE_FINAL_OBJECT_INFO(LaunchThreadFrameNode, TIRFrameNode); @@ -441,8 +425,6 @@ class RealizeFrameNode : public TIRFrameNode { .def_ro("condition", &RealizeFrameNode::condition); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "script.ir_builder.tir.RealizeFrame"; TVM_DECLARE_FINAL_OBJECT_INFO(RealizeFrameNode, TIRFrameNode); @@ -495,8 +477,6 @@ class AllocateFrameNode : public TIRFrameNode { .def_ro("buffer_var", &AllocateFrameNode::buffer_var); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "script.ir_builder.tir.AllocateFrame"; TVM_DECLARE_FINAL_OBJECT_INFO(AllocateFrameNode, TIRFrameNode); @@ -546,8 +526,6 @@ class AllocateConstFrameNode : public TIRFrameNode { .def_ro("annotations", &AllocateConstFrameNode::annotations); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "script.ir_builder.tir.AllocateConstFrame"; TVM_DECLARE_FINAL_OBJECT_INFO(AllocateConstFrameNode, TIRFrameNode); @@ -591,8 +569,6 @@ class AttrFrameNode : public TIRFrameNode { .def_ro("value", &AttrFrameNode::value); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "script.ir_builder.tir.AttrFrame"; TVM_DECLARE_FINAL_OBJECT_INFO(AttrFrameNode, TIRFrameNode); @@ -629,8 +605,6 @@ class WhileFrameNode : public TIRFrameNode { refl::ObjectDef().def_ro("condition", &WhileFrameNode::condition); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "script.ir_builder.tir.WhileFrame"; TVM_DECLARE_FINAL_OBJECT_INFO(WhileFrameNode, TIRFrameNode); @@ -674,8 +648,6 @@ class IfFrameNode : public TIRFrameNode { .def_ro("else_stmts", &IfFrameNode::else_stmts); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "script.ir_builder.tir.IfFrame"; TVM_DECLARE_FINAL_OBJECT_INFO(IfFrameNode, TIRFrameNode); @@ -709,8 +681,6 @@ class ThenFrameNode : public TIRFrameNode { refl::ObjectDef(); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "script.ir_builder.tir.ThenFrame"; TVM_DECLARE_FINAL_OBJECT_INFO(ThenFrameNode, TIRFrameNode); @@ -749,8 +719,6 @@ class ElseFrameNode : public TIRFrameNode { refl::ObjectDef(); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "script.ir_builder.tir.ElseFrame"; TVM_DECLARE_FINAL_OBJECT_INFO(ElseFrameNode, TIRFrameNode); @@ -791,8 +759,6 @@ class DeclBufferFrameNode : public TIRFrameNode { .def_ro("allocated", &DeclBufferFrameNode::allocated); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "script.ir_builder.tir.DeclBufferFrame"; TVM_DECLARE_FINAL_OBJECT_INFO(DeclBufferFrameNode, TIRFrameNode); diff --git a/include/tvm/tir/block_dependence_info.h b/include/tvm/tir/block_dependence_info.h index c45f095dfe43..b4fbf1a593f5 100644 --- a/include/tvm/tir/block_dependence_info.h +++ b/include/tvm/tir/block_dependence_info.h @@ -66,8 +66,6 @@ class BlockDependenceInfoNode : public Object { refl::ObjectDef(); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "tir.BlockDependenceInfo"; TVM_DECLARE_FINAL_OBJECT_INFO(BlockDependenceInfoNode, Object); diff --git a/include/tvm/tir/block_scope.h b/include/tvm/tir/block_scope.h index 0035a230c173..9ea77d7b9b46 100644 --- a/include/tvm/tir/block_scope.h +++ b/include/tvm/tir/block_scope.h @@ -72,8 +72,6 @@ class StmtSRefNode : public Object { refl::ObjectDef().def_ro("seq_index", &StmtSRefNode::seq_index); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "tir.StmtSRef"; TVM_DECLARE_FINAL_OBJECT_INFO(StmtSRefNode, Object); @@ -229,8 +227,6 @@ class DependencyNode : public Object { .def_ro("kind", &DependencyNode::kind); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "tir.Dependency"; TVM_DECLARE_FINAL_OBJECT_INFO(DependencyNode, Object); }; @@ -276,8 +272,6 @@ class BlockScopeNode : public Object { // No fields to register as they are not visited } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "tir.BlockScope"; TVM_DECLARE_FINAL_OBJECT_INFO(BlockScopeNode, Object); diff --git a/include/tvm/tir/buffer.h b/include/tvm/tir/buffer.h index 12afbc510101..992cb2f2e03f 100644 --- a/include/tvm/tir/buffer.h +++ b/include/tvm/tir/buffer.h @@ -128,8 +128,6 @@ class BufferNode : public Object { .def_ro("span", &BufferNode::span); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const BufferNode* other, SEqualReducer equal) const { // Use DefEqual as buffer can define variables in its semantics, // skip name as name is not important. diff --git a/include/tvm/tir/data_layout.h b/include/tvm/tir/data_layout.h index 1643ccb60bb2..d1c026079c7e 100644 --- a/include/tvm/tir/data_layout.h +++ b/include/tvm/tir/data_layout.h @@ -115,8 +115,6 @@ class LayoutNode : public Object { .def_ro("axes", &LayoutNode::axes); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "tir.Layout"; TVM_DECLARE_FINAL_OBJECT_INFO(LayoutNode, Object); }; @@ -326,8 +324,6 @@ class BijectiveLayoutNode : public Object { .def_ro("shape_backward_rule", &BijectiveLayoutNode::shape_backward_rule); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "tir.BijectiveLayout"; TVM_DECLARE_FINAL_OBJECT_INFO(BijectiveLayoutNode, Object); }; diff --git a/include/tvm/tir/function.h b/include/tvm/tir/function.h index 6bcb35d38dba..ead03e967663 100644 --- a/include/tvm/tir/function.h +++ b/include/tvm/tir/function.h @@ -109,8 +109,6 @@ class PrimFuncNode : public BaseFuncNode { .def_ro("buffer_map", &PrimFuncNode::buffer_map); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const PrimFuncNode* other, SEqualReducer equal) const { // visit params and buffer_map first as they contains defs. return equal.DefEqual(params, other->params) && equal(buffer_map, other->buffer_map) && @@ -189,8 +187,6 @@ class TensorIntrinNode : public Object { .def_ro("impl", &TensorIntrinNode::impl); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "tir.TensorIntrin"; TVM_DECLARE_FINAL_OBJECT_INFO(TensorIntrinNode, Object); }; diff --git a/include/tvm/tir/index_map.h b/include/tvm/tir/index_map.h index 45c0c50a4b0e..1cc6fa950ae8 100644 --- a/include/tvm/tir/index_map.h +++ b/include/tvm/tir/index_map.h @@ -159,8 +159,6 @@ class IndexMapNode : public Object { .def_ro("inverse_index_map", &IndexMapNode::inverse_index_map); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const IndexMapNode* other, SEqualReducer equal) const { return equal.DefEqual(initial_indices, other->initial_indices) && equal(final_indices, other->final_indices); diff --git a/include/tvm/tir/schedule/instruction.h b/include/tvm/tir/schedule/instruction.h index bf96f6e0363a..5becf40a2c2c 100644 --- a/include/tvm/tir/schedule/instruction.h +++ b/include/tvm/tir/schedule/instruction.h @@ -119,8 +119,6 @@ class InstructionKindNode : public runtime::Object { .def_ro("_is_pure", &InstructionKindNode::is_pure); } - static constexpr bool _type_has_method_visit_attrs = false; - /*! \brief Checks if the instruction kind is EnterPostproc */ bool IsPostproc() const; @@ -183,8 +181,6 @@ class InstructionNode : public runtime::Object { .def_ro("outputs", &InstructionNode::outputs); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "tir.Instruction"; TVM_DECLARE_FINAL_OBJECT_INFO(InstructionNode, runtime::Object); }; diff --git a/include/tvm/tir/schedule/schedule.h b/include/tvm/tir/schedule/schedule.h index 6a303f6a47fd..9fbb9981e55c 100644 --- a/include/tvm/tir/schedule/schedule.h +++ b/include/tvm/tir/schedule/schedule.h @@ -54,8 +54,6 @@ class BlockRVNode : public runtime::Object { // No fields to register as they are not visited } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "tir.BlockRV"; TVM_DECLARE_FINAL_OBJECT_INFO(BlockRVNode, runtime::Object); }; @@ -80,8 +78,6 @@ class LoopRVNode : public runtime::Object { // No fields to register as they are not visited } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "tir.LoopRV"; TVM_DECLARE_FINAL_OBJECT_INFO(LoopRVNode, runtime::Object); }; diff --git a/include/tvm/tir/schedule/state.h b/include/tvm/tir/schedule/state.h index 6a551d9923bd..ec843148ae7b 100644 --- a/include/tvm/tir/schedule/state.h +++ b/include/tvm/tir/schedule/state.h @@ -127,8 +127,6 @@ class ScheduleStateNode : public Object { .def_ro("enable_check", &ScheduleStateNode::enable_check); } - static constexpr bool _type_has_method_visit_attrs = false; - /*! * \brief Replace the part of the AST, as being pointed to by `src_sref`, * with a specific statement `tgt_stmt`, and maintain the sref tree accordingly. diff --git a/include/tvm/tir/schedule/trace.h b/include/tvm/tir/schedule/trace.h index c5858842a095..6e3dd29551ef 100644 --- a/include/tvm/tir/schedule/trace.h +++ b/include/tvm/tir/schedule/trace.h @@ -69,8 +69,6 @@ class TraceNode : public runtime::Object { .def_ro("decisions", &TraceNode::decisions); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "tir.Trace"; TVM_DECLARE_FINAL_OBJECT_INFO(TraceNode, runtime::Object); diff --git a/include/tvm/tir/stmt.h b/include/tvm/tir/stmt.h index ff8ff12e2379..7586a77f5173 100644 --- a/include/tvm/tir/stmt.h +++ b/include/tvm/tir/stmt.h @@ -86,8 +86,6 @@ class LetStmtNode : public StmtNode { .def_ro("body", &LetStmtNode::body); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const LetStmtNode* other, SEqualReducer equal) const { return equal.DefEqual(var, other->var) && equal(value, other->value) && equal(body, other->body); @@ -145,8 +143,6 @@ class AttrStmtNode : public StmtNode { .def_ro("body", &AttrStmtNode::body); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const AttrStmtNode* other, SEqualReducer equal) const { return equal(node, other->node) && equal(attr_key, other->attr_key) && equal(value, other->value) && equal(body, other->body); @@ -198,8 +194,6 @@ class AssertStmtNode : public StmtNode { .def_ro("body", &AssertStmtNode::body); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const AssertStmtNode* other, SEqualReducer equal) const { return equal(condition, other->condition) && equal(message, other->message) && equal(body, other->body); @@ -257,8 +251,6 @@ class BufferStoreNode : public StmtNode { .def_ro("predicate", &BufferStoreNode::predicate); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const BufferStoreNode* other, SEqualReducer equal) const { return equal(buffer, other->buffer) && equal(value, other->value) && equal(indices, other->indices); @@ -319,8 +311,6 @@ class BufferRealizeNode : public StmtNode { .def_ro("body", &BufferRealizeNode::body); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const BufferRealizeNode* other, SEqualReducer equal) const { return equal(buffer, other->buffer) && equal(bounds, other->bounds) && equal(condition, other->condition) && equal(body, other->body); @@ -389,8 +379,6 @@ class AllocateNode : public StmtNode { .def_ro("annotations", &AllocateNode::annotations); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const AllocateNode* other, SEqualReducer equal) const { return equal.DefEqual(buffer_var, other->buffer_var) && equal(dtype, other->dtype) && equal(extents, other->extents) && equal(condition, other->condition) && @@ -481,8 +469,6 @@ class AllocateConstNode : public StmtNode { .def_ro("annotations", &AllocateConstNode::annotations); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const AllocateConstNode* other, SEqualReducer equal) const { return equal.DefEqual(buffer_var, other->buffer_var) && equal(dtype, other->dtype) && equal(extents, other->extents) && equal(data, other->data) && equal(body, other->body) && @@ -551,8 +537,6 @@ class DeclBufferNode : public StmtNode { .def_ro("body", &DeclBufferNode::body); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const DeclBufferNode* other, SEqualReducer equal) const { return equal(buffer, other->buffer) && equal(body, other->body); } @@ -595,8 +579,6 @@ class SeqStmtNode : public StmtNode { refl::ObjectDef().def_ro("seq", &SeqStmtNode::seq); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const SeqStmtNode* other, SEqualReducer equal) const { return equal(seq, other->seq); } @@ -623,8 +605,6 @@ class EvaluateNode : public StmtNode { refl::ObjectDef().def_ro("value", &EvaluateNode::value); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const EvaluateNode* other, SEqualReducer equal) const { return equal(value, other->value); } @@ -820,8 +800,6 @@ class IfThenElseNode : public StmtNode { .def_ro("else_case", &IfThenElseNode::else_case); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const IfThenElseNode* other, SEqualReducer equal) const { return equal(condition, other->condition) && equal(then_case, other->then_case) && equal(else_case, other->else_case); @@ -927,8 +905,6 @@ class ForNode : public StmtNode { .def_ro("annotations", &ForNode::annotations); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const ForNode* other, SEqualReducer equal) const { return equal.DefEqual(loop_var, other->loop_var) && equal(min, other->min) && equal(extent, other->extent) && equal(kind, other->kind) && equal(body, other->body) && @@ -987,8 +963,6 @@ class WhileNode : public StmtNode { .def_ro("body", &WhileNode::body); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const WhileNode* other, SEqualReducer equal) const { return equal(condition, other->condition) && equal(body, other->body); } @@ -1031,8 +1005,6 @@ class BufferRegionNode : public PrimExprConvertibleNode { .def_ro("region", &BufferRegionNode::region); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const BufferRegionNode* other, SEqualReducer equal) const { return equal(buffer, other->buffer) && equal(region, other->region); } @@ -1100,8 +1072,6 @@ class MatchBufferRegionNode : public Object { .def_ro("source", &MatchBufferRegionNode::source); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const MatchBufferRegionNode* other, SEqualReducer equal) const { return equal(buffer, other->buffer) && equal(source, other->source); } @@ -1191,8 +1161,6 @@ class BlockNode : public StmtNode { .def_ro("annotations", &BlockNode::annotations); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const BlockNode* other, SEqualReducer equal) const { // Need first reduce iter_vars, alloc_buffers and match_buffers to define new vars return equal.DefEqual(iter_vars, other->iter_vars) && @@ -1258,8 +1226,6 @@ class BlockRealizeNode : public StmtNode { .def_ro("block", &BlockRealizeNode::block); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const BlockRealizeNode* other, SEqualReducer equal) const { return equal(iter_values, other->iter_values) && equal(predicate, other->predicate) && equal(block, other->block); diff --git a/src/arith/interval_set.h b/src/arith/interval_set.h index 80e5b9ce874d..6addd30f5aef 100644 --- a/src/arith/interval_set.h +++ b/src/arith/interval_set.h @@ -57,8 +57,6 @@ class IntervalSetNode : public IntSetNode { .def_ro("max_value", &IntervalSetNode::max_value); } - static constexpr bool _type_has_method_visit_attrs = false; - /*! \return Whether the interval has upper bound. */ bool HasUpperBound() const { return !is_pos_inf(max_value) && !IsEmpty(); } /*! \return Whether the interval has lower bound. */ diff --git a/src/arith/presburger_set.h b/src/arith/presburger_set.h index 496603b9d839..1f4bc409dbf2 100644 --- a/src/arith/presburger_set.h +++ b/src/arith/presburger_set.h @@ -77,8 +77,6 @@ class PresburgerSetNode : public IntSetNode { refl::ObjectDef(); } - static constexpr bool _type_has_method_visit_attrs = false; - /*! * \brief Do inplace union with given disjunct * \param disjunct The given disjunct to be union with @@ -161,8 +159,6 @@ class PresburgerSetNode : public IntSetNode { refl::ObjectDef(); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "arith.PresburgerSet"; TVM_DECLARE_FINAL_OBJECT_INFO(PresburgerSetNode, IntSetNode); }; diff --git a/src/arith/rewrite_simplify.h b/src/arith/rewrite_simplify.h index f5d5b4c47f95..60511ae013ce 100644 --- a/src/arith/rewrite_simplify.h +++ b/src/arith/rewrite_simplify.h @@ -65,8 +65,6 @@ struct RewriteSimplifierStatsNode : Object { .def_ro("num_recursive_rewrites", &RewriteSimplifierStatsNode::num_recursive_rewrites); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "arith.RewriteSimplifierStats"; TVM_DECLARE_FINAL_OBJECT_INFO(RewriteSimplifierStatsNode, Object); }; diff --git a/src/contrib/msc/core/ir/graph.h b/src/contrib/msc/core/ir/graph.h index 9f6ba07f0f5b..92775646b9e9 100644 --- a/src/contrib/msc/core/ir/graph.h +++ b/src/contrib/msc/core/ir/graph.h @@ -387,8 +387,6 @@ class MSCTensorNode : public Object { .def_ro("prims", &MSCTensorNode::prims); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const MSCTensorNode* other, SEqualReducer equal) const { return equal(name, other->name) && equal(dtype, other->dtype) && equal(shape, other->shape) && equal(layout, other->layout) && equal(prims, other->prims); @@ -502,8 +500,6 @@ class BaseJointNode : public Object { .def_ro("children", &BaseJointNode::children); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const BaseJointNode* other, SEqualReducer equal) const { return equal(name, other->name) && equal(shared_ref, other->shared_ref) && equal(attrs, other->attrs) && equal(parents, other->parents) && @@ -589,8 +585,6 @@ class MSCJointNode : public BaseJointNode { .def_ro("weights", &MSCJointNode::weights); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const MSCJointNode* other, SEqualReducer equal) const { return BaseJointNode::SEqualReduce(other, equal) && equal(optype, other->optype) && equal(scope, other->scope) && equal(inputs, other->inputs) && @@ -675,8 +669,6 @@ class MSCPrimNode : public BaseJointNode { refl::ObjectDef().def_ro("optype", &MSCPrimNode::optype); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const MSCPrimNode* other, SEqualReducer equal) const { return BaseJointNode::SEqualReduce(other, equal) && equal(optype, other->optype); } @@ -754,8 +746,6 @@ class WeightJointNode : public BaseJointNode { .def_ro("friends", &WeightJointNode::friends); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const WeightJointNode* other, SEqualReducer equal) const { return BaseJointNode::SEqualReduce(other, equal) && equal(weight_type, other->weight_type) && equal(weight, other->weight) && equal(friends, other->friends); @@ -832,8 +822,6 @@ class BaseGraphNode : public Object { .def_ro("node_names", &BaseGraphNode::node_names); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const BaseGraphNode* other, SEqualReducer equal) const { return equal(name, other->name) && equal(nodes, other->nodes) && equal(node_names, other->node_names); @@ -937,8 +925,6 @@ class MSCGraphNode : public BaseGraphNode { .def_ro("weight_holders", &MSCGraphNode::weight_holders); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const MSCGraphNode* other, SEqualReducer equal) const { return BaseGraphNode::SEqualReduce(other, equal) && equal(prims, other->prims) && equal(prim_names, other->prim_names) && equal(input_names, other->input_names) && @@ -1015,8 +1001,6 @@ class WeightGraphNode : public BaseGraphNode { refl::ObjectDef(); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const WeightGraphNode* other, SEqualReducer equal) const { return BaseGraphNode::SEqualReduce(other, equal); } diff --git a/src/contrib/msc/core/ir/plugin.h b/src/contrib/msc/core/ir/plugin.h index 6e2fc5ddce00..dd346a905fba 100644 --- a/src/contrib/msc/core/ir/plugin.h +++ b/src/contrib/msc/core/ir/plugin.h @@ -278,8 +278,6 @@ class PluginAttrNode : public Object { .def_ro("describe", &PluginAttrNode::describe); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const PluginAttrNode* other, SEqualReducer equal) const { return equal(name, other->name) && equal(type, other->type) && equal(default_value, other->default_value) && equal(describe, other->describe); @@ -360,8 +358,6 @@ class PluginTensorNode : public Object { .def_ro("describe", &PluginTensorNode::describe); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const PluginTensorNode* other, SEqualReducer equal) const { return equal(name, other->name) && equal(dtype, other->dtype) && equal(ndim, other->ndim) && equal(device, other->device) && equal(describe, other->describe); @@ -444,8 +440,6 @@ class PluginExternNode : public Object { .def_ro("describe", &PluginExternNode::describe); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const PluginExternNode* other, SEqualReducer equal) const { return equal(name, other->name) && equal(header, other->header) && equal(source, other->source) && equal(lib, other->lib) && @@ -549,8 +543,6 @@ class PluginNode : public Object { .def_ro("options", &PluginNode::options); } - static constexpr bool _type_has_method_visit_attrs = false; - bool SEqualReduce(const PluginNode* other, SEqualReducer equal) const { return equal(name, other->name) && equal(version, other->version) && equal(describe, other->describe) && equal(attrs, other->attrs) && diff --git a/src/contrib/msc/core/printer/msc_doc.h b/src/contrib/msc/core/printer/msc_doc.h index 276e88f7aa4f..d1e9170cff9d 100644 --- a/src/contrib/msc/core/printer/msc_doc.h +++ b/src/contrib/msc/core/printer/msc_doc.h @@ -60,8 +60,6 @@ class DeclareDocNode : public ExprDocNode { .def_ro("use_constructor", &DeclareDocNode::use_constructor); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "msc.script.printer.DeclareDoc"; TVM_DECLARE_FINAL_OBJECT_INFO(DeclareDocNode, ExprDocNode); }; @@ -104,8 +102,6 @@ class StrictListDocNode : public ExprDocNode { .def_ro("allow_empty", &StrictListDocNode::allow_empty); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "msc.script.printer.StrictListDoc"; TVM_DECLARE_FINAL_OBJECT_INFO(StrictListDocNode, ExprDocNode); }; @@ -141,8 +137,6 @@ class PointerDocNode : public ExprDocNode { refl::ObjectDef().def_ro("name", &PointerDocNode::name); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "msc.script.printer.PointerDoc"; TVM_DECLARE_FINAL_OBJECT_INFO(PointerDocNode, ExprDocNode); }; @@ -184,8 +178,6 @@ class StructDocNode : public StmtDocNode { .def_ro("body", &StructDocNode::body); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "msc.script.printer.StructDoc"; TVM_DECLARE_FINAL_OBJECT_INFO(StructDocNode, StmtDocNode); }; @@ -235,8 +227,6 @@ class ConstructorDocNode : public StmtDocNode { .def_ro("body", &ConstructorDocNode::body); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "msc.script.printer.ConstructorDoc"; TVM_DECLARE_FINAL_OBJECT_INFO(ConstructorDocNode, StmtDocNode); }; @@ -280,8 +270,6 @@ class SwitchDocNode : public StmtDocNode { .def_ro("default_branch", &SwitchDocNode::default_branch); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "msc.script.printer.SwitchDoc"; TVM_DECLARE_FINAL_OBJECT_INFO(SwitchDocNode, StmtDocNode); }; @@ -335,8 +323,6 @@ class LambdaDocNode : public StmtDocNode { .def_ro("body", &LambdaDocNode::body); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "msc.script.printer.LambdaDoc"; TVM_DECLARE_FINAL_OBJECT_INFO(LambdaDocNode, StmtDocNode); }; diff --git a/src/ir/transform.cc b/src/ir/transform.cc index 159c1f2e5aa8..9e1c95d7f624 100644 --- a/src/ir/transform.cc +++ b/src/ir/transform.cc @@ -353,8 +353,6 @@ class ModulePassNode : public PassNode { refl::ObjectDef().def_ro("pass_info", &ModulePassNode::pass_info); } - static constexpr bool _type_has_method_visit_attrs = false; - /*! * \brief Run a module pass on given pass context. * diff --git a/src/meta_schedule/database/json_database.cc b/src/meta_schedule/database/json_database.cc index afaf641126ca..f8660453e37e 100644 --- a/src/meta_schedule/database/json_database.cc +++ b/src/meta_schedule/database/json_database.cc @@ -89,7 +89,6 @@ class JSONDatabaseNode : public DatabaseNode { .def_ro("path_workload", &JSONDatabaseNode::path_workload) .def_ro("path_tuning_record", &JSONDatabaseNode::path_tuning_record); } - static constexpr bool _type_has_method_visit_attrs = false; static constexpr const char* _type_key = "meta_schedule.JSONDatabase"; TVM_DECLARE_FINAL_OBJECT_INFO(JSONDatabaseNode, DatabaseNode); diff --git a/src/meta_schedule/database/memory_database.cc b/src/meta_schedule/database/memory_database.cc index 37cc9aa15a86..eb1b0d19d49f 100644 --- a/src/meta_schedule/database/memory_database.cc +++ b/src/meta_schedule/database/memory_database.cc @@ -37,7 +37,7 @@ class MemoryDatabaseNode : public DatabaseNode { .def_ro("records", &MemoryDatabaseNode::records) .def_ro("workloads", &MemoryDatabaseNode::workloads); } - static constexpr bool _type_has_method_visit_attrs = false; + static constexpr const char* _type_key = "meta_schedule.MemoryDatabase"; TVM_DECLARE_FINAL_OBJECT_INFO(MemoryDatabaseNode, DatabaseNode); diff --git a/src/meta_schedule/database/ordered_union_database.cc b/src/meta_schedule/database/ordered_union_database.cc index 6e07c4763deb..8f8d2370d982 100644 --- a/src/meta_schedule/database/ordered_union_database.cc +++ b/src/meta_schedule/database/ordered_union_database.cc @@ -32,7 +32,7 @@ class OrderedUnionDatabaseNode : public DatabaseNode { refl::ObjectDef().def_ro("databases", &OrderedUnionDatabaseNode::databases); } - static constexpr bool _type_has_method_visit_attrs = false; + static constexpr const char* _type_key = "meta_schedule.OrderedUnionDatabase"; TVM_DECLARE_FINAL_OBJECT_INFO(OrderedUnionDatabaseNode, DatabaseNode); diff --git a/src/meta_schedule/database/schedule_fn_database.cc b/src/meta_schedule/database/schedule_fn_database.cc index a037cd861c62..10ac141bc390 100644 --- a/src/meta_schedule/database/schedule_fn_database.cc +++ b/src/meta_schedule/database/schedule_fn_database.cc @@ -34,7 +34,7 @@ class ScheduleFnDatabaseNode : public DatabaseNode { refl::ObjectDef().def_ro("schedule_fn", &ScheduleFnDatabaseNode::schedule_fn); } - static constexpr bool _type_has_method_visit_attrs = false; + static constexpr const char* _type_key = "meta_schedule.ScheduleFnDatabase"; TVM_DECLARE_FINAL_OBJECT_INFO(ScheduleFnDatabaseNode, DatabaseNode); diff --git a/src/meta_schedule/database/union_database.cc b/src/meta_schedule/database/union_database.cc index bab6a4ca6f3a..a275b95721f8 100644 --- a/src/meta_schedule/database/union_database.cc +++ b/src/meta_schedule/database/union_database.cc @@ -31,7 +31,7 @@ class UnionDatabaseNode : public DatabaseNode { namespace refl = tvm::ffi::reflection; refl::ObjectDef().def_ro("databases", &UnionDatabaseNode::databases); } - static constexpr bool _type_has_method_visit_attrs = false; + static constexpr const char* _type_key = "meta_schedule.UnionDatabase"; TVM_DECLARE_FINAL_OBJECT_INFO(UnionDatabaseNode, DatabaseNode); diff --git a/src/meta_schedule/feature_extractor/per_store_feature.cc b/src/meta_schedule/feature_extractor/per_store_feature.cc index 1a18d1c70039..d74f1c369e0d 100644 --- a/src/meta_schedule/feature_extractor/per_store_feature.cc +++ b/src/meta_schedule/feature_extractor/per_store_feature.cc @@ -1378,7 +1378,6 @@ class PerStoreFeatureNode : public FeatureExtractorNode { .def_ro("extract_workload", &PerStoreFeatureNode::extract_workload) .def_ro("feature_vector_length", &PerStoreFeatureNode::feature_vector_length); } - static constexpr bool _type_has_method_visit_attrs = false; void ExtractSingle(IRModule mod, bool is_gpu, std::vector>* results) { static transform::Sequential passes = tir::transform::PassListForPerStoreFeature(); diff --git a/src/meta_schedule/mutator/mutate_compute_location.cc b/src/meta_schedule/mutator/mutate_compute_location.cc index 276fd89605d2..c1baa9b26c3f 100644 --- a/src/meta_schedule/mutator/mutate_compute_location.cc +++ b/src/meta_schedule/mutator/mutate_compute_location.cc @@ -38,8 +38,6 @@ class MutateComputeLocationNode : public MutatorNode { refl::ObjectDef(); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "meta_schedule.MutateComputeLocation"; TVM_DECLARE_FINAL_OBJECT_INFO(MutateComputeLocationNode, MutatorNode); diff --git a/src/meta_schedule/mutator/mutate_parallel.cc b/src/meta_schedule/mutator/mutate_parallel.cc index afad83634f8c..53ba13d13992 100644 --- a/src/meta_schedule/mutator/mutate_parallel.cc +++ b/src/meta_schedule/mutator/mutate_parallel.cc @@ -176,7 +176,7 @@ class MutateParallelNode : public MutatorNode { refl::ObjectDef().def_ro("max_jobs_per_core", &MutateParallelNode::max_jobs_per_core); } - static constexpr bool _type_has_method_visit_attrs = false; + static constexpr const char* _type_key = "meta_schedule.MutateParallel"; TVM_DECLARE_FINAL_OBJECT_INFO(MutateParallelNode, MutatorNode); diff --git a/src/meta_schedule/mutator/mutate_thread_binding.cc b/src/meta_schedule/mutator/mutate_thread_binding.cc index ade84fd3363a..27bf5b334ae3 100644 --- a/src/meta_schedule/mutator/mutate_thread_binding.cc +++ b/src/meta_schedule/mutator/mutate_thread_binding.cc @@ -38,8 +38,6 @@ class MutateThreadBindingNode : public MutatorNode { refl::ObjectDef(); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "meta_schedule.MutateThreadBinding"; TVM_DECLARE_FINAL_OBJECT_INFO(MutateThreadBindingNode, MutatorNode); diff --git a/src/meta_schedule/mutator/mutate_tile_size.cc b/src/meta_schedule/mutator/mutate_tile_size.cc index 728a081e28cc..0157309cb339 100644 --- a/src/meta_schedule/mutator/mutate_tile_size.cc +++ b/src/meta_schedule/mutator/mutate_tile_size.cc @@ -61,8 +61,6 @@ class MutateTileSizeNode : public MutatorNode { refl::ObjectDef(); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "meta_schedule.MutateTileSize"; TVM_DECLARE_FINAL_OBJECT_INFO(MutateTileSizeNode, MutatorNode); diff --git a/src/meta_schedule/mutator/mutate_unroll.cc b/src/meta_schedule/mutator/mutate_unroll.cc index 1948493a0e42..71dcd7702b47 100644 --- a/src/meta_schedule/mutator/mutate_unroll.cc +++ b/src/meta_schedule/mutator/mutate_unroll.cc @@ -57,8 +57,6 @@ class MutateUnrollNode : public MutatorNode { refl::ObjectDef(); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "meta_schedule.MutateUnroll"; TVM_DECLARE_FINAL_OBJECT_INFO(MutateUnrollNode, MutatorNode); diff --git a/src/meta_schedule/postproc/rewrite_cooperative_fetch.cc b/src/meta_schedule/postproc/rewrite_cooperative_fetch.cc index 46a478a1aa5f..2e0ebf985e11 100644 --- a/src/meta_schedule/postproc/rewrite_cooperative_fetch.cc +++ b/src/meta_schedule/postproc/rewrite_cooperative_fetch.cc @@ -121,7 +121,6 @@ class RewriteCooperativeFetchNode : public PostprocNode { namespace refl = tvm::ffi::reflection; refl::ObjectDef(); } - static constexpr bool _type_has_method_visit_attrs = false; // Inherited from PostprocNode void InitializeWithTuneContext(const TuneContext& context) final { diff --git a/src/meta_schedule/postproc/rewrite_reduction_block.cc b/src/meta_schedule/postproc/rewrite_reduction_block.cc index f182d710f807..0aa3d640cc09 100644 --- a/src/meta_schedule/postproc/rewrite_reduction_block.cc +++ b/src/meta_schedule/postproc/rewrite_reduction_block.cc @@ -115,7 +115,6 @@ class RewriteReductionBlockNode : public PostprocNode { namespace refl = tvm::ffi::reflection; refl::ObjectDef(); } - static constexpr bool _type_has_method_visit_attrs = false; // Inherited from PostprocNode void InitializeWithTuneContext(const TuneContext& context) final {} diff --git a/src/meta_schedule/postproc/rewrite_tensorize.cc b/src/meta_schedule/postproc/rewrite_tensorize.cc index cc1aa1e02cb7..9456defeed55 100644 --- a/src/meta_schedule/postproc/rewrite_tensorize.cc +++ b/src/meta_schedule/postproc/rewrite_tensorize.cc @@ -67,7 +67,6 @@ class RewriteTensorizeNode : public PostprocNode { namespace refl = tvm::ffi::reflection; refl::ObjectDef(); } - static constexpr bool _type_has_method_visit_attrs = false; void InitializeWithTuneContext(const TuneContext& context) final {} diff --git a/src/meta_schedule/postproc/rewrite_unbound_block.cc b/src/meta_schedule/postproc/rewrite_unbound_block.cc index 846a74833d14..29f9280afaba 100644 --- a/src/meta_schedule/postproc/rewrite_unbound_block.cc +++ b/src/meta_schedule/postproc/rewrite_unbound_block.cc @@ -114,7 +114,6 @@ class RewriteUnboundBlockNode : public PostprocNode { namespace refl = tvm::ffi::reflection; refl::ObjectDef(); } - static constexpr bool _type_has_method_visit_attrs = false; static constexpr const char* _type_key = "meta_schedule.RewriteUnboundBlock"; TVM_DECLARE_FINAL_OBJECT_INFO(RewriteUnboundBlockNode, PostprocNode); diff --git a/src/meta_schedule/schedule_rule/add_rfactor.cc b/src/meta_schedule/schedule_rule/add_rfactor.cc index 78f8289d280c..190749c09aa9 100644 --- a/src/meta_schedule/schedule_rule/add_rfactor.cc +++ b/src/meta_schedule/schedule_rule/add_rfactor.cc @@ -64,7 +64,6 @@ class AddRFactorNode : public ScheduleRuleNode { .def_ro("max_jobs_per_core", &AddRFactorNode::max_jobs_per_core) .def_ro("max_innermost_factor", &AddRFactorNode::max_innermost_factor); } - static constexpr bool _type_has_method_visit_attrs = false; static constexpr const char* _type_key = "meta_schedule.AddRFactor"; TVM_DECLARE_FINAL_OBJECT_INFO(AddRFactorNode, ScheduleRuleNode); diff --git a/src/meta_schedule/schedule_rule/apply_custom_rule.cc b/src/meta_schedule/schedule_rule/apply_custom_rule.cc index 28fa488b0ebc..234b9fd13239 100644 --- a/src/meta_schedule/schedule_rule/apply_custom_rule.cc +++ b/src/meta_schedule/schedule_rule/apply_custom_rule.cc @@ -77,7 +77,7 @@ class ApplyCustomRuleNode : public ScheduleRuleNode { namespace refl = tvm::ffi::reflection; refl::ObjectDef().def_ro("target_", &ApplyCustomRuleNode::target_); } - static constexpr bool _type_has_method_visit_attrs = false; + static constexpr const char* _type_key = "meta_schedule.ApplyCustomRule"; TVM_DECLARE_FINAL_OBJECT_INFO(ApplyCustomRuleNode, ScheduleRuleNode); }; diff --git a/src/meta_schedule/schedule_rule/auto_bind.cc b/src/meta_schedule/schedule_rule/auto_bind.cc index 7e264da4a981..d2077306f70a 100644 --- a/src/meta_schedule/schedule_rule/auto_bind.cc +++ b/src/meta_schedule/schedule_rule/auto_bind.cc @@ -60,7 +60,7 @@ class AutoBindNode : public ScheduleRuleNode { namespace refl = tvm::ffi::reflection; refl::ObjectDef(); } - static constexpr bool _type_has_method_visit_attrs = false; + static constexpr const char* _type_key = "meta_schedule.AutoBind"; TVM_DECLARE_FINAL_OBJECT_INFO(AutoBindNode, ScheduleRuleNode); }; diff --git a/src/meta_schedule/schedule_rule/auto_inline.cc b/src/meta_schedule/schedule_rule/auto_inline.cc index e0e9386ca344..eb7b2e6e207d 100644 --- a/src/meta_schedule/schedule_rule/auto_inline.cc +++ b/src/meta_schedule/schedule_rule/auto_inline.cc @@ -95,7 +95,7 @@ class AutoInlineNode : public ScheduleRuleNode { .def_ro("require_ordered", &AutoInlineNode::require_ordered) .def_ro("disallow_op", &AutoInlineNode::disallow_op); } - static constexpr bool _type_has_method_visit_attrs = false; + static constexpr const char* _type_key = "meta_schedule.AutoInline"; TVM_DECLARE_FINAL_OBJECT_INFO(AutoInlineNode, ScheduleRuleNode); }; @@ -232,7 +232,6 @@ class InlineConstantScalarsNode : public ScheduleRuleNode { refl::ObjectDef(); } - static constexpr bool _type_has_method_visit_attrs = false; static constexpr const char* _type_key = "meta_schedule.InlineConstantScalars"; TVM_DECLARE_FINAL_OBJECT_INFO(InlineConstantScalarsNode, ScheduleRuleNode); }; diff --git a/src/meta_schedule/schedule_rule/cross_thread_reduction.cc b/src/meta_schedule/schedule_rule/cross_thread_reduction.cc index 571a1375a546..df0d190003a5 100644 --- a/src/meta_schedule/schedule_rule/cross_thread_reduction.cc +++ b/src/meta_schedule/schedule_rule/cross_thread_reduction.cc @@ -280,7 +280,7 @@ class CrossThreadReductionNode : public ScheduleRuleNode { .def_ro("warp_size", &CrossThreadReductionNode::warp_size) .def_ro("thread_extents", &CrossThreadReductionNode::thread_extents); } - static constexpr bool _type_has_method_visit_attrs = false; + static constexpr const char* _type_key = "meta_schedule.CrossThreadReduction"; TVM_DECLARE_FINAL_OBJECT_INFO(CrossThreadReductionNode, ScheduleRuleNode); }; diff --git a/src/meta_schedule/schedule_rule/multi_level_tiling.h b/src/meta_schedule/schedule_rule/multi_level_tiling.h index a85e88aad6f8..5589604fd9b0 100644 --- a/src/meta_schedule/schedule_rule/multi_level_tiling.h +++ b/src/meta_schedule/schedule_rule/multi_level_tiling.h @@ -229,8 +229,6 @@ class MultiLevelTilingNode : public ScheduleRuleNode { .def_ro("max_innermost_factor", &MultiLevelTilingNode::max_innermost_factor); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "meta_schedule.MultiLevelTiling"; TVM_DECLARE_BASE_OBJECT_INFO(MultiLevelTilingNode, ScheduleRuleNode); }; diff --git a/src/meta_schedule/schedule_rule/parallel_vectorize_unroll.cc b/src/meta_schedule/schedule_rule/parallel_vectorize_unroll.cc index d123e33e71f9..48a607f23019 100644 --- a/src/meta_schedule/schedule_rule/parallel_vectorize_unroll.cc +++ b/src/meta_schedule/schedule_rule/parallel_vectorize_unroll.cc @@ -118,7 +118,6 @@ class ParallelizeVectorizeUnrollNode : public ScheduleRuleNode { .def_ro("unroll_max_steps", &ParallelizeVectorizeUnrollNode::unroll_max_steps) .def_ro("unroll_explicit", &ParallelizeVectorizeUnrollNode::unroll_explicit); } - static constexpr bool _type_has_method_visit_attrs = false; static constexpr const char* _type_key = "meta_schedule.ParallelizeVectorizeUnroll"; TVM_DECLARE_FINAL_OBJECT_INFO(ParallelizeVectorizeUnrollNode, ScheduleRuleNode); diff --git a/src/meta_schedule/schedule_rule/random_compute_location.cc b/src/meta_schedule/schedule_rule/random_compute_location.cc index 27ab8f4ad026..a0e602e6573e 100644 --- a/src/meta_schedule/schedule_rule/random_compute_location.cc +++ b/src/meta_schedule/schedule_rule/random_compute_location.cc @@ -117,7 +117,7 @@ class RandomComputeLocationNode : public ScheduleRuleNode { namespace refl = tvm::ffi::reflection; refl::ObjectDef(); } - static constexpr bool _type_has_method_visit_attrs = false; + static constexpr const char* _type_key = "meta_schedule.RandomComputeLocation"; TVM_DECLARE_FINAL_OBJECT_INFO(RandomComputeLocationNode, ScheduleRuleNode); }; diff --git a/src/meta_schedule/search_strategy/evolutionary_search.cc b/src/meta_schedule/search_strategy/evolutionary_search.cc index f942d28e52a1..61ad46172f61 100644 --- a/src/meta_schedule/search_strategy/evolutionary_search.cc +++ b/src/meta_schedule/search_strategy/evolutionary_search.cc @@ -395,8 +395,6 @@ class EvolutionarySearchNode : public SearchStrategyNode { .def_ro("eps_greedy", &EvolutionarySearchNode::eps_greedy); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "meta_schedule.EvolutionarySearch"; TVM_DECLARE_FINAL_OBJECT_INFO(EvolutionarySearchNode, SearchStrategyNode); diff --git a/src/meta_schedule/task_scheduler/gradient_based.cc b/src/meta_schedule/task_scheduler/gradient_based.cc index 207e8b6616fa..30bfc611cbbb 100644 --- a/src/meta_schedule/task_scheduler/gradient_based.cc +++ b/src/meta_schedule/task_scheduler/gradient_based.cc @@ -40,8 +40,6 @@ class GradientBasedNode final : public TaskSchedulerNode { .def_ro("window_size", &GradientBasedNode::window_size); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "meta_schedule.GradientBased"; TVM_DECLARE_FINAL_OBJECT_INFO(GradientBasedNode, TaskSchedulerNode); diff --git a/src/meta_schedule/task_scheduler/round_robin.cc b/src/meta_schedule/task_scheduler/round_robin.cc index 35685bc7f229..e8d16c0cf421 100644 --- a/src/meta_schedule/task_scheduler/round_robin.cc +++ b/src/meta_schedule/task_scheduler/round_robin.cc @@ -34,8 +34,6 @@ class RoundRobinNode final : public TaskSchedulerNode { refl::ObjectDef().def_ro("task_id", &RoundRobinNode::task_id); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "meta_schedule.RoundRobin"; TVM_DECLARE_FINAL_OBJECT_INFO(RoundRobinNode, TaskSchedulerNode); diff --git a/src/relax/backend/contrib/cutlass/codegen.cc b/src/relax/backend/contrib/cutlass/codegen.cc index a3b0e8460ce7..f5a6ead0bdb9 100644 --- a/src/relax/backend/contrib/cutlass/codegen.cc +++ b/src/relax/backend/contrib/cutlass/codegen.cc @@ -87,8 +87,6 @@ class CodegenResultNode : public Object { .def_ro("headers", &CodegenResultNode::headers); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "contrib.cutlass.CodegenResult"; TVM_DECLARE_FINAL_OBJECT_INFO(CodegenResultNode, Object); }; diff --git a/src/relax/ir/dataflow_block_rewriter.cc b/src/relax/ir/dataflow_block_rewriter.cc index 284d7eaf0c42..cdb97b30c1f6 100644 --- a/src/relax/ir/dataflow_block_rewriter.cc +++ b/src/relax/ir/dataflow_block_rewriter.cc @@ -382,8 +382,6 @@ class PatternContextRewriterNode : public PatternMatchingRewriterNode { .def_ro("rewriter_func", &PatternContextRewriterNode::rewriter_func); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "relax.dpl.PatternContextRewriter"; TVM_DECLARE_FINAL_OBJECT_INFO(PatternContextRewriterNode, PatternMatchingRewriterNode); diff --git a/src/relax/ir/dataflow_rewriter.h b/src/relax/ir/dataflow_rewriter.h index 87e855fbd937..8e36ebbbc420 100644 --- a/src/relax/ir/dataflow_rewriter.h +++ b/src/relax/ir/dataflow_rewriter.h @@ -59,8 +59,6 @@ class PatternMatchingRewriterNode : public tvm::transform::PassNode { // PatternMatchingRewriterNode has no fields to register } - static constexpr bool _type_has_method_visit_attrs = false; - IRModule operator()(IRModule mod, const tvm::transform::PassContext& pass_ctx) const override; tvm::transform::PassInfo Info() const override; @@ -101,8 +99,6 @@ class ExprPatternRewriterNode : public PatternMatchingRewriterNode { .def_ro("func", &ExprPatternRewriterNode::func); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "relax.dpl.ExprPatternRewriter"; TVM_DECLARE_BASE_OBJECT_INFO(ExprPatternRewriterNode, PatternMatchingRewriterNode); }; @@ -132,8 +128,6 @@ class OrRewriterNode : public PatternMatchingRewriterNode { .def_ro("rhs", &OrRewriterNode::rhs); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "relax.dpl.OrRewriter"; TVM_DECLARE_BASE_OBJECT_INFO(OrRewriterNode, PatternMatchingRewriterNode); }; @@ -161,8 +155,6 @@ class TupleRewriterNode : public PatternMatchingRewriterNode { .def_ro("func", &TupleRewriterNode::func); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "relax.dpl.TupleRewriter"; TVM_DECLARE_BASE_OBJECT_INFO(TupleRewriterNode, PatternMatchingRewriterNode); diff --git a/src/relax/ir/emit_te.h b/src/relax/ir/emit_te.h index b5e45bde7474..3a58d918c62b 100644 --- a/src/relax/ir/emit_te.h +++ b/src/relax/ir/emit_te.h @@ -52,8 +52,6 @@ class RXPlaceholderOpNode : public te::PlaceholderOpNode { .def_ro("dtype", &RXPlaceholderOpNode::dtype); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "RXPlaceholderOp"; TVM_DECLARE_FINAL_OBJECT_INFO(RXPlaceholderOpNode, te::PlaceholderOpNode); }; diff --git a/src/relax/ir/py_expr_functor.cc b/src/relax/ir/py_expr_functor.cc index 4fc585b37c18..8a607191796d 100644 --- a/src/relax/ir/py_expr_functor.cc +++ b/src/relax/ir/py_expr_functor.cc @@ -141,8 +141,6 @@ class PyExprVisitorNode : public Object, public ExprVisitor { // PyExprVisitorNode has no fields to register } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "expr_functor.PyExprVisitor"; TVM_DECLARE_BASE_OBJECT_INFO(PyExprVisitorNode, Object); @@ -404,8 +402,6 @@ class PyExprMutatorNode : public Object, public ExprMutator { refl::ObjectDef().def_ro("builder_", &PyExprMutatorNode::builder_); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "expr_functor.PyExprMutator"; TVM_DECLARE_BASE_OBJECT_INFO(PyExprMutatorNode, Object); diff --git a/src/relax/ir/transform.cc b/src/relax/ir/transform.cc index 382fa6284124..73e724b8958f 100644 --- a/src/relax/ir/transform.cc +++ b/src/relax/ir/transform.cc @@ -67,8 +67,6 @@ class FunctionPassNode : public tvm::transform::PassNode { refl::ObjectDef().def_ro("pass_info", &FunctionPassNode::pass_info); } - static constexpr bool _type_has_method_visit_attrs = false; - /*! * \brief Run a function pass on given pass context. * @@ -216,8 +214,6 @@ class DataflowBlockPassNode : public tvm::transform::PassNode { refl::ObjectDef().def_ro("pass_info", &DataflowBlockPassNode::pass_info); } - static constexpr bool _type_has_method_visit_attrs = false; - IRModule operator()(IRModule mod, const PassContext& pass_ctx) const final; PassInfo Info() const override { return pass_info; } diff --git a/src/relax/transform/dataflow_inplace.cc b/src/relax/transform/dataflow_inplace.cc index 723118411bbf..d23cf47f75eb 100644 --- a/src/relax/transform/dataflow_inplace.cc +++ b/src/relax/transform/dataflow_inplace.cc @@ -532,8 +532,6 @@ class InplaceOpportunityNode : public Object { .def_ro("arg_idxs", &InplaceOpportunityNode::arg_idxs); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "relax.transform.InplaceOpportunity"; TVM_DECLARE_BASE_OBJECT_INFO(InplaceOpportunityNode, Object); }; diff --git a/src/relax/transform/infer_layout_utils.h b/src/relax/transform/infer_layout_utils.h index f8675b70e8f4..bf0a992f9985 100644 --- a/src/relax/transform/infer_layout_utils.h +++ b/src/relax/transform/infer_layout_utils.h @@ -69,8 +69,6 @@ class LayoutDecisionNode : public Object { .def_ro("is_unknown_dim", &LayoutDecisionNode::is_unknown_dim); } - static constexpr bool _type_has_method_visit_attrs = false; - TVM_DECLARE_BASE_OBJECT_INFO(LayoutDecisionNode, Object); static constexpr const char* _type_key = "relax.transform.LayoutDecision"; @@ -121,8 +119,6 @@ class InferLayoutOutputNode : public Object { .def_ro("new_args", &InferLayoutOutputNode::new_args); } - static constexpr bool _type_has_method_visit_attrs = false; - TVM_DECLARE_BASE_OBJECT_INFO(InferLayoutOutputNode, Object); static constexpr const char* _type_key = "relax.transform.InferLayoutOutput"; diff --git a/src/script/printer/ir/utils.h b/src/script/printer/ir/utils.h index 4d5f711bad9c..1944732d3422 100644 --- a/src/script/printer/ir/utils.h +++ b/src/script/printer/ir/utils.h @@ -44,8 +44,6 @@ class IRFrameNode : public FrameNode { // global infos is not exposed } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "script.printer.IRFrame"; TVM_DECLARE_FINAL_OBJECT_INFO(IRFrameNode, FrameNode); }; diff --git a/src/script/printer/relax/utils.h b/src/script/printer/relax/utils.h index f495bcba887d..b9a0a849f9ff 100644 --- a/src/script/printer/relax/utils.h +++ b/src/script/printer/relax/utils.h @@ -51,8 +51,6 @@ class RelaxFrameNode : public FrameNode { .def_ro("module_alias_printed", &RelaxFrameNode::module_alias_printed); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "script.printer.RelaxFrame"; TVM_DECLARE_FINAL_OBJECT_INFO(RelaxFrameNode, FrameNode); }; diff --git a/src/script/printer/tir/utils.h b/src/script/printer/tir/utils.h index 6b37ca955078..105dc94d56ec 100644 --- a/src/script/printer/tir/utils.h +++ b/src/script/printer/tir/utils.h @@ -56,8 +56,6 @@ class TIRFrameNode : public FrameNode { .def_ro("allow_concise_scoping", &TIRFrameNode::allow_concise_scoping); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "script.printer.TIRFrame"; TVM_DECLARE_FINAL_OBJECT_INFO(TIRFrameNode, FrameNode); }; diff --git a/src/tir/ir/py_functor.cc b/src/tir/ir/py_functor.cc index 9e65365719b2..6382a779927f 100644 --- a/src/tir/ir/py_functor.cc +++ b/src/tir/ir/py_functor.cc @@ -218,8 +218,6 @@ class PyStmtExprVisitorNode : public Object, public StmtExprVisitor { // No fields to register as they are not visited } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "tir.PyStmtExprVisitor"; TVM_DECLARE_BASE_OBJECT_INFO(PyStmtExprVisitorNode, Object); @@ -583,8 +581,6 @@ class PyStmtExprMutatorNode : public Object, public StmtExprMutator { // No fields to register as they are not visited } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "tir.PyStmtExprMutator"; TVM_DECLARE_BASE_OBJECT_INFO(PyStmtExprMutatorNode, Object); diff --git a/src/tir/ir/transform.cc b/src/tir/ir/transform.cc index 05684c1bd8ce..b8a91cfc127e 100644 --- a/src/tir/ir/transform.cc +++ b/src/tir/ir/transform.cc @@ -68,8 +68,6 @@ class PrimFuncPassNode : public PassNode { refl::ObjectDef().def_ro("pass_info", &PrimFuncPassNode::pass_info); } - static constexpr bool _type_has_method_visit_attrs = false; - /*! * \brief Run a function pass on given pass context. * diff --git a/src/tir/schedule/analysis.h b/src/tir/schedule/analysis.h index 277b89628331..25d09ff931ea 100644 --- a/src/tir/schedule/analysis.h +++ b/src/tir/schedule/analysis.h @@ -749,8 +749,6 @@ class TensorizeInfoNode : public Object { .def_ro("block_iter_paddings", &TensorizeInfoNode::block_iter_paddings); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "tir.schedule.TensorizeInfo"; TVM_DECLARE_FINAL_OBJECT_INFO(TensorizeInfoNode, Object); }; @@ -799,8 +797,6 @@ class AutoTensorizeMappingInfoNode : public Object { .def_ro("rhs_iters", &AutoTensorizeMappingInfoNode::rhs_iters); } - static constexpr bool _type_has_method_visit_attrs = false; - static constexpr const char* _type_key = "tir.schedule.AutoTensorizeMappingInfo"; TVM_DECLARE_FINAL_OBJECT_INFO(AutoTensorizeMappingInfoNode, Object); }; diff --git a/src/tir/schedule/concrete_schedule.h b/src/tir/schedule/concrete_schedule.h index 60b196d71b06..5f3f0c8b61f1 100644 --- a/src/tir/schedule/concrete_schedule.h +++ b/src/tir/schedule/concrete_schedule.h @@ -54,8 +54,6 @@ class ConcreteScheduleNode : public ScheduleNode { // No fields to register as they are not visited } - static constexpr bool _type_has_method_visit_attrs = false; - virtual ~ConcreteScheduleNode() = default; public: diff --git a/src/tir/schedule/traced_schedule.h b/src/tir/schedule/traced_schedule.h index 50586d70e6de..024c3fb873f2 100644 --- a/src/tir/schedule/traced_schedule.h +++ b/src/tir/schedule/traced_schedule.h @@ -35,8 +35,6 @@ class TracedScheduleNode : public ConcreteScheduleNode { // No fields to register as they are not visited } - static constexpr bool _type_has_method_visit_attrs = false; - ~TracedScheduleNode() = default; public: