You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by ho...@apache.org on 2023/09/14 17:52:10 UTC

[tvm] 02/02: update test

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

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

commit 0626ab7b1630eca84ff6ffb852fb2c0040f6bbc8
Author: Hongyi Jin <ji...@gmail.com>
AuthorDate: Thu Sep 14 13:51:49 2023 -0400

    update test
---
 tests/python/disco/test_nccl.py | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/tests/python/disco/test_nccl.py b/tests/python/disco/test_nccl.py
index f0f949ab80..e86c973fc2 100644
--- a/tests/python/disco/test_nccl.py
+++ b/tests/python/disco/test_nccl.py
@@ -22,6 +22,7 @@ import numpy as np
 import pytest
 
 import tvm
+import tvm.testing
 from tvm import dlight as dl
 from tvm import relax as rx
 from tvm.runtime import disco as di
@@ -103,7 +104,7 @@ def test_scatter(session_kind):
 
 @pytest.mark.parametrize("session_kind", _all_session_kinds)
 def test_gather(session_kind):
-    devices = [1, 2]
+    devices = [0, 1]
     sess = session_kind(num_workers=len(devices))
     sess.init_ccl("nccl", *devices)
 
@@ -376,10 +377,4 @@ def test_attention(session_kind):  # pylint: disable=too-many-locals,too-many-st
 
 
 if __name__ == "__main__":
-    test_init(di.ProcessSession)
-    test_allreduce(di.ProcessSession)
-    test_broadcast_from_worker0(di.ProcessSession)
-    test_scatter(di.ProcessSession)
-    test_gather(di.ProcessSession)
-    test_mlp(di.ProcessSession)
-    test_attention(di.ProcessSession)
+    tvm.testing.main()