tqchen opened a new pull request, #19615:
URL: https://github.com/apache/tvm/pull/19615
## Summary
Follow-up to #19607 that continues trimming `attrs.h` and adjacent
files. The six commits land independently and each builds clean.
- Phase out `OpNode::arguments` and `AttrFieldInfo` — the field stored
metadata that no Python tooling, test, or C++ caller (beyond internal
sanity checks) read; removing it deletes `AttrFieldInfo` plus ~335
chained `.add_argument(...)` calls. The remaining 12 internal consumers
now read `op->num_inputs` and report indexed inputs (`input[i]`).
- Drop the (unused) virtual destructor on `BaseAttrsNode` (ffi::Object
uses a captured-typed deleter, no virtual dispatch needed) and inline
the trivial 3-line `DictAttrs(Map)` constructor into the header.
- Rename `BaseAttrsNode` → `AttrsNode`; the `Base` prefix existed only
to distinguish from the `AttrsNodeReflAdapter` shim that #19607
removed. The `"ir.Attrs"` FFI registry key is unchanged.
- Promote `DictAttrs` to NOTNULLABLE
(`TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE` + COW macro). The
no-arg `DictAttrs()` constructor already created an empty backing,
so every existing call site already produced a defined object;
~15 defensive `attrs.defined()` checks (and a defensive Python `None`
fallback in `Function`) are now redundant.
- Inline the `WithAttr(DictAttrs, ...)` / `WithAttrs(DictAttrs, ...)`
free-function overloads into the TFunc-template wrappers — those
overloads had no external callers (no TVM_DLL, no Python binding).
- Rename `AttrsWithDefaultValues<T>` → `PassConfigWithDefaults<T>` and
move from `attrs.h` to `transform.h`; all 9 consumers are pass-config
classes registered via `TVM_REGISTER_PASS_CONFIG_OPTION`.
`attrs.h` shrinks from 363 → 262 lines.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]