Skip to content
Open
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: 6 additions & 0 deletions numba_cuda/numba/cuda/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,9 @@
)

from numba.cuda.np.ufunc import vectorize, guvectorize

# Re-export typeof
from numba.cuda.misc.special import (
literally,
literal_unroll,
)
4 changes: 4 additions & 0 deletions numba_cuda/numba/cuda/simulator/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,7 @@ def jitwrapper(fn):
def defer_cleanup():
# No effect for simulator
yield


class grid(object):
pass
8 changes: 7 additions & 1 deletion numba_cuda/numba/cuda/simulator/memory_management/nrt.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# SPDX-License-Identifier: BSD-2-Clause

from numba.cuda import config
from collections import namedtuple

_nrt_mstats = namedtuple("nrt_mstats", ["alloc", "free", "mi_alloc", "mi_free"])


class RTSys:
Expand All @@ -11,9 +14,12 @@ def __init__(self, *args, **kwargs):
def memsys_enable_stats(self):
pass

def get_allocation_stats(self):
def memsys_disable_stats(self):
pass

def get_allocation_stats(self):
return _nrt_mstats(alloc=0, free=0, mi_alloc=0, mi_free=0)


rtsys = RTSys()

Expand Down
13 changes: 10 additions & 3 deletions numba_cuda/numba/cuda/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
# Typing


class CUDATypingContext(typing.BaseContext):
class CUDATypingContext(typing.Context):
def load_additional_registries(self):
from . import (
cudadecl,
Expand All @@ -58,6 +58,7 @@ def load_additional_registries(self):
self.install_registry(vector_types.typing_registry)
self.install_registry(fp16.typing_registry)
self.install_registry(bf16.typing_registry)
self.install_registry(npydecl.registry)

def resolve_value_type(self, val):
# treat other dispatcher object as another device function
Expand Down Expand Up @@ -176,8 +177,13 @@ def load_additional_registries(self):
from numba.cuda.cpython import builtins as cpython_builtins
from numba.cuda.core import optional # noqa: F401
from numba.cuda.misc import cffiimpl
from numba.cuda.np import arrayobj, npdatetime, polynomial, arraymath

from numba.cuda.np import (
arrayobj,
npdatetime,
polynomial,
arraymath,
npyimpl,
)
from . import (
cudaimpl,
fp16,
Expand Down Expand Up @@ -218,6 +224,7 @@ def load_additional_registries(self):
self.install_registry(npdatetime.registry)
self.install_registry(arrayobj.registry)
self.install_registry(arraymath.registry)
self.install_registry(npyimpl.registry)

# Install only implementations that are defined outside of numba (i.e.,
# in third-party extensions) from Numba's builtin_registry.
Expand Down
Loading