You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/09/03 16:42:54 UTC

[GitHub] [tvm] syang-ng commented on a change in pull request #8920: [Bugfix] Fix visit_attrs error if its function pointer is equal to nullptr

syang-ng commented on a change in pull request #8920:
URL: https://github.com/apache/tvm/pull/8920#discussion_r702035289



##########
File path: include/tvm/node/reflection.h
##########
@@ -386,11 +386,13 @@ inline ReflectionVTable::Registry ReflectionVTable::Register() {
 
 inline void ReflectionVTable::VisitAttrs(Object* self, AttrVisitor* visitor) const {
   uint32_t tindex = self->type_index();
-  if (tindex >= fvisit_attrs_.size() || fvisit_attrs_[tindex] == nullptr) {
+  if (tindex >= fvisit_attrs_.size()) {

Review comment:
       Thanks for your valuable advice! I re-submit a new commit to fix this bug by overloading the `__getattr__` and `__dir__`  function on the python container object. Since this commit only focuses on the front-end python container, I think it would not bring any unintended behaviors now.




-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org