Fix topi test for tensorcore (#5563)
authorRamana Radhakrishnan <ramana.radhakrishnan@arm.com>
Mon, 11 May 2020 19:00:26 +0000 (20:00 +0100)
committerGitHub <noreply@github.com>
Mon, 11 May 2020 19:00:26 +0000 (12:00 -0700)
topi/tests/python/test_topi_conv2d_nhwc_winograd.py

index a7e5532..7cb4041 100644 (file)
@@ -137,6 +137,9 @@ def test_conv2d_nhwc_winograd_direct():
 
 def test_conv2d_nhwc_winograd_tensorcore():
     """Test the conv2d with winograd for nhwc layout"""
+    if not tvm.gpu(0).exist or not tvm.runtime.enabled("cuda"):
+        print("skip because cuda is not enabled..")
+        return
     if not nvcc.have_tensorcore(tvm.gpu(0).compute_version):
         return
     verify_conv2d_nhwc(8,  64, 56,  64, 3, 1, 1, bgemm="tensorcore")