numba / llvmlite

A lightweight LLVM python binding for writing JIT compilers
https://llvmlite.pydata.org/
BSD 2-Clause "Simplified" License
1.94k stars 322 forks source link

Remove experimental OrcJIT support due to unforeseen issues #1002

Closed gmarkall closed 1 year ago

gmarkall commented 1 year ago

The OrcJIT support is experimental and as-yet undocumented. It seems to have problems on all platforms that affect testing and package building, in particular #1000 noted on AArch64 and the following on conda-forge package building for x86:

running run_test.py
..s................................................................s.........................................JIT session error: Symbols not found: [ Py_GetVersion ]
E...................................................................................................................................................................................................................................................................
======================================================================
ERROR: test_lookup_current_process_symbol (llvmlite.tests.test_binding.TestOrcLLJIT)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/conda/feedstock_root/build_artifacts/llvmlite_1697110482515/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib/pypy3.9/site-packages/llvmlite/tests/test_binding.py", line 1367, in test_lookup_current_process_symbol
    self.jit(asm_getversion, "getversion", None, True)
  File "/home/conda/feedstock_root/build_artifacts/llvmlite_1697110482515/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib/pypy3.9/site-packages/llvmlite/tests/test_binding.py", line 1241, in jit
    rt = builder\
  File "/home/conda/feedstock_root/build_artifacts/llvmlite_1697110482515/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib/pypy3.9/site-packages/llvmlite/binding/orcjit.py", line 175, in link
    raise RuntimeError(str(outerr))
RuntimeError: Failed to materialize symbols: { (getversion, { getversion }) }

This PR puts forward the idea of backing out the OrcJIT support for now, in order to get 0.41.1 out the door and make a 0.41.x version available on conda-forge.

This effectively reverts #988, #967, and #942, with a little additional fixup due to changes in supported LLVM versions between the original merge and now.

gmarkall commented 1 year ago

As pointed out by @stuartarchibald, the x86 issue is only on PyPy, which may not have the Py_GetVersion symbol. So we should reconsider just skipping the tests on AArch64, and modifying this test to skip on PyPy or use another symbol that will be present rather than pulling the whole lot out.

gmarkall commented 1 year ago

Closing as it seems like we don't need to do this now, from #1001 and conda-forge/llvmlite-feedstock#76.