Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

numba.core.errors.CompilerError: Failed in nopython mode pipeline (step: analyzing bytecode) / Illegal IR, del found at: del foo #9590

Open
3 tasks done
Semnodime opened this issue May 27, 2024 · 1 comment
Labels
bug - documentation incorrect documentation is incorrect or missing something important

Comments

@Semnodime
Copy link

Reporting a bug

  • I have searched the existing issues via is:issue in:title "Illegal IR"
  • I have tried using the latest released version of Numba (numba==0.59.1)
  • I have included a self contained code sample to reproduce the problem.

Error

/bin/python bug.py 
Traceback (most recent call last):
  File "bug.py", line 11, in <module>
    foo()
  File "/lib/python3.12/site-packages/numba/core/dispatcher.py", line 487, in _compile_for_args
    raise e
  File "/lib/python3.12/site-packages/numba/core/dispatcher.py", line 420, in _compile_for_args
    return_val = self.compile(tuple(argtypes))
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/numba/core/dispatcher.py", line 957, in compile
    cres = self._compiler.compile(args, return_type)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/numba/core/dispatcher.py", line 125, in compile
    status, retval = self._compile_cached(args, return_type)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/numba/core/dispatcher.py", line 139, in _compile_cached
    retval = self._compile_core(args, return_type)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/numba/core/dispatcher.py", line 152, in _compile_core
    cres = compiler.compile_extra(self.targetdescr.typing_context,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/numba/core/compiler.py", line 751, in compile_extra
    return pipeline.compile_extra(func)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/numba/core/compiler.py", line 445, in compile_extra
    return self._compile_bytecode()
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/numba/core/compiler.py", line 513, in _compile_bytecode
    return self._compile_core()
           ^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/numba/core/compiler.py", line 492, in _compile_core
    raise e
  File "/lib/python3.12/site-packages/numba/core/compiler.py", line 479, in _compile_core
    pm.run(self.state)
  File "/lib/python3.12/site-packages/numba/core/compiler_machinery.py", line 368, in run
    raise patched_exception
  File "/lib/python3.12/site-packages/numba/core/compiler_machinery.py", line 356, in run
    self._runPass(idx, pass_inst, state)
  File "/lib/python3.12/site-packages/numba/core/compiler_lock.py", line 35, in _acquire_compile_lock
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/numba/core/compiler_machinery.py", line 318, in _runPass
    enforce_no_dels(internal_state.func_ir)
  File "/lib/python3.12/site-packages/numba/core/ir_utils.py", line 2219, in enforce_no_dels
    raise CompilerError(msg, loc=dels[0].loc)
numba.core.errors.CompilerError: Failed in nopython mode pipeline (step: analyzing bytecode)
Illegal IR, del found at: del bar

File "bug.py", line 7:
def foo():
    <source elided>
    bar = []
    del bar
    ^

Reproducer

from numba import njit


@njit
def foo():
    bar = []
    del bar


if __name__ == '__main__':
    foo()
@gmarkall
Copy link
Member

del is not supported - I see we don't list it as supported, but we also don't list it as unsupported - in #9593 I've added a note that it is unsupported.

@sklam sklam added the bug - documentation incorrect documentation is incorrect or missing something important label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug - documentation incorrect documentation is incorrect or missing something important
Projects
None yet
Development

No branches or pull requests

3 participants