Skip to content

Commit c77c27b

Browse files
committed
Don't use MemoryLeakMixin for tests that don't use NRT
Some recent vendorings resulted in the `MemoryLeakMixin` class being a base for some tests. The side effect of this is that it now enables NRT stats counting on-device. There seem to be some cleanup issues with NRT stats counting (it ought to be robust when used with tests in general, but as #517 notes, it seems not to be). In order to reduce the incidence of spurious failures from this (especially when testing on a fast machine), we disable the `MemoryLeakMixin` for tests that aren't using NRT (which is still experimental for CUDA anyway).
1 parent 99cab49 commit c77c27b

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

numba_cuda/numba/cuda/tests/cudapy/test_ufuncs.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@
1010
from numba.cuda import config
1111
from numba.cuda.np import numpy_support
1212
from numba.cuda.tests.support import TestCase
13-
from numba.cuda.tests.support import MemoryLeakMixin
1413

1514

16-
class BaseUFuncTest(MemoryLeakMixin):
15+
class BaseUFuncTest:
1716
def setUp(self):
18-
super(BaseUFuncTest, self).setUp()
1917
self.inputs = [
2018
(np.uint32(0), types.uint32),
2119
(np.uint32(1), types.uint32),

numba_cuda/numba/cuda/tests/test_analysis.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@
1515
from numba.cuda.core import postproc, rewrites, ir_utils
1616
from numba.cuda.core.options import ParallelOptions
1717
from numba.cuda.core.inline_closurecall import InlineClosureCallPass
18-
from numba.cuda.tests.support import (
19-
TestCase,
20-
MemoryLeakMixin,
21-
)
18+
from numba.cuda.tests.support import TestCase
2219
from numba.cuda.core.analysis import (
2320
dead_branch_prune,
2421
rewrite_semantic_constants,
@@ -51,7 +48,7 @@ def compile_to_ir(func):
5148
return func_ir
5249

5350

54-
class TestBranchPruneBase(MemoryLeakMixin, TestCase):
51+
class TestBranchPruneBase(TestCase):
5552
"""
5653
Tests branch pruning
5754
"""

0 commit comments

Comments
 (0)