Skip to content

Commit 43641c7

Browse files
committed
fix sim failures
1 parent 13395d4 commit 43641c7

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

numba_cuda/numba/cuda/simulator/memory_management/nrt.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
# SPDX-License-Identifier: BSD-2-Clause
33

44
from numba.cuda import config
5+
from collections import namedtuple
6+
7+
_nrt_mstats = namedtuple("nrt_mstats", ["alloc", "free", "mi_alloc", "mi_free"])
58

69

710
class RTSys:
@@ -11,9 +14,12 @@ def __init__(self, *args, **kwargs):
1114
def memsys_enable_stats(self):
1215
pass
1316

14-
def get_allocation_stats(self):
17+
def memsys_disable_stats(self):
1518
pass
1619

20+
def get_allocation_stats(self):
21+
return _nrt_mstats(alloc=0, free=0, mi_alloc=0, mi_free=0)
22+
1723

1824
rtsys = RTSys()
1925

numba_cuda/numba/cuda/tests/test_array_attr.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
from numba.cuda.testing import CUDATestCase
1313
from numba.core.errors import TypingError
1414
from numba.cuda.tests.support import override_config
15+
from numba.cuda import config
16+
17+
if config.ENABLE_CUDASIM:
18+
raise unittest.SkipTest("Array attribute tests not done in simulator")
1519

1620

1721
def array_itemsize(a, res):

numba_cuda/numba/cuda/tests/test_array_iterators.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
from numba.cuda.testing import CUDATestCase
1212
import unittest
1313
import itertools
14+
from numba.cuda import config
15+
16+
if config.ENABLE_CUDASIM:
17+
raise unittest.SkipTest("Array iterator tests not done in simulator")
1418

1519

1620
def array_iter(arr, out):

0 commit comments

Comments
 (0)