Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion numba_cuda/numba/cuda/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,11 @@ def bind(self):
"""
cufunc = self._codelibrary.get_cufunc()

if hasattr(self, "target_context") and self.target_context.enable_nrt:
if (
hasattr(self, "target_context")
and self.target_context.enable_nrt
and config.CUDA_NRT_STATS
):
rtsys.ensure_initialized()
rtsys.set_memsys_to_module(cufunc.module)
# We don't know which stream the kernel will be launched on, so
Expand Down
5 changes: 4 additions & 1 deletion numba_cuda/numba/cuda/tests/nrt/test_nrt.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,10 @@ def foo():
arr = cuda_arange(5 * tmp[0]) # noqa: F841
return None

with override_config('CUDA_ENABLE_NRT', True):
with (
override_config('CUDA_ENABLE_NRT', True),
override_config('CUDA_NRT_STATS', True)
):
# Switch on stats
rtsys.memsys_enable_stats()
# check the stats are on
Expand Down
5 changes: 4 additions & 1 deletion numba_cuda/numba/cuda/tests/nrt/test_nrt_refct.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ def tearDown(self):
super(TestNrtRefCt, self).tearDown()

def run(self, result=None):
with override_config("CUDA_ENABLE_NRT", True):
with (
override_config("CUDA_ENABLE_NRT", True),
override_config('CUDA_NRT_STATS', True)
):
super(TestNrtRefCt, self).run(result)

def test_no_return(self):
Expand Down