Skip to content

Commit 4e3c87c

Browse files
authored
Update test_solve.py
1 parent 6e2c3c7 commit 4e3c87c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/third_party/cupy/linalg_tests/test_solve.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ def test_solve(self):
6767

6868
def check_shape(self, a_shape, b_shape, error_types):
6969
for xp, error_type in error_types.items():
70+
# TODO: to roll back the change once the issue with CUDA support is resolved for random
71+
# a = xp.random.rand(*a_shape)
72+
# b = xp.random.rand(*b_shape)
7073
if xp is cupy and cupy.is_cuda_backend():
7174
a = xp.asarray(numpy.random.rand(*a_shape))
7275
b = xp.asarray(numpy.random.rand(*b_shape))
@@ -149,6 +152,8 @@ def check_x(self, a_shape, dtype):
149152
testing.assert_array_equal(a_gpu_copy, a_gpu)
150153

151154
def check_shape(self, a_shape):
155+
# TODO: to roll back the change once the issue with CUDA support is resolved for random
156+
# a = cupy.random.rand(*a_shape)
152157
a = cupy.asarray(numpy.random.rand(*a_shape))
153158
with self.assertRaises(cupy.linalg.LinAlgError):
154159
cupy.linalg.inv(a)
@@ -266,6 +271,9 @@ def check_lstsq_solution(
266271
return results
267272

268273
def check_invalid_shapes(self, a_shape, b_shape):
274+
# TODO: to roll back the change once the issue with CUDA support is resolved for random
275+
# a = cupy.random.rand(*a_shape)
276+
# b = cupy.random.rand(*b_shape)
269277
a = cupy.asarray(numpy.random.rand(*a_shape))
270278
b = cupy.asarray(numpy.random.rand(*b_shape))
271279
with pytest.raises(cupy.linalg.LinAlgError):
@@ -342,11 +350,15 @@ def check_x(self, a_shape, ind, dtype):
342350
testing.assert_array_equal(a_gpu_copy, a_gpu)
343351

344352
def check_shape(self, a_shape, ind):
353+
# TODO: to roll back the change once the issue with CUDA support is resolved for random
354+
# a = cupy.random.rand(*a_shape)
345355
a = cupy.asarray(numpy.random.rand(*a_shape))
346356
with self.assertRaises(cupy.linalg.LinAlgError):
347357
cupy.linalg.tensorinv(a, ind=ind)
348358

349359
def check_ind(self, a_shape, ind):
360+
# TODO: to roll back the change once the issue with CUDA support is resolved for random
361+
# a = cupy.random.rand(*a_shape)
350362
a = cupy.asarray(numpy.random.rand(*a_shape))
351363
with self.assertRaises(ValueError):
352364
cupy.linalg.tensorinv(a, ind=ind)

0 commit comments

Comments
 (0)