Skip to content

dpctl 0.3.3 integration, package build with tests #118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion conda-recipe/activate_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

if [ ! -z "${ONEAPI_ROOT}" ]; then
. ${ONEAPI_ROOT}/mkl/latest/env/vars.sh
. ${ONEAPI_ROOT}/compiler/latest/env/vars.sh
. ${ONEAPI_ROOT}/compiler/2021.1-beta09/env/vars.sh
. ${ONEAPI_ROOT}/tbb/latest/env/vars.sh
fi
2 changes: 1 addition & 1 deletion conda-recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

if [ ! -z "${ONEAPI_ROOT}" ]; then
. ${ONEAPI_ROOT}/mkl/latest/env/vars.sh
. ${ONEAPI_ROOT}/compiler/latest/env/vars.sh
. ${ONEAPI_ROOT}/compiler/2021.1-beta09/env/vars.sh
. ${ONEAPI_ROOT}/tbb/latest/env/vars.sh
fi

Expand Down
9 changes: 8 additions & 1 deletion conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ requirements:
- setuptools
- numpy-devel >=1.18
- cython
- dpctl =0.3.3
run:
- python

Expand All @@ -26,8 +27,14 @@ build:
test:
requires:
- pytest
- setuptools
- dpctl =0.3.3
source_files:
- examples
- tests
commands:
- source ${ONEAPI_ROOT}/compiler/latest/env/vars.sh && python -c "import dpnp"
- python -c "import dpnp"
- pytest

about:
license: ISSL
Expand Down
2 changes: 1 addition & 1 deletion conda-recipe/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

if [ ! -z "${ONEAPI_ROOT}" ]; then
. ${ONEAPI_ROOT}/mkl/latest/env/vars.sh
. ${ONEAPI_ROOT}/compiler/latest/env/vars.sh
. ${ONEAPI_ROOT}/compiler/2021.1-beta09/env/vars.sh
. ${ONEAPI_ROOT}/tbb/latest/env/vars.sh
fi

Expand Down
4 changes: 2 additions & 2 deletions dpnp/backend/queue_sycl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <CL/sycl.hpp>

#if !defined(DPNP_LOCAL_QUEUE)
#include <dppl_sycl_queue_interface.h>
#include <dppl_sycl_queue_manager.h>
#endif

#define DPNP_QUEUE backend_sycl::get_queue()
Expand Down Expand Up @@ -92,7 +92,7 @@ class backend_sycl
return *queue;
#else
// temporal solution. Started from Sept-2020
DPPLSyclQueueRef DPCtrl_queue = DPPLGetCurrentQueue();
DPPLSyclQueueRef DPCtrl_queue = DPPLQueueMgr_GetCurrentQueue();
return *(reinterpret_cast<cl::sycl::queue*>(DPCtrl_queue));
#endif
}
Expand Down
11 changes: 5 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,12 @@
"""
Detect external SYCL queue handling library
"""
import dpctrl
import dpctl

# TODO this will not work with no Conda environment
_conda_root = os.environ.get('CONDA_PREFIX', "conda_include_error")
_dpctrl_include += [os.path.join(_conda_root, 'include')]
_dpctrl_libpath += [os.path.join(_conda_root, 'lib')]
_dpctrl_lib += ["dpctrlsyclinterface"]
_dpctrl_include += [dpctl.get_include()]
# _dpctrl_libpath = for package build + for local build
_dpctrl_libpath += ["$ORIGIN/../dpctl"] + [os.path.join(dpctl.get_include(), '..')]
_dpctrl_lib += ["DPPLSyclInterface"]
except ImportError:
"""
Set local SYCL queue handler
Expand Down
32 changes: 31 additions & 1 deletion tests/skipped_tests.tbl
Original file line number Diff line number Diff line change
@@ -1,6 +1,35 @@
tests/test_dot.py::test_dot_arange[float32]
tests/test_linalg.py::test_eig_arange[2-float64]
tests/test_linalg.py::test_eig_arange[2-float32]
tests/test_linalg.py::test_eig_arange[2-int64]
tests/test_linalg.py::test_eig_arange[2-int32]
tests/test_linalg.py::test_eig_arange[4-float64]
tests/test_linalg.py::test_eig_arange[4-float32]
tests/test_linalg.py::test_eig_arange[4-int64]
tests/test_linalg.py::test_eig_arange[4-int32]
tests/test_linalg.py::test_eig_arange[8-float64]
tests/test_linalg.py::test_eig_arange[8-float32]
tests/test_linalg.py::test_eig_arange[8-int64]
tests/test_linalg.py::test_eig_arange[8-int32]
tests/test_linalg.py::test_eig_arange[16-float64]
tests/test_linalg.py::test_eig_arange[16-float32]
tests/test_linalg.py::test_eig_arange[16-int64]
tests/test_linalg.py::test_eig_arange[16-int32]
tests/test_linalg.py::test_eig_arange[300-float64]
tests/test_linalg.py::test_eig_arange[300-float32]
tests/test_linalg.py::test_eig_arange[8-float32]
tests/test_linalg.py::test_eig_arange[300-int64]
tests/test_linalg.py::test_eig_arange[300-int32]
tests/test_random.py::test_random_input_size[rand]
tests/test_random.py::test_random_input_size[randn]
tests/test_random.py::test_random_input_shape[random]
tests/test_random.py::test_random_input_shape[random_sample]
tests/test_random.py::test_random_input_shape[randf]
tests/test_random.py::test_random_input_shape[sample]
tests/test_random.py::test_random_check_otput[random]
tests/test_random.py::test_random_check_otput[random_sample]
tests/test_random.py::test_random_check_otput[randf]
tests/test_random.py::test_random_check_otput[sample]
tests/test_random.py::test_random_check_otput[rand]
tests/third_party/cupy/binary_tests/test_elementwise.py::TestElementwise::test_bitwise_and
tests/third_party/cupy/binary_tests/test_elementwise.py::TestElementwise::test_bitwise_or
tests/third_party/cupy/binary_tests/test_elementwise.py::TestElementwise::test_bitwise_xor
Expand Down Expand Up @@ -492,6 +521,7 @@ tests/third_party/cupy/math_tests/test_misc.py::TestMisc::test_clip_min_max_none
tests/third_party/cupy/math_tests/test_misc.py::TestMisc::test_clip_min_none
tests/third_party/cupy/math_tests/test_misc.py::TestMisc::test_external_clip1
tests/third_party/cupy/math_tests/test_misc.py::TestMisc::test_external_clip2
tests/third_party/cupy/math_tests/test_misc.py::TestMisc::test_fmin_nan
tests/third_party/cupy/math_tests/test_misc.py::TestMisc::test_maximum_nan
tests/third_party/cupy/math_tests/test_misc.py::TestMisc::test_minimum_nan
tests/third_party/cupy/math_tests/test_misc.py::TestMisc::test_nan_to_num
Expand Down