Skip to content

Commit 0f13c50

Browse files
tqchenShiboXing
authored andcommitted
[FFI] Cleanup visit_attrs attribute after refactor (apache#18112)
This PR is a cleanup pr after we removed VisitAttrs, the attribute is no longer necessary
1 parent 9bc4aa7 commit 0f13c50

File tree

93 files changed

+11
-442
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+11
-442
lines changed

include/tvm/arith/analyzer.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,6 @@ class ConstIntBoundNode : public Object {
9494
.def_ro("max_value", &ConstIntBoundNode::max_value);
9595
}
9696

97-
static constexpr bool _type_has_method_visit_attrs = false;
98-
9997
bool SEqualReduce(const ConstIntBoundNode* other, SEqualReducer equal) const {
10098
return equal(min_value, other->min_value) && equal(max_value, other->max_value);
10199
}
@@ -220,8 +218,6 @@ class ModularSetNode : public Object {
220218
.def_ro("base", &ModularSetNode::base);
221219
}
222220

223-
static constexpr bool _type_has_method_visit_attrs = false;
224-
225221
bool SEqualReduce(const ModularSetNode* other, SEqualReducer equal) const {
226222
return equal(coeff, other->coeff) && equal(base, other->base);
227223
}

include/tvm/arith/iter_affine_map.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ namespace arith {
6666
*/
6767
class IterMapExprNode : public PrimExprNode {
6868
public:
69-
static constexpr bool _type_has_method_visit_attrs = false;
7069
static constexpr const char* _type_key = "arith.IterMapExpr";
7170
static constexpr const uint32_t _type_child_slots = 2;
7271
TVM_DECLARE_BASE_OBJECT_INFO(IterMapExprNode, PrimExprNode);
@@ -106,8 +105,6 @@ class IterMarkNode : public Object {
106105
.def_ro("extent", &IterMarkNode::extent);
107106
}
108107

109-
static constexpr bool _type_has_method_visit_attrs = false;
110-
111108
bool SEqualReduce(const IterMarkNode* other, SEqualReducer equal) const {
112109
equal->MarkGraphNode();
113110
return equal(source, other->source) && equal(extent, other->extent);
@@ -167,8 +164,6 @@ class IterSplitExprNode : public IterMapExprNode {
167164
.def_ro("scale", &IterSplitExprNode::scale);
168165
}
169166

170-
static constexpr bool _type_has_method_visit_attrs = false;
171-
172167
bool SEqualReduce(const IterSplitExprNode* other, SEqualReducer equal) const {
173168
return equal(source, other->source) && equal(lower_factor, other->lower_factor) &&
174169
equal(extent, other->extent) && equal(scale, other->scale);
@@ -235,8 +230,6 @@ class IterSumExprNode : public IterMapExprNode {
235230
.def_ro("base", &IterSumExprNode::base);
236231
}
237232

238-
static constexpr bool _type_has_method_visit_attrs = false;
239-
240233
bool SEqualReduce(const IterSumExprNode* other, SEqualReducer equal) const {
241234
return equal(args, other->args) && equal(base, other->base);
242235
}
@@ -307,8 +300,6 @@ class IterMapResultNode : public Object {
307300
.def_ro("padding_predicate", &IterMapResultNode::padding_predicate);
308301
}
309302

310-
static constexpr bool _type_has_method_visit_attrs = false;
311-
312303
static constexpr const char* _type_key = "arith.IterMapResult";
313304
TVM_DECLARE_FINAL_OBJECT_INFO(IterMapResultNode, Object);
314305
};

include/tvm/ir/attrs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class AttrFieldInfoNode : public Object {
8282
}
8383

8484
static constexpr const char* _type_key = "ir.AttrFieldInfo";
85-
static constexpr bool _type_has_method_visit_attrs = false;
85+
8686
static constexpr bool _type_has_method_sequal_reduce = false;
8787
static constexpr bool _type_has_method_shash_reduce = false;
8888
TVM_DECLARE_FINAL_OBJECT_INFO(AttrFieldInfoNode, Object);

include/tvm/ir/diagnostic.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ class DiagnosticNode : public Object {
7474
.def_ro("message", &DiagnosticNode::message);
7575
}
7676

77-
static constexpr bool _type_has_method_visit_attrs = false;
78-
7977
bool SEqualReduce(const DiagnosticNode* other, SEqualReducer equal) const {
8078
return equal(this->level, other->level) && equal(this->span, other->span) &&
8179
equal(this->message, other->message);
@@ -174,8 +172,6 @@ class DiagnosticRendererNode : public Object {
174172
refl::ObjectDef<DiagnosticRendererNode>().def_ro("renderer", &DiagnosticRendererNode::renderer);
175173
}
176174

177-
static constexpr bool _type_has_method_visit_attrs = false;
178-
179175
static constexpr const char* _type_key = "DiagnosticRenderer";
180176
TVM_DECLARE_FINAL_OBJECT_INFO(DiagnosticRendererNode, Object);
181177
};
@@ -214,8 +210,6 @@ class DiagnosticContextNode : public Object {
214210
.def_ro("diagnostics", &DiagnosticContextNode::diagnostics);
215211
}
216212

217-
static constexpr bool _type_has_method_visit_attrs = false;
218-
219213
bool SEqualReduce(const DiagnosticContextNode* other, SEqualReducer equal) const {
220214
return equal(module, other->module) && equal(diagnostics, other->diagnostics);
221215
}

include/tvm/ir/env_func.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ class EnvFuncNode : public Object {
5454
refl::ObjectDef<EnvFuncNode>().def_ro("name", &EnvFuncNode::name);
5555
}
5656

57-
static constexpr bool _type_has_method_visit_attrs = false;
58-
5957
bool SEqualReduce(const EnvFuncNode* other, SEqualReducer equal) const {
6058
// name uniquely identifies the env function.
6159
return name == other->name;

include/tvm/ir/global_info.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@ class VDeviceNode : public GlobalInfoNode {
7878
.def_ro("memory_scope", &VDeviceNode::memory_scope);
7979
}
8080

81-
static constexpr bool _type_has_method_visit_attrs = false;
82-
8381
TVM_DLL bool SEqualReduce(const VDeviceNode* other, SEqualReducer equal) const {
8482
return equal(target, other->target) && equal(vdevice_id, other->vdevice_id) &&
8583
equal(memory_scope, other->memory_scope);
@@ -114,8 +112,6 @@ class DummyGlobalInfoNode : public GlobalInfoNode {
114112
refl::ObjectDef<DummyGlobalInfoNode>();
115113
}
116114

117-
static constexpr bool _type_has_method_visit_attrs = false;
118-
119115
static constexpr const char* _type_key = "ir.DummyGlobalInfo";
120116

121117
TVM_DLL bool SEqualReduce(const DummyGlobalInfoNode* other, SEqualReducer equal) const {

include/tvm/ir/global_var_supply.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ class GlobalVarSupplyNode : public Object {
8181
refl::ObjectDef<GlobalVarSupplyNode>();
8282
}
8383

84-
static constexpr bool _type_has_method_visit_attrs = false;
85-
8684
/*! \brief The NameSupply used to generate unique name hints to GlobalVars. */
8785
NameSupply name_supply_;
8886

include/tvm/ir/instrument.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,6 @@ class PassInstrumentNode : public Object {
142142
refl::ObjectDef<PassInstrumentNode>().def_ro("name", &PassInstrumentNode::name);
143143
}
144144

145-
static constexpr bool _type_has_method_visit_attrs = false;
146-
147145
static constexpr const char* _type_key = "instrument.PassInstrument";
148146
TVM_DECLARE_BASE_OBJECT_INFO(PassInstrumentNode, Object);
149147
};

include/tvm/ir/module.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,6 @@ class IRModuleNode : public Object {
140140
.def_ro("global_infos", &IRModuleNode::global_infos);
141141
}
142142

143-
static constexpr bool _type_has_method_visit_attrs = false;
144-
145143
TVM_DLL bool SEqualReduce(const IRModuleNode* other, SEqualReducer equal) const;
146144

147145
TVM_DLL void SHashReduce(SHashReducer hash_reduce) const;

include/tvm/ir/name_supply.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ class NameSupplyNode : public Object {
8181
*/
8282
bool ContainsName(const String& name, bool add_prefix = true);
8383

84-
static constexpr bool _type_has_method_visit_attrs = false;
85-
8684
// Prefix for all GlobalVar names. It can be empty.
8785
std::string prefix_;
8886

0 commit comments

Comments
 (0)