tqchen opened a new pull request, #19614:
URL: https://github.com/apache/tvm/pull/19614
## Summary
Now that the ffi container machinery (Array, Optional, Map, Variant) accepts
bare int64_t and bool, the Integer/Bool ObjectRef wrappers add no value in
attribute fields, pass-config options, function-attr flags, and OpAttrMap
registries — every reader paid an extra .IntValue() / ->value unbox per access
for no information gain. This PR is the first stage of phasing out class
Integer and class Bool: migrate the bulk of those sites at the
field-declaration and call-site level. A follow-up will rewrite the remaining
IR-position `Integer(N)` / `Bool(b)` constructors to `IntImm(...)` /
`const_true()` / `const_false()` and delete the two classes entirely.
- Relax Attrs fields and their container forms (`Array<Integer>` /
`Optional<Array<Integer>>` / `Optional<Integer>` / `Optional<Bool>`) migrated
to bare `int64_t` / `bool` (manipulate.h, nn.h, op.h, statistical.h,
script/builder/frame.h, target/virtual_device.h, distributed/global_info.h,
relax/expr.h).
- OpAttrMap registry (`set_attr<Bool>("FPurity", Bool(true))` ↔
`GetAttrMap<Bool>("FPurity")`) migrated to `bool` across ~38 files.
- PassContext config registrations + `GetConfig<Bool>` /
`GetConfig<Integer>` readers, and function-attr `GetAttr<Bool>` /
`GetAttr<Integer>` readers (~42 files), all migrated; `HasNonzeroAttr` in
`ir/attrs.h` dropped its `.IntValue()` unbox.
- Schedule decision arrays (SampleCategorical candidates, perfect-tile
factors, autobind thread_extents, multi-level-tiling levels) migrated to
`Array<int64_t>` / `Optional<int64_t>` — this is a virtual-signature change on
`ConcreteScheduleNode::SampleCategorical` and related methods, acceptable per
the phase-out intent.
- `Variant<Bool, Array<String>>` for `LiftTransformParams.shared_transform`
migrated to `Variant<bool, Array<String>>`.
--
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]