Skip to content

Commit bc83495

Browse files
Merge branch 'master' into convolve
2 parents 726bc66 + 337becf commit bc83495

27 files changed

+341
-322
lines changed

doc/reference/math.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,5 +232,3 @@ Miscellaneous
232232
dpnp.real_if_close
233233

234234
dpnp.interp
235-
236-
dpnp.bitwise_count

dpnp/backend/extensions/fft/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
set(python_module_name _fft_impl)
2828
set(_module_src
2929
${CMAKE_CURRENT_SOURCE_DIR}/fft_py.cpp
30-
${CMAKE_CURRENT_SOURCE_DIR}/in_place.cpp
31-
${CMAKE_CURRENT_SOURCE_DIR}/out_of_place.cpp
3230
)
3331

3432
pybind11_add_module(${python_module_name} MODULE ${_module_src})

dpnp/backend/extensions/fft/in_place.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,5 @@ std::pair<sycl::event, sycl::event>
4242
const std::vector<sycl::event> &depends);
4343

4444
} // namespace dpnp::extensions::fft
45+
46+
#include "in_place.tpp" // Include template definition

dpnp/backend/extensions/fft/in_place.cpp renamed to dpnp/backend/extensions/fft/in_place.tpp

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
// THE POSSIBILITY OF SUCH DAMAGE.
2424
//*****************************************************************************
2525

26+
#pragma once
2627
#include <stdexcept>
2728

2829
#include <oneapi/mkl.hpp>
@@ -32,7 +33,6 @@
3233

3334
#include "common.hpp"
3435
#include "fft_utils.hpp"
35-
#include "in_place.hpp"
3636
// dpctl tensor headers
3737
#include "utils/output_validation.hpp"
3838

@@ -107,21 +107,4 @@ std::pair<sycl::event, sycl::event>
107107
return std::make_pair(fft_event, args_ev);
108108
}
109109

110-
// Explicit instantiations
111-
// single precision c2c FFT
112-
template std::pair<sycl::event, sycl::event> compute_fft_in_place(
113-
DescriptorWrapper<mkl_dft::precision::SINGLE, mkl_dft::domain::COMPLEX>
114-
&descr,
115-
const dpctl::tensor::usm_ndarray &in_out,
116-
const bool is_forward,
117-
const std::vector<sycl::event> &depends);
118-
119-
// double precision c2c FFT
120-
template std::pair<sycl::event, sycl::event> compute_fft_in_place(
121-
DescriptorWrapper<mkl_dft::precision::DOUBLE, mkl_dft::domain::COMPLEX>
122-
&descr,
123-
const dpctl::tensor::usm_ndarray &in_out,
124-
const bool is_forward,
125-
const std::vector<sycl::event> &depends);
126-
127110
} // namespace dpnp::extensions::fft

dpnp/backend/extensions/fft/out_of_place.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,5 @@ std::pair<sycl::event, sycl::event>
4343
const std::vector<sycl::event> &depends);
4444

4545
} // namespace dpnp::extensions::fft
46+
47+
#include "out_of_place.tpp" // Include template definition

dpnp/backend/extensions/fft/out_of_place.cpp renamed to dpnp/backend/extensions/fft/out_of_place.tpp

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
// THE POSSIBILITY OF SUCH DAMAGE.
2424
//*****************************************************************************
2525

26+
#pragma once
2627
#include <stdexcept>
2728

2829
#include <oneapi/mkl.hpp>
@@ -32,7 +33,6 @@
3233

3334
#include "common.hpp"
3435
#include "fft_utils.hpp"
35-
#include "out_of_place.hpp"
3636
// dpctl tensor headers
3737
#include "utils/memory_overlap.hpp"
3838
#include "utils/output_validation.hpp"
@@ -167,38 +167,4 @@ std::pair<sycl::event, sycl::event>
167167
return std::make_pair(fft_event, args_ev);
168168
}
169169

170-
// Explicit instantiations
171-
// single precision c2c FFT
172-
template std::pair<sycl::event, sycl::event> compute_fft_out_of_place(
173-
DescriptorWrapper<mkl_dft::precision::SINGLE, mkl_dft::domain::COMPLEX>
174-
&descr,
175-
const dpctl::tensor::usm_ndarray &in,
176-
const dpctl::tensor::usm_ndarray &out,
177-
const bool is_forward,
178-
const std::vector<sycl::event> &depends);
179-
180-
// double precision c2c FFT
181-
template std::pair<sycl::event, sycl::event> compute_fft_out_of_place(
182-
DescriptorWrapper<mkl_dft::precision::DOUBLE, mkl_dft::domain::COMPLEX>
183-
&descr,
184-
const dpctl::tensor::usm_ndarray &in,
185-
const dpctl::tensor::usm_ndarray &out,
186-
const bool is_forward,
187-
const std::vector<sycl::event> &depends);
188-
189-
// single precision r2c/c2r FFT
190-
template std::pair<sycl::event, sycl::event> compute_fft_out_of_place(
191-
DescriptorWrapper<mkl_dft::precision::SINGLE, mkl_dft::domain::REAL> &descr,
192-
const dpctl::tensor::usm_ndarray &in,
193-
const dpctl::tensor::usm_ndarray &out,
194-
const bool is_forward,
195-
const std::vector<sycl::event> &depends);
196-
197-
// double precision r2c/c2r FFT
198-
template std::pair<sycl::event, sycl::event> compute_fft_out_of_place(
199-
DescriptorWrapper<mkl_dft::precision::DOUBLE, mkl_dft::domain::REAL> &descr,
200-
const dpctl::tensor::usm_ndarray &in,
201-
const dpctl::tensor::usm_ndarray &out,
202-
const bool is_forward,
203-
const std::vector<sycl::event> &depends);
204170
} // namespace dpnp::extensions::fft

dpnp/backend/extensions/lapack/gesvd.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,12 @@ static sycl::event gesvd_impl(sycl::queue &exec_q,
9595
exec_q,
9696
jobu, // Character specifying how to compute the matrix U:
9797
// 'A' computes all columns of U,
98-
// 'S' computes the first min(m,n) columns of U,
98+
// 'S' computes the first min(m, n) columns of U,
9999
// 'O' overwrites A with the columns of U,
100100
// 'N' does not compute U.
101101
jobvt, // Character specifying how to compute the matrix VT:
102102
// 'A' computes all rows of VT,
103-
// 'S' computes the first min(m,n) rows of VT,
103+
// 'S' computes the first min(m, n) rows of VT,
104104
// 'O' overwrites A with the rows of VT,
105105
// 'N' does not compute VT.
106106
m, // The number of rows in the input matrix A (0 <= m).

dpnp/backend/extensions/lapack/gesvd_batch.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,12 @@ static sycl::event gesvd_batch_impl(sycl::queue &exec_q,
147147
exec_q,
148148
jobu, // Character specifying how to compute the matrix U:
149149
// 'A' computes all columns of U,
150-
// 'S' computes the first min(m,n) columns of U,
150+
// 'S' computes the first min(m, n) columns of U,
151151
// 'O' overwrites A with the columns of U,
152152
// 'N' does not compute U.
153153
jobvt, // Character specifying how to compute the matrix VT:
154154
// 'A' computes all rows of VT,
155-
// 'S' computes the first min(m,n) rows of VT,
155+
// 'S' computes the first min(m, n) rows of VT,
156156
// 'O' overwrites A with the rows of VT,
157157
// 'N' does not compute VT.
158158
m, // The number of rows in the input batch matrix A (0 <= m).

dpnp/dpnp_array.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ def copy(self, order="C", device=None, usm_type=None, sycl_queue=None):
926926
927927
Parameters
928928
----------
929-
order : {"C", "F", "A", "K"}, optional
929+
order : {None, "C", "F", "A", "K"}, optional
930930
Memory layout of the newly output array.
931931
Default: ``"C"``.
932932
device : {None, string, SyclDevice, SyclQueue, Device}, optional
@@ -1029,7 +1029,7 @@ def diagonal(self, offset=0, axis1=0, axis2=1):
10291029
Examples
10301030
--------
10311031
>>> import dpnp as np
1032-
>>> a = np.arange(4).reshape(2,2)
1032+
>>> a = np.arange(4).reshape(2, 2)
10331033
>>> a.diagonal()
10341034
array([0, 3])
10351035

dpnp/dpnp_iface.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ def get_result_array(a, out=None, casting="safe"):
572572
----------
573573
a : {dpnp.ndarray, usm_ndarray}
574574
Input array.
575-
out : {dpnp.ndarray, usm_ndarray}
575+
out : {None, dpnp.ndarray, usm_ndarray}
576576
If provided, value of `a` array will be copied into it
577577
according to ``safe`` casting rule.
578578
It should be of the appropriate shape.
@@ -585,7 +585,7 @@ def get_result_array(a, out=None, casting="safe"):
585585
586586
Returns
587587
-------
588-
out : {dpnp_array}
588+
out : dpnp.ndarray
589589
Return `out` if provided, otherwise return `a`.
590590
591591
"""

0 commit comments

Comments
 (0)