You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
../numba/numba/core/dispatcher.py:423: in _compile_for_args
error_rewrite(e, 'typing')
../numba/numba/core/dispatcher.py:362: in error_rewrite
raise e
../numba/numba/core/dispatcher.py:375: in _compile_for_args
return_val = self.compile(tuple(argtypes))
../numba/numba/core/dispatcher.py:905: in compile
cres = self._compiler.compile(args, return_type)
../numba/numba/core/dispatcher.py:84: in compile
raise retval
../numba/numba/core/dispatcher.py:94: in _compile_cached
retval = self._compile_core(args, return_type)
../numba/numba/core/dispatcher.py:107: in _compile_core
cres = compiler.compile_extra(self.targetdescr.typing_context,
../numba/numba/core/compiler.py:744: in compile_extra
return pipeline.compile_extra(func)
../numba/numba/core/compiler.py:438: in compile_extra
return self._compile_bytecode()
../numba/numba/core/compiler.py:506: in _compile_bytecode
return self._compile_core()
../numba/numba/core/compiler.py:485: in _compile_core
raise e
../numba/numba/core/compiler.py:472: in _compile_core
pm.run(self.state)
../numba/numba/core/compiler_machinery.py:368: in run
raise patched_exception
../numba/numba/core/compiler_machinery.py:356: in run
self._runPass(idx, pass_inst, state)
../numba/numba/core/compiler_lock.py:35: in _acquire_compile_lock
return func(*args, **kwargs)
../numba/numba/core/compiler_machinery.py:311: in _runPass
mutated |= check(pss.run_pass, internal_state)
../numba/numba/core/compiler_machinery.py:273: in check
mangled = func(compiler_state)
../numba/numba/core/typed_passes.py:112: in run_pass
typemap, return_type, calltypes, errs = type_inference_stage(
../numba/numba/core/typed_passes.py:91: in type_inference_stage
infer.build_constraint()
../numba/numba/core/typeinfer.py:1044: in build_constraint
self.constrain_statement(inst)
../numba/numba/core/typeinfer.py:1406: in constrain_statement
self.typeof_assign(inst)
../numba/numba/core/typeinfer.py:1481: in typeof_assign
self.typeof_global(inst, inst.target, value)
../numba/numba/core/typeinfer.py:1581: in typeof_global
typ = self.resolve_value_type(inst, gvar.value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <numba.core.typeinfer.TypeInferer object at 0x7fb972830bc0>, inst = <numba.core.ir.Assign object at 0x7fb9727f3740>, val = <intrinsic length_of_iterator>
def resolve_value_type(self, inst, val):
"""
Resolve the type of a simple Python value, such as can be
represented by literals.
"""
try:
return self.context.resolve_value_type(val)
except ValueError as e:
msg = str(e)
> raise TypingError(msg, loc=inst.loc)
E numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
E NameError: name 'length_of_iterator' is not defined
../numba/numba/core/typeinfer.py:1502: TypingError
This seems to be some kind of "import order" problem - adding import numba.core.inline_closurecall before the _inner() call fixes the issue. Patching enable_inline_arraycall to False also fixes the issue. Thanks!
The text was updated successfully, but these errors were encountered:
That commit moved length_of_iterator into inline_closurecall, so it is no longer registered when the CPU target is set up (it was moved from numba.cpython.rangeobj.py, which is imported in CPUContext.load_additional_registries() - this explains why importing inline_closurecall seems to resolve the issue.
Reporting a bug
visible in the release notes
(https://numba.readthedocs.io/en/stable/release-notes-overview.html).
i.e. it's possible to run as 'python bug.py'.
The following minimal example fails to compile with 0.60.0rc1 (works fine with 0.59.1):
Error message:
This seems to be some kind of "import order" problem - adding
import numba.core.inline_closurecall
before the_inner()
call fixes the issue. Patchingenable_inline_arraycall
toFalse
also fixes the issue. Thanks!The text was updated successfully, but these errors were encountered: