Skip to content

Commit 4ee5576

Browse files
Add wait for check_usv cupy tests
1 parent d5129a4 commit 4ee5576

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/third_party/cupy/linalg_tests/test_decomposition.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,10 @@ def check_usv(self, shape, dtype):
175175
array = testing.shaped_random(shape, numpy, dtype=dtype, seed=self.seed)
176176
a_cpu = numpy.asarray(array, dtype=dtype)
177177
a_gpu = cupy.asarray(array, dtype=dtype)
178+
a_gpu_queue = a_gpu.sycl_queue
178179
result_cpu = numpy.linalg.svd(a_cpu, full_matrices=self.full_matrices)
179180
result_gpu = cupy.linalg.svd(a_gpu, full_matrices=self.full_matrices)
181+
a_gpu_queue.wait()
180182
# Check if the input matrix is not broken
181183
testing.assert_allclose(a_gpu, a_cpu)
182184

0 commit comments

Comments
 (0)