Skip to content

Commit cb6ce95

Browse files
committed
add barebones tests top repo
1 parent 8aed794 commit cb6ce95

File tree

8 files changed

+15
-8
lines changed

8 files changed

+15
-8
lines changed

cuda_core/tests/test_context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from cuda.py._context import Context
1+
from cuda.core._context import Context
22

33
def test_context_initialization():
44
try:

cuda_core/tests/test_device.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from cuda.py._device import Device
1+
from cuda.core._device import Device
22

33
def test_device_initialization():
44
device = Device()

cuda_core/tests/test_event.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from cuda.py._event import Event
1+
from cuda.core._event import Event
22

33
def test_event_initialization():
44
try:

cuda_core/tests/test_launcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from cuda.py._launcher import LaunchConfig
1+
from cuda.core._launcher import LaunchConfig
22

33
def test_launch_initialization():
44
config = LaunchConfig(grid=(1, 1, 1), block=(1, 1, 1), stream=None, shmem_size=0)

cuda_core/tests/test_memory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from cuda.py._memory import Buffer, MemoryResource
1+
from cuda.core._memory import Buffer, MemoryResource
22

33
class DummyMemoryResource(MemoryResource):
44
def __init__(self):

cuda_core/tests/test_module.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from cuda.py._module import Module
1+
from cuda.core._module import ObjectCode
22

33
def test_module_initialization():
44
module_code = b"dummy_code"
55
code_type = "ptx"
6-
module = Module(module=module_code, code_type=code_type)
6+
module = ObjectCode(module=module_code, code_type=code_type)
77
assert module._handle is not None
88
assert module._code_type == code_type
99
assert module._module == module_code

cuda_core/tests/test_program.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from cuda.core._program import Program
2+
3+
def test_program_initialization():
4+
code = "__device__ int test_func() { return 0; }"
5+
program = Program(code, "c++")
6+
assert program._handle is not None
7+
assert program._backend == "nvrtc"

cuda_core/tests/test_stream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from cuda.py._stream import Stream
1+
from cuda.core._stream import Stream
22

33
def test_stream_initialization():
44
try:

0 commit comments

Comments
 (0)