Skip to content

Commit ee51094

Browse files
committed
Import cupy inside GPU gated test.
Prevent failure for the test suite on CPU image since cupy isn't available on it.
1 parent 772fd97 commit ee51094

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/test_cupy.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import unittest
22

3-
import cupy as cp
4-
53
from common import gpu_test
64

75

86
class TestCupy(unittest.TestCase):
97
@gpu_test
108
def test_kernel(self):
9+
import cupy as cp
1110
x = cp.arange(6, dtype='f').reshape(2, 3)
1211
y = cp.arange(3, dtype='f')
1312
kernel = cp.ElementwiseKernel(

0 commit comments

Comments
 (0)