tqchen commented on a change in pull request #7809:
URL: https://github.com/apache/tvm/pull/7809#discussion_r618662368
##########
File path: include/tvm/ir/op.h
##########
@@ -270,14 +270,17 @@ class OpRegEntry {
* an higher priority level attribute
* will replace lower priority level attribute.
* Must be bigger than 0.
+ * \param can_override Whether to explicitly allow
+ * overriding the attribute, any non-zero value
+ * implies allowance and 0 means disallowance.
*
* Cannot set with same plevel twice in the code.
*
* \tparam ValueType The type of the value to be set.
*/
template <typename ValueType>
inline OpRegEntry& set_attr(const std::string& attr_name, // NOLINT(*)
- const ValueType& value, int plevel = 10);
+ const ValueType& value, int plevel = 10, int
can_override = 0);
Review comment:
In terms of API interface additional override flag can cause
confusion(because the user might ask how does it interact with the plevel). So
I still think in this case we should not add this argument(for API
conciseness's pov). It is not as frequent when a developer want to override an
intrinsic, and when they do, assuming the knowledge of plevel may not be a bad
thing(or they can just put a very big number)
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]