Skip to content

Commit e00325c

Browse files
committed
merged
2 parents 93c1e54 + cb6ce95 commit e00325c

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

cuda_core/tests/test_compiler.py

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

cuda_core/tests/test_device.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ def test_compute_capability():
5050
minor = handle_return(cudart.cudaDeviceGetAttribute(
5151
cudart.cudaDeviceAttr.cudaDevAttrComputeCapabilityMinor, device.device_id))
5252
expected_cc = ComputeCapability(major, minor)
53-
assert device.compute_capability == expected_cc
53+
assert device.compute_capability == expected_cc

cuda_core/tests/test_event.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ def test_is_done():
3535
def test_handle():
3636
options = EventOptions()
3737
event = Event._init(options)
38-
assert isinstance(event.handle, int)
38+
assert isinstance(event.handle, int)

cuda_core/tests/test_memory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,4 @@ def test_buffer_close():
6868
buffer = dummy_mr.allocate(size=1024)
6969
buffer.close()
7070
assert buffer.handle == 0
71-
assert buffer.memory_resource == None
71+
assert buffer.memory_resource == None

cuda_core/tests/test_program.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ def test_program_close():
4747
code = "extern \"C\" __global__ void my_kernel() {}"
4848
program = Program(code, "c++")
4949
program.close()
50-
assert program.handle is None
50+
assert program.handle is None

0 commit comments

Comments
 (0)