You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by jw...@apache.org on 2021/01/22 02:05:39 UTC

[tvm] branch main updated: add a shape function and dynamic test for round (#7324)

This is an automated email from the ASF dual-hosted git repository.

jwfromm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new 17ae44d  add a shape function and dynamic test for round (#7324)
17ae44d is described below

commit 17ae44dbb8ce65bd72af1e2400d5796ed14277e5
Author: Matthew Brookhart <mb...@octoml.ai>
AuthorDate: Thu Jan 21 19:05:25 2021 -0700

    add a shape function and dynamic test for round (#7324)
---
 python/tvm/relay/op/_tensor.py | 1 +
 tests/python/relay/test_any.py | 1 +
 2 files changed, 2 insertions(+)

diff --git a/python/tvm/relay/op/_tensor.py b/python/tvm/relay/op/_tensor.py
index 6fc4233..7728d6e 100644
--- a/python/tvm/relay/op/_tensor.py
+++ b/python/tvm/relay/op/_tensor.py
@@ -235,6 +235,7 @@ def elemwise_shape_func(attrs, inputs, _):
 
 register_shape_func("cast", False, elemwise_shape_func)
 register_shape_func("cast_like", False, elemwise_shape_func)
+register_shape_func("round", False, elemwise_shape_func)
 register_shape_func("zeros", False, no_data_full_shape_func)
 register_shape_func("zeros_like", False, elemwise_shape_func)
 register_shape_func("ones", False, no_data_full_shape_func)
diff --git a/tests/python/relay/test_any.py b/tests/python/relay/test_any.py
index a537782..0b575d1 100644
--- a/tests/python/relay/test_any.py
+++ b/tests/python/relay/test_any.py
@@ -120,6 +120,7 @@ def test_any_elemwise():
     verify_any_elemwise((relay.Any(),), (3,), relay.sqrt, np.sqrt)
     verify_any_elemwise((relay.Any(), 2), (5, 2), relay.negative, np.negative)
     verify_any_elemwise((relay.Any(), relay.Any()), (5, 4), relay.exp, np.exp)
+    verify_any_elemwise((relay.Any(),), (3,), relay.round, np.round)
 
 
 @tvm.testing.uses_gpu