tvm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-tvm] masahi commented on a change in pull request #4964: [Torch] Add initial control flow support
Date Thu, 05 Mar 2020 22:09:28 GMT
masahi commented on a change in pull request #4964: [Torch] Add initial control flow support

URL: https://github.com/apache/incubator-tvm/pull/4964#discussion_r388596458
 
 

 ##########
 File path: python/tvm/relay/frontend/pytorch.py
 ##########
 @@ -614,6 +615,55 @@ def _impl(inputs, input_types):
         return _op.tensor.sqrt(data)
     return _impl
 
+def _neg():
+    def _impl(inputs, input_types):
+        data = inputs[0]
+        return _op.tensor.negative(data)
+    return _impl
+
+def _tanh():
+    def _impl(inputs, input_types):
+        data = inputs[0]
+        return _op.tensor.tanh(data)
+    return _impl
+
+def _ge():
+    def _impl(inputs, input_types):
+        assert len(inputs) == 2
+        lhs = _wrap_const(inputs[0])
+        rhs = _wrap_const(inputs[1])
+        return _op.tensor.greater_equal(lhs, rhs)
+    return _impl
+
+def _gt():
+    def _impl(inputs, input_types):
+        assert len(inputs) == 2
+        lhs = _wrap_const(inputs[0])
+        rhs = _wrap_const(inputs[1])
+        return _op.tensor.greater(lhs, rhs)
+    return _impl
+
+def _lt():
+    def _impl(inputs, input_types):
+        assert len(inputs) == 2
+        lhs = _wrap_const(inputs[0])
+        rhs = _wrap_const(inputs[1])
+        return _op.tensor.less(lhs, rhs)
+    return _impl
+
+def _Bool():
+    def _impl(inputs, input_types):
 
 Review comment:
   ping? @alexwong

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message