def _get_jit_decorator(self):
        """Gets a jit decorator suitable for the current target"""

        from numba.core.target_extension import (target_registry,
                                                 get_local_target,
                                                 jit_registry)

        jitter_str = self.metadata.get('target', 'generic')
        jitter = jit_registry.get(jitter_str, None)

        if jitter is None:
            # No JIT known for target string, see if something is
            # registered for the string and report if not.
            target_class = target_registry.get(jitter_str, None)
            if target_class is None:
                msg = ("Unknown target '{}', has it been ",
                       "registered?")
                raise ValueError(msg.format(jitter_str))

            target_hw = get_local_target(self.context)

            # check that the requested target is in the hierarchy for the
            # current frame's target.
            if not issubclass(target_hw, target_class):
                msg = "No overloads exist for the requested target: {}."

            jitter = jit_registry[target_hw]

        if jitter is None:
            raise ValueError("Cannot find a suitable jit decorator")

        return jitter
Gets a jit decorator suitable for the current target
numba/core/typing/templates.py