Skip to content

Commit 5e83ed8

Browse files
authored
Merge pull request #7 from diptorupd/refactor_imports
Refactor imports
2 parents 9a2fa1b + e0cab44 commit 5e83ed8

File tree

8 files changed

+25
-15
lines changed

8 files changed

+25
-15
lines changed

dppl/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
'''
4848
__author__ = "Intel Corp."
4949

50-
from ._version import get_versions
5150
from ._oneapi_interface import *
51+
from ._version import get_versions
52+
5253
__version__ = get_versions()['version']
5354
del get_versions

dppl/driverapi.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
### functions.
2424
##===----------------------------------------------------------------------===##
2525

26-
from cffi import FFI
2726
import os
28-
import sys
29-
from distutils import sysconfig
27+
28+
from cffi import FFI
29+
3030

3131
ffi = FFI()
3232

dppl/ocldrv.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,15 @@
4141

4242
from __future__ import absolute_import, division, print_function
4343

44-
from ._dppl_bindings import ffi, lib
45-
from numpy import ndarray
4644
from contextlib import contextmanager
4745
import ctypes
48-
4946
import logging
5047

48+
from numpy import ndarray
49+
50+
from ._dppl_bindings import ffi, lib
51+
52+
5153
__author__ = "Intel Corp."
5254

5355
_logger = logging.getLogger(__name__)

dppl/tests/test_dump_functions.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@
1414
# limitations under the License.
1515
#******************************************************************************/
1616

17-
import unittest
18-
import dppl
19-
import dppl.ocldrv as drv
2017
from contextlib import contextmanager
2118
import ctypes
19+
import dppl
2220
import io
2321
import os, sys
2422
import tempfile
23+
import unittest
24+
25+
import dppl.ocldrv as drv
26+
2527

2628
libc = ctypes.CDLL(None)
2729
c_stdout = ctypes.c_void_p.in_dll(libc, 'stdout')

examples/create_sycl_queues.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
from __future__ import print_function
2+
23
from dppl import runtime, device_context, device_type
34

5+
46
# Global runtime object inside dppl
57
rt = runtime
68

scripts/build_for_conda.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if [[ conda_build_ret -ne 0 ]]; then
2727
esac
2828
fi
2929

30-
export ONEAPI_ROOT="/opt/intel/inteloneapi"
30+
export ONEAPI_ROOT="/opt/intel/oneapi"
3131

3232
conda build --output-folder ${CONDA_PKG_DIR} ${CHANNELS} conda-recipe
3333

scripts/build_for_develop.sh

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

77
INSTALL_PREFIX=`pwd`/../install
8-
export ONEAPI_ROOT=/opt/intel/inteloneapi
8+
export ONEAPI_ROOT=/opt/intel/oneapi
99
DPCPP_ROOT=${ONEAPI_ROOT}/compiler/latest/linux
1010
PYTHON_INC=`python -c "import distutils.sysconfig; \
1111
print(distutils.sysconfig.get_python_inc())"`

setup.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,15 @@
2121
### \file
2222
### This file builds the dppl and dppl.ocldrv extension modules.
2323
##===----------------------------------------------------------------------===##
24-
import sys
25-
import numpy as np
2624
import os
25+
import sys
2726
import versioneer
28-
from setuptools import setup, Extension
27+
2928
from Cython.Build import cythonize
29+
from setuptools import setup, Extension
30+
31+
import numpy as np
32+
3033

3134
requirements = [
3235
'cffi>=1.0.0',

0 commit comments

Comments
 (0)