Skip to content

Commit 074a6ca

Browse files
committed
Fix test to avoid cuRAND dependency
Replace cp.random.default_rng() with cp.arange() to avoid requiring cuRAND library which may not match the installed CUDA version.
1 parent cc13ecf commit 074a6ca

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

cuda_core/tests/test_launcher.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -348,13 +348,11 @@ def test_launch_with_buffers_allocated_by_memory_resource(init_cuda, memory_reso
348348
else:
349349
array = cp.from_dlpack(buffer).view(dtype=dtype)
350350

351-
# Initialize data with random values
351+
# Initialize data with arbitrary values
352352
if mr.is_host_accessible:
353-
rng = np.random.default_rng()
354-
array[:] = rng.random(size, dtype=dtype)
353+
array[:] = np.arange(size, dtype=dtype) + 1.0
355354
else:
356-
rng = cp.random.default_rng()
357-
array[:] = rng.random(size, dtype=dtype)
355+
array[:] = cp.arange(size, dtype=dtype) + 1.0
358356

359357
# Store original values for verification
360358
original = array.copy()

0 commit comments

Comments
 (0)