SiriusNEO commented on code in PR #14171:
URL: https://github.com/apache/tvm/pull/14171#discussion_r1123200580


##########
python/tvm/relax/frontend/torch/fx_translator.py:
##########
@@ -158,6 +158,12 @@ def _mul(self, node: fx.node.Node) -> relax.Expr:
             return self._call_binary_op(relax.op.multiply, lhs, rhs)
         return lhs * rhs
 
+    def _pow(self, node: fx.node.Node) -> relax.Expr:
+        lhs, rhs = self.retrieve_args(node)
+        if isinstance(lhs, relax.Var) or isinstance(rhs, relax.Var):
+            return self._call_binary_op(relax.op.power, lhs, rhs)
+        return lhs - rhs

Review Comment:
   The problem is that the test coverage of `test_frontend_from_fx` is not 
enough. It is because this frontend is a really hack one for 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to