# Overrides def get_ufunc_info(self, ufunc_key): return ufunc_db.get_ufunc_info(ufunc_key) # ---------------------------------------------------------------------------- # TargetOptions _options_mixin = include_default_options( "nopython", "forceobj", "looplift", "_nrt", "debug", "boundscheck", "nogil", "no_rewrites", "no_cpython_wrapper", "no_cfunc_wrapper", "parallel", "fastmath", "error_model", "inline", ) class CPUTargetOptions(_options_mixin, TargetOptions): def finalize(self, flags, options): if not flags.is_set("enable_pyobject"): flags.enable_pyobject = True if not flags.is_set("enable_looplift"):
from numba.core.decorators import jit from numba.core.descriptors import TargetDescriptor from numba.core.options import TargetOptions, include_default_options from numba.core.registry import cpu_target from numba.core.target_extension import dispatcher_registry, target_registry from numba.core import utils, types, serialize, compiler, sigutils from numba.np.numpy_support import as_dtype from numba.np.ufunc import _internal from numba.np.ufunc.sigparse import parse_signature from numba.np.ufunc.wrappers import build_ufunc_wrapper, build_gufunc_wrapper from numba.core.caching import FunctionCache, NullCache from numba.core.compiler_lock import global_compiler_lock _options_mixin = include_default_options( "nopython", "forceobj", "boundscheck", "fastmath", ) class UFuncTargetOptions(_options_mixin, TargetOptions): def finalize(self, flags, options): if not flags.is_set("enable_pyobject"): flags.enable_pyobject = True if not flags.is_set("enable_looplift"): flags.enable_looplift = True flags.inherit_if_not_set("nrt", default=True) if not flags.is_set("debuginfo"):
# ---------------------------------------------------------------------------- # TargetOptions _options_mixin = include_default_options( "nopython", "forceobj", "looplift", "_nrt", "debug", "boundscheck", "nogil", "no_rewrites", "no_cpython_wrapper", "no_cfunc_wrapper", "parallel", "fastmath", "error_model", "inline", "forceinline", # Add "target_backend" as a accepted option for the CPU in @jit(...) "target_backend", "_dbg_extend_lifetimes", "_dbg_optnone", ) class CPUTargetOptions(_options_mixin, TargetOptions): def finalize(self, flags, options): if not flags.is_set("enable_pyobject"): flags.enable_pyobject = True