Skip to content

Commit 0aaf677

Browse files
authored
Merge branch 'master' into update-math-tests
2 parents e944bef + 2f335cd commit 0aaf677

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+791
-426
lines changed

.github/workflows/openssf-scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,6 @@ jobs:
6868

6969
# Upload the results to GitHub's code scanning dashboard.
7070
- name: "Upload to code-scanning"
71-
uses: github/codeql-action/upload-sarif@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
71+
uses: github/codeql-action/upload-sarif@6bb031afdd8eb862ea3fc1848194185e076637e5 # v3.28.11
7272
with:
7373
sarif_file: results.sarif

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
* Added implementation of `dpnp.hamming` [#2341](https://github.com/IntelPython/dpnp/pull/2341), [#2357](https://github.com/IntelPython/dpnp/pull/2357)
1212
* Added implementation of `dpnp.hanning` [#2358](https://github.com/IntelPython/dpnp/pull/2358)
1313
* Added implementation of `dpnp.blackman` [#2363](https://github.com/IntelPython/dpnp/pull/2363)
14+
* Added implementation of `dpnp.bartlett` [#2366](https://github.com/IntelPython/dpnp/pull/2366)
1415

1516
### Changed
1617

18+
* Allowed input array of `uint64` dtype in `dpnp.bincount` [#2361](https://github.com/IntelPython/dpnp/pull/2361)
19+
1720
### Fixed
1821

1922

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
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/gesv.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,16 @@ static sycl::event gesv_impl(sycl::queue &exec_q,
144144
is_exception_caught = true;
145145
gesv_utils::handle_lapack_exc(exec_q, lda, a, scratchpad_size,
146146
scratchpad, ipiv, e, error_msg);
147+
} catch (oneapi::mkl::computation_error const &e) {
148+
// TODO: remove this catch when gh-642(oneMath) is fixed
149+
// Workaround for oneMath interfaces
150+
// oneapi::mkl::computation_error is thrown instead of
151+
// oneapi::mkl::lapack::computation_error.
152+
if (scratchpad != nullptr)
153+
sycl_free_noexcept(scratchpad, exec_q);
154+
if (ipiv != nullptr)
155+
sycl_free_noexcept(ipiv, exec_q);
156+
throw LinAlgError("The input coefficient matrix is singular.");
147157
} catch (sycl::exception const &e) {
148158
is_exception_caught = true;
149159
error_msg << "Unexpected SYCL exception caught during getrf() or "

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).

0 commit comments

Comments
 (0)