Skip to content

[QST] Is the numba.extending.{overload,intrinsic} API supported? #830

@sjperkins

Description

@sjperkins

numba affords the developer the ability to overload functions, methods and attributes, as well as implement intrinsics https://numba.readthedocs.io/en/stable/extending/index.html

I've found this very useful for CPU targets and it seems that similar functionality is available in numba CUDA:

def overload(
func,
jit_options=None,
strict=True,
inline="never",
prefer_literal=False,
target="cuda",
**kwargs,
):
"""
A decorator marking the decorated function as typing and implementing
*func* in nopython mode.
The decorated function will have the same formal parameters as *func*
and be passed the Numba types of those parameters. It should return
a function implementing *func* for the given types.
Here is an example implementing len() for tuple types::

but it doesn't appear in the documentation https://nvidia.github.io/numba-cuda/index.html. Is this functionality supported?

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions