Skip to content

Commit 5e22a5f

Browse files
authored
Merge branch 'master' into explicit-python-version-in-cmake
2 parents 47794ff + 96e12cf commit 5e22a5f

File tree

16 files changed

+510
-56
lines changed

16 files changed

+510
-56
lines changed

.github/workflows/check-onemath.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
cat ${{ env.environment-file }}
5858
5959
- name: Upload artifact
60-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
60+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
6161
with:
6262
name: ${{ env.environment-file-name }}
6363
path: ${{ env.environment-file }}
@@ -87,7 +87,7 @@ jobs:
8787
fetch-depth: 0
8888

8989
- name: Download artifact
90-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
90+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
9191
with:
9292
name: ${{ env.environment-file-name }}
9393
path: ${{ env.environment-file-loc }}
@@ -179,7 +179,7 @@ jobs:
179179
fetch-depth: 0
180180

181181
- name: Download artifact
182-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
182+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
183183
with:
184184
name: ${{ env.environment-file-name }}
185185
path: ${{ env.environment-file-loc }}

.github/workflows/conda-package.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,22 +93,22 @@ jobs:
9393
continue-on-error: true
9494
run: conda build --no-test --python ${{ matrix.python }} --numpy 2.0 ${{ env.channels-list }} conda-recipe
9595
env:
96-
MAX_BUILD_CMPL_MKL_VERSION: '2025.3a0'
96+
MAX_BUILD_CMPL_MKL_VERSION: '2026.0a0'
9797

9898
- name: ReBuild conda package
9999
if: steps.build_conda_pkg.outcome == 'failure'
100100
run: conda build --no-test --python ${{ matrix.python }} --numpy 2.0 ${{ env.channels-list }} conda-recipe
101101
env:
102-
MAX_BUILD_CMPL_MKL_VERSION: '2025.3a0'
102+
MAX_BUILD_CMPL_MKL_VERSION: '2026.0a0'
103103

104104
- name: Upload artifact
105-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
105+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
106106
with:
107107
name: ${{ env.package-name }} ${{ runner.os }} Python ${{ matrix.python }}
108108
path: ${{ env.CONDA_BLD }}${{ env.package-name }}-*.conda
109109

110110
- name: Upload wheels artifact
111-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
111+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
112112
with:
113113
name: ${{ env.package-name }} ${{ runner.os }} Wheels Python ${{ matrix.python }}
114114
path: ${{ env.WHEELS_OUTPUT_FOLDER }}${{ env.package-name }}-*.whl
@@ -139,14 +139,19 @@ jobs:
139139
ver-json-path: '${{ github.workspace }}/version.json'
140140

141141
steps:
142+
- name: Set Swap Space
143+
uses: pierotofy/set-swap-space@49819abfb41bd9b44fb781159c033dba90353a7c # v1.0
144+
with:
145+
swap-size-gb: 8
146+
142147
- name: Checkout DPNP repo
143148
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
144149
with:
145150
fetch-depth: ${{ env.fetch-depth }}
146151
path: ${{ env.dpnp-repo-path }}
147152

148153
- name: Download artifact
149-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
154+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
150155
with:
151156
name: ${{ env.package-name }} ${{ runner.os }} Python ${{ matrix.python }}
152157
path: ${{ env.pkg-path-in-channel }}
@@ -274,7 +279,7 @@ jobs:
274279
path: ${{ env.dpnp-repo-path }}
275280

276281
- name: Download artifact
277-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
282+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
278283
with:
279284
name: ${{ env.package-name }} ${{ runner.os }} Python ${{ matrix.python }}
280285
path: ${{ env.pkg-path-in-channel }}
@@ -430,12 +435,12 @@ jobs:
430435
fetch-depth: ${{ env.fetch-depth }}
431436

432437
- name: Download artifact
433-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
438+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
434439
with:
435440
name: ${{ env.package-name }} ${{ runner.os }} Python ${{ matrix.python }}
436441

437442
- name: Download wheels artifact
438-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
443+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
439444
with:
440445
name: ${{ env.package-name }} ${{ runner.os }} Wheels Python ${{ matrix.python }}
441446

@@ -519,7 +524,7 @@ jobs:
519524
path: ${{ env.dpnp-repo-path }}
520525

521526
- name: Download artifact
522-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
527+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
523528
with:
524529
name: ${{ env.package-name }} ${{ runner.os }} Python ${{ env.python-ver }}
525530
path: ${{ env.pkg-path-in-channel }}

.github/workflows/openssf-scorecard.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ jobs:
6464
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
6565
# format to the repository Actions tab.
6666
- name: "Upload artifact"
67-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
67+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
6868
with:
6969
name: SARIF file
7070
path: results.sarif
7171
retention-days: 14
7272

7373
# Upload the results to GitHub's code scanning dashboard.
7474
- name: "Upload to code-scanning"
75-
uses: github/codeql-action/upload-sarif@16140ae1a102900babc80a33c44059580f687047 # v4.30.9
75+
uses: github/codeql-action/upload-sarif@4e94bd11f71e507f7f87df81788dff88d1dacbfb # v4.31.0
7676
with:
7777
sarif_file: results.sarif

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ The release drops support for Python 3.9, making Python 3.10 the minimum require
1515
* Added implementation of `dpnp.linalg.lu_solve` for batch inputs (SciPy-compatible) [#2619](https://github.com/IntelPython/dpnp/pull/2619)
1616
* Added `dpnp.exceptions` submodule to aggregate the generic exceptions used by dpnp [#2616](https://github.com/IntelPython/dpnp/pull/2616)
1717
* Added implementation of `dpnp.scipy.special.erfcx` [#2596](https://github.com/IntelPython/dpnp/pull/2596)
18+
* Added implementation of `dpnp.scipy.special.erfinv` and `dpnp.scipy.special.erfcinv` [#2624](https://github.com/IntelPython/dpnp/pull/2624)
1819

1920
### Changed
2021

dpnp/backend/extensions/ufunc/elementwise_functions/erf_funcs.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,8 @@ static void populate(py::module_ m,
213213
MACRO_DEFINE_IMPL(erf, Erf);
214214
MACRO_DEFINE_IMPL(erfc, Erfc);
215215
MACRO_DEFINE_IMPL(erfcx, Erfcx);
216+
MACRO_DEFINE_IMPL(erfinv, Erfinv);
217+
MACRO_DEFINE_IMPL(erfcinv, Erfcinv);
216218
} // namespace impl
217219

218220
void init_erf_funcs(py::module_ m)
@@ -236,5 +238,13 @@ void init_erf_funcs(py::module_ m)
236238
impl::populate<impl::ErfcxContigFactory, impl::ErfcxStridedFactory>(
237239
m, "_erfcx", "", impl::erfcx_contig_dispatch_vector,
238240
impl::erfcx_strided_dispatch_vector);
241+
242+
impl::populate<impl::ErfinvContigFactory, impl::ErfinvStridedFactory>(
243+
m, "_erfinv", "", impl::erfinv_contig_dispatch_vector,
244+
impl::erfinv_strided_dispatch_vector);
245+
246+
impl::populate<impl::ErfcinvContigFactory, impl::ErfcinvStridedFactory>(
247+
m, "_erfcinv", "", impl::erfcinv_contig_dispatch_vector,
248+
impl::erfcinv_strided_dispatch_vector);
239249
}
240250
} // namespace dpnp::extensions::ufunc

dpnp/backend/extensions/vm/erf_funcs.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ using ew_cmn_ns::unary_contig_impl_fn_ptr_t;
134134
MACRO_DEFINE_IMPL(erf, Erf);
135135
MACRO_DEFINE_IMPL(erfc, Erfc);
136136
MACRO_DEFINE_IMPL(erfcx, Erfcx);
137+
MACRO_DEFINE_IMPL(erfinv, Erfinv);
138+
MACRO_DEFINE_IMPL(erfcinv, Erfcinv);
137139

138140
template <template <typename fnT, typename T> typename factoryT>
139141
static void populate(py::module_ m,
@@ -194,5 +196,17 @@ void init_erf_funcs(py::module_ m)
194196
"Call `erfcx` function from OneMKL VM library to compute the scaled "
195197
"complementary error function value of vector elements",
196198
impl::erfcx_contig_dispatch_vector);
199+
200+
impl::populate<impl::ErfinvContigFactory>(
201+
m, "_erfinv",
202+
"Call `erfinv` function from OneMKL VM library to compute the inverse "
203+
"of the error function value of vector elements",
204+
impl::erfinv_contig_dispatch_vector);
205+
206+
impl::populate<impl::ErfcinvContigFactory>(
207+
m, "_erfcinv",
208+
"Call `erfcinv` function from OneMKL VM library to compute the inverse "
209+
"of the complementary error function value of vector elements",
210+
impl::erfcinv_contig_dispatch_vector);
197211
}
198212
} // namespace dpnp::extensions::vm

dpnp/backend/kernels/elementwise_functions/erf.hpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#include <sycl/ext/intel/math.hpp>
4444
#else
4545
#include "erfcx.hpp"
46+
#include "erfinv.hpp"
4647
#endif
4748

4849
namespace dpnp::kernels::erfs
@@ -85,13 +86,15 @@ struct BaseFunctor
8586
template <typename ArgT, typename ResT> \
8687
using __f_name__##Functor = BaseFunctor<__f_name__##Op, ArgT, ResT>;
8788

88-
MACRO_DEFINE_FUNCTOR(sycl::erf, Erf);
89-
MACRO_DEFINE_FUNCTOR(sycl::erfc, Erfc);
90-
MACRO_DEFINE_FUNCTOR(
9189
#if defined(__SYCL_EXT_INTEL_MATH_SUPPORT)
92-
sycl::ext::intel::math::erfcx,
90+
using namespace sycl::ext::intel::math;
9391
#else
94-
impl::erfcx,
92+
using namespace impl;
9593
#endif
96-
Erfcx);
94+
95+
MACRO_DEFINE_FUNCTOR(sycl::erf, Erf);
96+
MACRO_DEFINE_FUNCTOR(sycl::erfc, Erfc);
97+
MACRO_DEFINE_FUNCTOR(erfcx, Erfcx);
98+
MACRO_DEFINE_FUNCTOR(erfinv, Erfinv);
99+
MACRO_DEFINE_FUNCTOR(erfcinv, Erfcinv);
97100
} // namespace dpnp::kernels::erfs

dpnp/backend/kernels/elementwise_functions/erfcx.hpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1622,19 +1622,17 @@ For x < 0, we use the relationship erfcx(-x) = 2 exp(x^2) - erfc(x), with the
16221622
usual checks for overflow etcetera.
16231623
*/
16241624
template <typename Tp>
1625-
Tp erfcx(Tp x)
1625+
inline Tp erfcx(Tp x)
16261626
{
16271627
static_assert(std::is_floating_point_v<Tp>,
16281628
"erfcx requires a floating-point type");
16291629

16301630
if (x >= 0) {
1631-
if (x > 50) // continued-fraction expansion is faster
1632-
{
1631+
if (x > 50) { // continued-fraction expansion is faster
16331632
// 1/sqrt(pi)
16341633
constexpr Tp inv_sqrtpi = 0.564189583547756286948079451560772586L;
16351634

1636-
if (x > 5e7) // 1-term expansion, important to avoid overflow
1637-
{
1635+
if (x > 5e7) { // 1-term expansion, important to avoid overflow
16381636
return inv_sqrtpi / x;
16391637
}
16401638

0 commit comments

Comments
 (0)