electriclilies opened a new pull request #9533: URL: https://github.com/apache/tvm/pull/9533
This is a draft PR implementing WithFields on tuples. WithFields is a COW constructor. It returns this* if all the fields passed in are the same as the ones already in this. Otherwise, creates a COW of the tuple, updates the fields of the tuple, and returns the COW tuple. The effect of this is that if there is only one instance of this, the fields that are different are updated on the object, and we return *this. Otherwise, we return a copy of the tuple with the new fields. (Note: WithFields is the same as WithAttrs in behavior.) The motivation for WithFields is to ensure that spans, checked types, and other fields on nodes are propagated correctly during passes so we can rely on that information. If we decide to go ahead with this change, I will also implement WithFields for all other relay exprs. -- 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]
