Skip to content
This repository was archived by the owner on Jul 28, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
2abf0d5
Update Numba to 0.57
guilhermeleobas Apr 25, 2023
84d2ca2
Fix a bug where returned structs were being allocated on the stack. R…
guilhermeleobas May 2, 2023
be0833d
undo changes
guilhermeleobas May 3, 2023
f88caea
Install llvm-14 with Numba 0.57 and llvm 11 with Numba 0.56
guilhermeleobas May 5, 2023
738da48
exclude numba 0.56 / python 3.11 from the matrix
guilhermeleobas May 9, 2023
157a97c
refactor matrix
guilhermeleobas May 9, 2023
048a921
fix rbc_test.yaml
guilhermeleobas May 9, 2023
b7286cb
attempt to install numba from numba channel
guilhermeleobas May 9, 2023
700e953
add numba channel
guilhermeleobas May 9, 2023
935bebf
replace strict priority by flexible
guilhermeleobas May 9, 2023
2f01d50
remove features
guilhermeleobas Apr 28, 2023
8a47435
raise error on LLVM version mismatch
guilhermeleobas May 9, 2023
3648591
add test for numba/heavydb llvm mismatch
guilhermeleobas May 9, 2023
ea6f679
add CI job for LLVM mismatch
guilhermeleobas May 9, 2023
30b550e
flake8
guilhermeleobas May 9, 2023
bdcf176
retrieve target info from heavydb.targets
guilhermeleobas May 9, 2023
31ab121
add llvm_version to remote jit target info
guilhermeleobas May 9, 2023
40b5d75
use string quotes to specify python version
guilhermeleobas May 9, 2023
5337fe1
undo change
guilhermeleobas May 10, 2023
4717732
document DISABLE_LLVM_MISMATCH_ERROR on envvars.rst
guilhermeleobas May 10, 2023
11fe42a
replace exception by warning
guilhermeleobas May 10, 2023
1f73a5c
update test and environment.yml
guilhermeleobas May 10, 2023
6c8ee44
isort
guilhermeleobas May 12, 2023
a910461
add heavyai 7.0.0 from docker
guilhermeleobas May 12, 2023
3f12d8f
address reviewer comments
guilhermeleobas Jun 12, 2023
89f1b2f
flake8
guilhermeleobas Jun 12, 2023
c3fd246
Merge remote-tracking branch 'upstream/main' into guilhermeleobas/upd…
guilhermeleobas Jun 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 20 additions & 9 deletions .github/workflows/rbc_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,19 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.10', '3.9', '3.8']
numba-version: ['0.56', '0.55']
python-version: ['3.10', '3.9']
numba-version: ['0.56']
heavydb-version: ['6.2', '6.1', '6.0']
Comment thread
pearu marked this conversation as resolved.
llvm-version: ['11.1']
heavydb-from: [conda]
# include:
include:
- os: ubuntu-latest
python-version: '3.11'
numba-version: '0.57'
llvm-version: '14'
heavydb-version: '7.0'
docker-image: heavyai/heavyai-ee-cpu:7.0.0
heavydb-from: docker
# - os: ubuntu-latest
# python-version: '3.10'
# numba-version: '0.56'
Expand Down Expand Up @@ -140,8 +148,8 @@ jobs:
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
channel-priority: strict
channels: conda-forge
channel-priority: flexible
channels: conda-forge,numba

- name: Install mamba
shell: bash -l {0}
Expand Down Expand Up @@ -197,6 +205,9 @@ jobs:
cat environment.yml > rbc_test.yaml
echo " - numba=${{ matrix.numba-version }}" >> rbc_test.yaml
echo " - python=${{ matrix.python-version }}" >> rbc_test.yaml
echo " - clang=${{ matrix.llvm-version }}" >> rbc_test.yaml
echo " - clangxx=${{ matrix.llvm-version }}" >> rbc_test.yaml

mamba env create --file=rbc_test.yaml -n rbc

- name: rbc conda config
Expand Down Expand Up @@ -229,9 +240,9 @@ jobs:
pkill -f heavydb
mamba run -n rbc pytest -sv -r A rbc/tests/ -x --ignore rbc/tests/heavydb

- name: Run rbc tests
- name: Run rbc tests [conda]
shell: bash -l {0}
if: ${{ ! ( matrix.os == 'ubuntu-latest' && matrix.heavydb-from == 'docker' ) }}
if: matrix.heavydb-from == 'conda'
env:
HEAVYDB_SOURCE: ${{ matrix.heavydb-from }}
EXPECTED_PYTHON_VERSION: ${{ matrix.python-version }}
Expand Down Expand Up @@ -290,11 +301,11 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: '3.10'

- uses: conda-incubator/setup-miniconda@v2
with:
python-version: 3.8
python-version: '3.10'
channel-priority: strict
channels: conda-forge
environment-file: environment.yml
Expand Down
6 changes: 3 additions & 3 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ channels:
dependencies:
- python>=3.7
- setuptools
- numba>=0.55
- numba>=0.56
- llvmlite
- clang==11.1
- clangxx==11.1
- clang
- clangxx
Comment thread
pearu marked this conversation as resolved.
- pytest
- packaging
- tblib
Expand Down
3 changes: 2 additions & 1 deletion rbc/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
"""


from rbc.utils import get_version
from numba.core.errors import TypingError

from rbc.utils import get_version


class HeavyDBServerError(Exception):
"""
Expand Down
9 changes: 4 additions & 5 deletions rbc/heavydb/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,11 @@ def deepcopy(self, context, builder, val, retptr):
ptr_type = self.dtype.members[0]
element_size = int64_t(ptr_type.dtype.bitwidth // 8)

struct_load = builder.load(val, name='struct_load')
src = builder.extract_value(struct_load, 0, name='array_buff_ptr')
element_count = builder.extract_value(struct_load, 1, name='array_size')
is_null = builder.extract_value(struct_load, 2, name='array_is_null')

zero, one, two = int32_t(0), int32_t(1), int32_t(2)
src = builder.load(builder.gep(val, [zero, zero]), name='array_buff_ptr')
element_count = builder.load(builder.gep(val, [zero, one]), name='array_size')
is_null = builder.load(builder.gep(val, [zero, two]), name='array_is_null')

Comment thread
guilhermeleobas marked this conversation as resolved.
with builder.if_else(cgutils.is_true(builder, is_null)) as (then, otherwise):
with then:
nullptr = cgutils.get_null_value(src.type)
Expand Down
17 changes: 16 additions & 1 deletion rbc/irtools.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,22 @@ def _get_host_cpu_features(self):
# See https://github.com/xnd-project/rbc/issues/45
remove_features = {
(12, 12): [], (11, 11): [], (10, 10): [], (9, 9): [], (8, 8): [],
(14, 14): ['avx512pf', 'tsxldtrk', 'cx16', 'sahf', 'tbm',
'avx512ifma', 'sha', 'crc32', 'fma4', 'vpclmulqdq',
'prfchw', 'bmi2', 'cldemote', 'fsgsbase', 'ptwrite',
'amxtile', 'uintr', 'gfni', 'popcnt', 'widekl', 'aes',
'avx512bitalg', 'movdiri', 'xsaves', 'avx512er', 'avxvnni',
'avx512fp16', 'avx512vnni', 'amxbf16', 'avx512vpopcntdq',
'pconfig', 'clwb', 'avx512f', 'xsavec', 'clzero', 'pku',
'mmx', 'lwp', 'rdpid', 'xop', 'rdseed', 'waitpkg', 'kl',
'movdir64b', 'sse4a', 'avx512bw', 'clflushopt', 'xsave',
'avx512vbmi2', '64bit', 'avx512vl', 'serialize', 'hreset',
'invpcid', 'avx512cd', 'avx', 'vaes', 'avx512bf16', 'cx8',
'fma', 'rtm', 'bmi', 'enqcmd', 'rdrnd', 'mwaitx', 'sse4.1',
'sse4.2', 'avx2', 'fxsr', 'wbnoinvd', 'sse', 'lzcnt', 'pclmul',
'prefetchwt1', 'f16c', 'ssse3', 'sgx', 'shstk', 'cmov',
'avx512vbmi', 'amxint8', 'movbe', 'avx512vp2intersect',
'xsaveopt', 'avx512dq', 'sse2', 'adx', 'sse3'],
(11, 8): ['tsxldtrk', 'amx-tile', 'amx-bf16', 'serialize', 'amx-int8',
'avx512vp2intersect', 'tsxldtrk', 'amx-tile', 'amx-bf16',
'serialize', 'amx-int8', 'avx512vp2intersect', 'tsxldtrk',
Expand Down Expand Up @@ -231,7 +247,6 @@ def post_lowering(self, mod, library):
# ---------------------------------------------------------------------------
# Code generation methods


@contextmanager
def replace_numba_internals_hack():
# Hackish solution to prevent numba from calling _ensure_finalize. See issue #87
Expand Down
1 change: 1 addition & 0 deletions rbc/libfuncs.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ def check(self, fname):
experimental.vector.reduce.smin.* experimental.vector.reduce.umax.*
experimental.vector.reduce.umin.* experimental.vector.reduce.fmax.*
experimental.vector.reduce.fmin.*
experimental.noalias.scope.decl
flt.rounds var.annotation ptr.annotation annotation
codeview.annotation trap debugtrap stackprotector stackguard
objectsize expect expect.with.probability assume ssa_copy
Expand Down
14 changes: 9 additions & 5 deletions rbc/remotejit.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,20 @@

__all__ = ['RemoteJIT', 'Signature', 'Caller']

import os
import ctypes
import inspect
import os
import warnings
import ctypes
from collections import defaultdict

import llvmlite.binding as llvm

from . import irtools, config
from .errors import UnsupportedError
from .typesystem import Type, get_signature
from .thrift import Server, Dispatcher, dispatchermethod, Data, Client
from .utils import get_local_ip, UNSPECIFIED, validate_devices
from .targetinfo import TargetInfo
from .thrift import Client, Data, Dispatcher, Server, dispatchermethod
from .typesystem import Type, get_signature
from .utils import UNSPECIFIED, get_local_ip, validate_devices


def isfunctionlike(obj):
Expand Down Expand Up @@ -990,6 +993,7 @@ def targets(self) -> dict:
target_info = TargetInfo.host()
target_info.set('has_numba', True)
target_info.set('has_cpython', True)
target_info.set('llvm_version', llvm.llvm_version_info)
return dict(cpu=target_info.tojson())

@dispatchermethod
Expand Down
2 changes: 1 addition & 1 deletion rbc/stdlib/creation_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def _array_api_triu(x, k=0):


@expose.implements('full')
def _impl__full(shape, fill_value, dtype=None):
def _impl_full(shape, fill_value, dtype=None):
"""
Return a new array of given shape and type, filled with fill_value.
"""
Expand Down
9 changes: 5 additions & 4 deletions rbc/tests/heavydb/test_heavydb.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import os
import itertools
import pytest
import os

import numpy as np
import pytest

from rbc.errors import UnsupportedError, HeavyDBServerError
from rbc.tests import heavydb_fixture, assert_equal
from rbc.errors import HeavyDBServerError, UnsupportedError
from rbc.tests import assert_equal, heavydb_fixture
from rbc.typesystem import Type

rbc_heavydb = pytest.importorskip('rbc.heavydb')
Expand Down