Skip to content

Commit

Permalink
add ci test
Browse files Browse the repository at this point in the history
  • Loading branch information
dmenig committed Apr 26, 2022
1 parent 7aec4d1 commit 0705661
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test/test_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,29 @@ def test_register_host_memory(self):
drv.memcpy_htod_async(gpu_ary, a_pin, stream)
drv.Context.synchronize()

@mark_cuda_test
def test_stream_priority_setting(self):
if drv.get_version() < (4,):
from py.test import skip

skip("register_host_memory only exists on CUDA 4.0 and later")

import sys

if sys.platform == "darwin":
from py.test import skip

skip("register_host_memory is not supported on OS X")

a = drv.aligned_empty((2 ** 20,), np.float64)
a_pin = drv.register_host_memory(a)

gpu_ary = drv.mem_alloc_like(a)
min_priority, max_priority = drv.get_stream_priority_range()
stream = drv.Stream(priority=np.random.choice(range(min_priority, max_priority)))
drv.memcpy_htod_async(gpu_ary, a_pin, stream)
drv.Context.synchronize()

@mark_cuda_test
# https://github.com/inducer/pycuda/issues/45
def test_recursive_launch(self):
Expand Down

0 comments on commit 0705661

Please sign in to comment.