diff --git a/.github/workflows/rbc_test.yml b/.github/workflows/rbc_test.yml index 3d2b1f35..af82f5c0 100644 --- a/.github/workflows/rbc_test.yml +++ b/.github/workflows/rbc_test.yml @@ -114,13 +114,6 @@ jobs: llvm-version: ['11.1'] heavydb-from: [conda] include: - - os: ubuntu-latest - python-version: '3.11' - numba-version: '0.57' - llvm-version: '14' - heavydb-version: '6.2' # if changing this value, update the condition - # on "Run rbc tests [LLVM mismatch]" - heavydb-from: conda - os: ubuntu-latest python-version: '3.11' numba-version: '0.57' @@ -249,7 +242,7 @@ jobs: - name: Run rbc tests [conda] shell: bash -l {0} - if: matrix.heavydb-from == 'conda' && ! (matrix.numba-version == '0.57' && matrix.heavydb-version == '6.2') + if: matrix.heavydb-from == 'conda' env: HEAVYDB_SOURCE: ${{ matrix.heavydb-from }} EXPECTED_PYTHON_VERSION: ${{ matrix.python-version }} @@ -261,19 +254,6 @@ jobs: pkill -f heavydb mamba run -n rbc pytest -sv -r A rbc/tests/ -x --ignore rbc/tests/heavydb - - name: Run rbc tests [LLVM mismatch] - shell: bash -l {0} - if: matrix.numba-version == '0.57' && matrix.heavydb-version == '6.2' - env: - HEAVYDB_SOURCE: ${{ matrix.heavydb-from }} - EXPECTED_PYTHON_VERSION: ${{ matrix.python-version }} - EXPECTED_HEAVYDB_VERSION: ${{ matrix.heavydb-version }} - EXPECTED_NUMBA_VERSION: ${{ matrix.numba-version }} - RBC_TESTS_FULL: TRUE - run: | - mamba run -n rbc pytest -sv -r A rbc/tests/heavydb/test_heavydb.py -k test_numba_heavydb_llvm_mismatch - - - name: Show Heavydb conda logs on failure [conda] shell: bash -l {0} if: failure() && matrix.os == 'ubuntu-latest' && matrix.heavydb-from == 'conda' diff --git a/doc/envvars.rst b/doc/envvars.rst index 28ccedef..1bc34fb6 100644 --- a/doc/envvars.rst +++ b/doc/envvars.rst @@ -14,9 +14,3 @@ Debugging If set to non-zero, insert debug statements to our implementation of Numba Runtime (NRT) - -.. envvar:: DISABLE_LLVM_MISMATCH_WARN - - If set to non-zero, RBC will not raise a warning on Numba/HeavyDB LLVM - mismatch version. Numba 0.57 uses LLVM 14 and may produce IR that - older versions of HeavyDB (< 7.0) cannot read. diff --git a/rbc/heavydb/remoteheavydb.py b/rbc/heavydb/remoteheavydb.py index 1eed9771..919bc7e4 100644 --- a/rbc/heavydb/remoteheavydb.py +++ b/rbc/heavydb/remoteheavydb.py @@ -26,7 +26,6 @@ from rbc.targetinfo import TargetInfo from rbc.irtools import compile_to_LLVM from rbc.errors import ForbiddenNameError, HeavyDBServerError -from rbc.warnings import LLVMVersionMismatchWarning from rbc.utils import parse_version, version_date from rbc import ctools, typesystem @@ -1268,35 +1267,8 @@ def _make_udf(self, caller, orig_sig, sig): name + sig.mangling(), atypes, rtype, annotations) - def _check_llvm_version(self): - # check LLVM version before compiling to LLVM - flag_name = 'RBC_DISABLE_LLVM_MISMATCH_WARN' - flag = int(os.environ.get(flag_name, False)) - - if not flag: - target = self.targets['cpu'] - server_llvm_version = target.llvm_version - client_llvm_version = llvm.llvm_version_info - - if (server_llvm_version[0], client_llvm_version[0]) == (11, 14): - c_llvm = '.'.join(map(str, client_llvm_version)) - s_llvm = '.'.join(map(str, server_llvm_version)) - msg = ( - f'The client LLVM version ({c_llvm}) is greater than the server ' - f'LLVM version ({s_llvm}). This is known to be unsupported. ' - 'Please, downgrade to a previous release of Numba that uses the ' - 'same LLVM version as the HeavyDB server. For more information, ' - 'see the table below:\n\n' - 'https://github.com/numba/llvmlite#compatibility\n' - 'https://github.com/heavyai/heavydb#dependencies\n\n' - f'To suppress this warning, run RBC with {flag_name}=1 ' - 'flag enabled.') - warnings.warn(msg, LLVMVersionMismatchWarning) - def register(self): """Register caller cache to the server.""" - self._check_llvm_version() - with typesystem.Type.alias(**self.typesystem_aliases): return self._register() diff --git a/rbc/irtools.py b/rbc/irtools.py index f6ff752c..3cfb5665 100644 --- a/rbc/irtools.py +++ b/rbc/irtools.py @@ -162,8 +162,6 @@ def _get_host_cpu_features(self): 'prefetchwt1', 'f16c', 'ssse3', 'sgx', 'shstk', 'cmov', 'avx512vbmi', 'amxint8', 'movbe', 'avx512vp2intersect', 'xsaveopt', 'avx512dq', 'sse2', 'adx', 'sse3'], - (14, 11): ['crc32', 'uintr', 'widekl', 'avxvnni', 'avx512fp16', 'kl', - 'hreset'], (11, 8): ['tsxldtrk', 'amx-tile', 'amx-bf16', 'serialize', 'amx-int8', 'avx512vp2intersect', 'tsxldtrk', 'amx-tile', 'amx-bf16', 'serialize', 'amx-int8', 'avx512vp2intersect', 'tsxldtrk', diff --git a/rbc/tests/heavydb/test_heavydb.py b/rbc/tests/heavydb/test_heavydb.py index bfbdde78..f2248615 100644 --- a/rbc/tests/heavydb/test_heavydb.py +++ b/rbc/tests/heavydb/test_heavydb.py @@ -5,7 +5,6 @@ import numpy as np import pytest -from rbc.warnings import LLVMVersionMismatchWarning from rbc.errors import HeavyDBServerError, UnsupportedError from rbc.tests import assert_equal, heavydb_fixture from rbc.typesystem import Type @@ -875,36 +874,3 @@ def rbc_test_non_admin_user_udf(x): # clean up: heavydb.sql_execute(f'DROP DATABASE IF EXISTS {dbname};') heavydb.sql_execute(f'DROP USER IF EXISTS "{user}";') - - -@pytest.mark.parametrize('kind', ('udf', 'udtf')) -def test_numba_heavydb_llvm_mismatch(heavydb, kind): - heavydb.reset() - - # only run this test on a specific environment - target_info = heavydb.targets['cpu'] - server_llvm_version = target_info.llvm_version - client_llvm_version = llvm.llvm_version_info - - if (server_llvm_version[0], client_llvm_version[0]) != (11, 14): - c_llvm = '.'.join(map(str, client_llvm_version)) - s_llvm = '.'.join(map(str, server_llvm_version)) - msg = (f'Test requires server LLVM 14, got {s_llvm}. And client LLVM ' - f'11, got {c_llvm}') - pytest.skip(msg) - - if kind == 'udf': - @heavydb('int32(int32)') - def add(a): - return a + 1 - else: - @heavydb('int32(TableFunctionManager, Column, OutputColumn)') - def column_copy(mgr, inp, out): - size = len(inp) - mgr.set_output_row_size(size) - for i in range(size): - out[i] = inp[i] - return size - - with pytest.warns(LLVMVersionMismatchWarning): - heavydb.register() diff --git a/rbc/warnings.py b/rbc/warnings.py deleted file mode 100644 index f129a41e..00000000 --- a/rbc/warnings.py +++ /dev/null @@ -1,7 +0,0 @@ - -class LLVMVersionMismatchWarning(UserWarning): - """ - Raised when Numba and HeavyDB uses different LLVM version which is known to - be incompatible/problematic. - """ - pass