Skip to content
This repository was archived by the owner on Mar 1, 2023. It is now read-only.

Commit ee0c0ab

Browse files
reazulhoqueDeb, Diptorup
authored andcommitted
Remove dppy backend (numba#44)
* Building NUMBA-DPPY successfully * Removed some missed dppy_driver artifacts * Removed new lines where it makes sense and replaced numba.dppy with .
1 parent 4e266df commit ee0c0ab

38 files changed

Lines changed: 50 additions & 2781 deletions

‎build_for_develop.sh‎

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -25,42 +25,8 @@ while [ "$1" != "" ]; do
2525
shift
2626
done
2727

28-
OPENCL_INCLUDE=""
29-
if [ -z "$OPENCL_HOME" ]; then
30-
OPENCL_INCLUDE=""
31-
else
32-
OPENCL_INCLUDE=-I${OPENCL_HOME}/include
33-
fi
34-
3528
set -x
3629

37-
cd numba/dppy/dppy_driver
38-
39-
$CC ${DEBUG_FLAGS} -Wall -Wextra -Winit-self -Wuninitialized -Wmissing-declarations -std=c99 -fdiagnostics-color=auto -fPIC ${OPENCL_INCLUDE} -c opencllite.c -o opencllite.o
40-
#gcc -g -Wall -Wextra -Winit-self -Wuninitialized -Wmissing-declarations -std=c99 -fdiagnostics-color=auto -pedantic-errors -fPIC -c opencllite.c -o opencllite.o
41-
42-
gcc_ret=$?
43-
if [ $gcc_ret -ne 0 ]; then
44-
echo "opencllite failed to build...exiting"
45-
cd ../../..
46-
exit $gcc_ret
47-
fi
48-
49-
ar rcs libdpglue.a opencllite.o
50-
51-
#gcc -L. -shared -o libdpglue.so -Wl,--whole-archive -lopencllite
52-
$CC ${DEBUG_FLAGS} -Wall -Wextra -Winit-self -Wuninitialized -Wmissing-declarations -std=c99 -fdiagnostics-color=auto -shared -fPIC ${OPENCL_INCLUDE} -o libdpglue_so.so opencllite.c
53-
#gcc -Wall -Wextra -Winit-self -Wuninitialized -Wmissing-declarations -std=c99 -fdiagnostics-color=auto -pedantic-errors -shared -fPIC -o libdpglue_so.so opencllite.c
54-
55-
gcc_ret=$?
56-
if [ $gcc_ret -ne 0 ]; then
57-
echo "opencllite failed to build...exiting"
58-
cd ../../..
59-
exit $gcc_ret
60-
fi
61-
62-
cd ../../..
63-
6430
python setup.py clean --all
65-
python setup.py build_ext --inplace
31+
python setup.py build --inplace
6632
python setup.py develop
Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,5 @@
11
#!/bin/bash
22

3-
OPENCL_INCLUDE=""
4-
if [ -z "$OPENCL_HOME" ]; then
5-
OPENCL_INCLUDE=-I/usr/include
6-
else
7-
OPENCL_INCLUDE=-I${OPENCL_HOME}/include
8-
fi
9-
10-
SRC_PATH="${SRC_DIR}/numba/dppy/dppy_driver"
11-
12-
$CC -Wall -Wextra -Winit-self -Wuninitialized -Wmissing-declarations -std=c99 -fdiagnostics-color=auto -fPIC ${OPENCL_INCLUDE} -c ${SRC_PATH}/opencllite.c -o ${SRC_PATH}/opencllite.o
13-
14-
ar rcs ${SRC_PATH}/libdpglue.a ${SRC_PATH}/opencllite.o
15-
16-
$CC -Wall -Wextra -Winit-self -Wuninitialized -Wmissing-declarations -std=c99 -fdiagnostics-color=auto -shared -fPIC ${OPENCL_INCLUDE} -o ${SRC_PATH}/libdpglue_so.so ${SRC_PATH}/opencllite.c
17-
18-
cp ${SRC_PATH}/libdpglue_so.so $PREFIX/lib/
19-
203
$PYTHON buildscripts/remove_unwanted_files.py
214

22-
MACOSX_DEPLOYMENT_TARGET=10.10 $PYTHON setup.py build_ext --inplace install --single-version-externally-managed --record=record.txt
5+
MACOSX_DEPLOYMENT_TARGET=10.10 $PYTHON setup.py build install --single-version-externally-managed --record=record.txt

‎buildscripts/condarecipe.dppy/meta.yaml‎

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ build:
1717
# optional dependency: required only when omp is chosen as the backend for
1818
# the threading layer
1919
- lib/libiomp5.dylib # [osx]
20-
script_env:
21-
- OEPNCL_HOME
2220

2321
requirements:
2422
# build and run dependencies are duplicated to avoid setuptools issues
@@ -30,25 +28,25 @@ requirements:
3028
- llvm-openmp # [osx]
3129
- intel-openmp # [osx]
3230
host:
33-
- python
34-
- numpy
31+
- python >=3.5
32+
- numpy >=1.17
3533
- setuptools
3634
# On channel https://anaconda.org/numba/
37-
- llvmlite 0.31.*
35+
- llvmlite >=0.31.*
3836
- funcsigs # [py27]
3937
- singledispatch # [py27]
4038
# TBB devel version is to match TBB libs
4139
- tbb-devel >=2018.0.5 # [not ((armv6l or armv7l or aarch64) or (win and py27))]
42-
- cffi >=1.0.0
40+
- dppy
4341
run:
44-
- python >=3.6
45-
- numpy >=1.15
42+
- python >=3.5
43+
- numpy >=1.17
4644
- setuptools
4745
# On channel https://anaconda.org/numba/
48-
- llvmlite 0.31.*
46+
- llvmlite >=0.31.*
4947
- funcsigs # [py27]
5048
- singledispatch # [py27]
51-
- cffi >=1.0.0
49+
- dppy
5250
run_constrained:
5351
# If TBB is present it must be at least this version from Anaconda due to
5452
# build flag issues triggering UB

‎numba/dppy/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from numba import config
77
import numba.testing
8-
from .dppy_driver.driver import *
8+
from dppy.core import *
99
from .device_init import *
1010

1111
def test(*args, **kwargs):

‎numba/dppy/compiler.py‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44

55
from numba.typing.templates import ConcreteTemplate
66
from numba import types, compiler, ir
7-
from .dppy_driver import driver
87
from numba.typing.templates import AbstractTemplate
98
from numba import ctypes_support as ctypes
10-
from numba.dppy.dppy_driver import spirv_generator
119
from types import FunctionType
10+
11+
import dppy.core as driver
12+
from . import spirv_generator
13+
1214
import os
1315

1416
DEBUG=os.environ.get('NUMBA_DPPY_DEBUG', None)
@@ -23,7 +25,7 @@ def _raise_no_device_found_error():
2325

2426
def _raise_invalid_kernel_enqueue_args():
2527
error_message = ("Incorrect number of arguments for enquing dppy.kernel. "
26-
"Usage: dppy_driver.device_env, global size, local size. "
28+
"Usage: device_env, global size, local size. "
2729
"The local size argument is optional.")
2830
raise ValueError(error_message)
2931

@@ -178,7 +180,7 @@ def forall(self, nelem, local_size=64, queue=None):
178180
def __getitem__(self, args):
179181
"""Mimick CUDA python's square-bracket notation for configuration.
180182
This assumes the argument to be:
181-
`dppy_driver.device_env, global size, local size`
183+
`device_env, global size, local size`
182184
"""
183185
ls = None
184186
nargs = len(args)

‎numba/dppy/device_init.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from . import initialize
1919

2020
from .decorators import kernel, autojit
21-
from .dppy_driver.driver import runtime
21+
from dppy.core import runtime
2222
from . import target
2323

2424

‎numba/dppy/dppy_driver/.gitignore‎

Lines changed: 0 additions & 3 deletions
This file was deleted.

‎numba/dppy/dppy_driver/__init__.py‎

Whitespace-only changes.

0 commit comments

Comments
 (0)