[TVMScript] Produce empty DictAttrs when R.func_attrs is absent#16844
Conversation
A follow-up to apache#16745. For Relax functions produced in TVMScript, when `R.func_attrs` was not present, the default was set to `None` instead of an empty dictionary.
|
What is the specific reason to have this change? It might be a good invariant to have, just wondering if there was a specific motivation for it. |
|
Overall, to remove a repeated source of bugs. Since most functions are publicly exposed, they'll have at least the This class of bug was only possible because we had two entirely separate ways to represent "has no attributes". Changing the default from |
slyubomirsky
left a comment
There was a problem hiding this comment.
I think I support your reasoning, this is an easily averted source of errors.
A follow-up to #16745. For Relax functions produced in TVMScript, when
R.func_attrswas not present, the default was set toNoneinstead of an empty dictionary.