shiwenloong commented on a change in pull request #6232:
URL: https://github.com/apache/incubator-tvm/pull/6232#discussion_r467655004



##########
File path: include/tvm/relay/attrs/reduce.h
##########
@@ -60,6 +60,37 @@ struct ReduceAttrs : public tvm::AttrsNode<ReduceAttrs> {
         "Whether to perform reduction on axis that are NOT in axis instead.");
   }
 };
+
+struct VarianceAttrs : public tvm::AttrsNode<VarianceAttrs> {

Review comment:
       If `VarianceAttrs` is inherited from `ReduceAttrs`, `VarianceAttrs` 
varaibles in python can't visit `unbiased` because it is inherited from 
`tvm::AttrsNode<ReduceAttrs>` instead of `tvm::AttrsNode<VarianceAttrs>`. For 
example, `orig.attrs.unbiased` in `_tensor_grad.py:592` will be confronted with 
the bug.
   
https://github.com/apache/incubator-tvm/blob/375d377e6134e74ae6b7b489dde6182045b24774/python/tvm/relay/op/_tensor_grad.py#L588-L592




----------------------------------------------------------------
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]


Reply via email to