tvm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-tvm] hypercubestart commented on a change in pull request #5039: [Relay] GradientCell Relay Pass
Date Thu, 12 Mar 2020 04:40:18 GMT
hypercubestart commented on a change in pull request #5039: [Relay] GradientCell Relay Pass
URL: https://github.com/apache/incubator-tvm/pull/5039#discussion_r391397809
 
 

 ##########
 File path: tests/python/relay/test_pass_gradient_cell.py
 ##########
 @@ -0,0 +1,384 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+import numpy as np
+
+import tvm
+from tvm import relay
+from tvm.relay import create_executor, transform
+from tvm.relay.testing import rand, run_infer_type
+from tvm.testing import assert_allclose
+import pytest
+
+def grad_cell_type(mod, shape, dtype):
+  grad_type = mod.get_global_type_var("GradCell")
+  type_arg = relay.TensorType(shape, dtype)
+  return grad_type(type_arg)
+
+def test_add():
+  mod = tvm.IRModule()
+  mod.import_from_std("gradient.rly")
 
 Review comment:
   yep, thanks for review!

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