1212from numba .np .arrayobj import (_check_const_str_dtype , is_nonelike ,
1313 ty_parse_dtype , ty_parse_shape , numpy_empty_nd )
1414
15+
1516def cuda_empty (shape , dtype ):
1617 pass
1718
@@ -37,6 +38,7 @@ def impl(shape, dtype):
3738 msg = f"Cannot parse input types to function np.empty({ shape } , { dtype } )"
3839 raise errors .TypingError (msg )
3940
41+
4042@unittest .skip
4143class TestNrtRefCt (EnableNRTStatsMixin , TestCase ):
4244
@@ -49,19 +51,22 @@ def test_no_return(self):
4951 """
5052 Test issue #1291
5153 """
54+ n = 10
5255
5356 @cuda .jit
5457 def kernel ():
55- for i in 10 :
56- temp = np .zeros (2 )
58+ for i in range ( n ) :
59+ temp = np .zeros (2 ) # noqa: F841
5760 return 0
5861
5962 init_stats = rtsys .get_allocation_stats ()
6063 kernel [1 ,1 ]()
6164 cur_stats = rtsys .get_allocation_stats ()
65+ breakpoint ()
6266 self .assertEqual (cur_stats .alloc - init_stats .alloc , n )
6367 self .assertEqual (cur_stats .free - init_stats .free , n )
6468
69+
6570class TestNrtBasic (CUDATestCase ):
6671 def test_nrt_launches (self ):
6772 from pynvjitlink .patch import patch_numba_linker
@@ -102,5 +107,6 @@ def g(out_ary):
102107
103108 self .assertEqual (out_ary [0 ], 1 )
104109
110+
105111if __name__ == '__main__' :
106112 unittest .main ()
0 commit comments