Skip to content

Commit 35e28a4

Browse files
Enable Compute Follows Data in Cython in fft and linalg (#1132)
1 parent a718039 commit 35e28a4

14 files changed

+1042
-390
lines changed

.github/workflows/conda-package.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,12 +248,14 @@ jobs:
248248

249249
- name: Smoke test
250250
run: python -c "import dpnp, dpctl; dpctl.lsplatform()"
251+
env:
252+
OCL_ICD_FILENAMES: 'libintelocl.so'
251253

252254
# TODO: run the whole scope once the issues on CPU are resolved
253255
- name: Run tests
254-
run: python -m pytest -q -ra --disable-warnings -vv test_arraycreation.py test_dparray.py test_mathematical.py test_special.py
256+
run: python -m pytest -q -ra --disable-warnings -vv test_arraycreation.py test_dparray.py test_fft.py test_linalg.py test_mathematical.py test_special.py
255257
env:
256-
SYCL_ENABLE_HOST_DEVICE: '1'
258+
OCL_ICD_FILENAMES: 'libintelocl.so'
257259
working-directory: ${{ env.tests-path }}
258260

259261
test_windows:
@@ -426,7 +428,7 @@ jobs:
426428

427429
# TODO: run the whole scope once the issues on CPU are resolved
428430
- name: Run tests
429-
run: python -m pytest -q -ra --disable-warnings -vv test_arraycreation.py test_dparray.py test_mathematical.py test_special.py
431+
run: python -m pytest -q -ra --disable-warnings -vv test_arraycreation.py test_dparray.py test_fft.py test_linalg.py test_mathematical.py test_special.py
430432
working-directory: ${{ env.tests-path }}
431433

432434
upload_linux:

dpnp/backend/kernels/dpnp_krnl_common.cpp

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//*****************************************************************************
2-
// Copyright (c) 2016-2020, Intel Corporation
2+
// Copyright (c) 2016-2022, Intel Corporation
33
// All rights reserved.
44
//
55
// Redistribution and use in source and binary forms, with or without
@@ -97,6 +97,7 @@ void dpnp_astype_c(const void* array1_in, void* result1, const size_t size)
9797
size,
9898
dep_event_vec_ref);
9999
DPCTLEvent_WaitAndThrow(event_ref);
100+
DPCTLEvent_Delete(event_ref);
100101
}
101102

102103
template <typename _DataType, typename _ResultType>
@@ -477,6 +478,7 @@ void dpnp_dot_c(void* result_out,
477478
input2_strides,
478479
dep_event_vec_ref);
479480
DPCTLEvent_WaitAndThrow(event_ref);
481+
DPCTLEvent_Delete(event_ref);
480482
}
481483

482484
template <typename _DataType_output, typename _DataType_input1, typename _DataType_input2>
@@ -614,6 +616,7 @@ void dpnp_eig_c(const void* array_in, void* result1, void* result2, size_t size)
614616
size,
615617
dep_event_vec_ref);
616618
DPCTLEvent_WaitAndThrow(event_ref);
619+
DPCTLEvent_Delete(event_ref);
617620
}
618621

619622
template <typename _DataType, typename _ResultType>
@@ -707,6 +710,7 @@ void dpnp_eigvals_c(const void* array_in, void* result1, size_t size)
707710
size,
708711
dep_event_vec_ref);
709712
DPCTLEvent_WaitAndThrow(event_ref);
713+
DPCTLEvent_Delete(event_ref);
710714
}
711715

712716
template <typename _DataType, typename _ResultType>
@@ -774,7 +778,7 @@ void dpnp_initval_c(void* result1, void* value, size_t size)
774778
size,
775779
dep_event_vec_ref);
776780
DPCTLEvent_WaitAndThrow(event_ref);
777-
781+
DPCTLEvent_Delete(event_ref);
778782
}
779783

780784
template <typename _DataType>
@@ -941,6 +945,7 @@ void dpnp_matmul_c(void* result_out,
941945
input2_strides,
942946
dep_event_vec_ref);
943947
DPCTLEvent_WaitAndThrow(event_ref);
948+
DPCTLEvent_Delete(event_ref);
944949
}
945950

946951
template <typename _DataType>
@@ -1112,11 +1117,25 @@ void func_map_init_linalg(func_map_t& fmap)
11121117
fmap[DPNPFuncName::DPNP_FN_EIG][eft_FLT][eft_FLT] = {eft_FLT, (void*)dpnp_eig_default_c<float, float>};
11131118
fmap[DPNPFuncName::DPNP_FN_EIG][eft_DBL][eft_DBL] = {eft_DBL, (void*)dpnp_eig_default_c<double, double>};
11141119

1120+
fmap[DPNPFuncName::DPNP_FN_EIG_EXT][eft_INT][eft_INT] = {eft_DBL, (void*)dpnp_eig_ext_c<int32_t, double>};
1121+
fmap[DPNPFuncName::DPNP_FN_EIG_EXT][eft_LNG][eft_LNG] = {eft_DBL, (void*)dpnp_eig_ext_c<int64_t, double>};
1122+
fmap[DPNPFuncName::DPNP_FN_EIG_EXT][eft_FLT][eft_FLT] = {eft_FLT, (void*)dpnp_eig_ext_c<float, float>};
1123+
fmap[DPNPFuncName::DPNP_FN_EIG_EXT][eft_DBL][eft_DBL] = {eft_DBL, (void*)dpnp_eig_ext_c<double, double>};
1124+
11151125
fmap[DPNPFuncName::DPNP_FN_EIGVALS][eft_INT][eft_INT] = {eft_DBL, (void*)dpnp_eigvals_default_c<int32_t, double>};
11161126
fmap[DPNPFuncName::DPNP_FN_EIGVALS][eft_LNG][eft_LNG] = {eft_DBL, (void*)dpnp_eigvals_default_c<int64_t, double>};
11171127
fmap[DPNPFuncName::DPNP_FN_EIGVALS][eft_FLT][eft_FLT] = {eft_FLT, (void*)dpnp_eigvals_default_c<float, float>};
11181128
fmap[DPNPFuncName::DPNP_FN_EIGVALS][eft_DBL][eft_DBL] = {eft_DBL, (void*)dpnp_eigvals_default_c<double, double>};
11191129

1130+
fmap[DPNPFuncName::DPNP_FN_EIGVALS_EXT][eft_INT][eft_INT] = {eft_DBL,
1131+
(void*)dpnp_eigvals_ext_c<int32_t, double>};
1132+
fmap[DPNPFuncName::DPNP_FN_EIGVALS_EXT][eft_LNG][eft_LNG] = {eft_DBL,
1133+
(void*)dpnp_eigvals_ext_c<int64_t, double>};
1134+
fmap[DPNPFuncName::DPNP_FN_EIGVALS_EXT][eft_FLT][eft_FLT] = {eft_FLT,
1135+
(void*)dpnp_eigvals_ext_c<float, float>};
1136+
fmap[DPNPFuncName::DPNP_FN_EIGVALS_EXT][eft_DBL][eft_DBL] = {eft_DBL,
1137+
(void*)dpnp_eigvals_ext_c<double, double>};
1138+
11201139
fmap[DPNPFuncName::DPNP_FN_INITVAL][eft_BLN][eft_BLN] = {eft_BLN, (void*)dpnp_initval_default_c<bool>};
11211140
fmap[DPNPFuncName::DPNP_FN_INITVAL][eft_INT][eft_INT] = {eft_INT, (void*)dpnp_initval_default_c<int32_t>};
11221141
fmap[DPNPFuncName::DPNP_FN_INITVAL][eft_LNG][eft_LNG] = {eft_LNG, (void*)dpnp_initval_default_c<int64_t>};

0 commit comments

Comments
 (0)