Skip to content

Commit 5e59b1f

Browse files
author
Vahid Tavanashad
committed
deprecate instead of replace
1 parent 8d62918 commit 5e59b1f

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515
* Adjusted the `pre-commit` configuration to run autoupdate weekly [#2479](https://github.com/IntelPython/dpnp/pull/2479)
1616
* Improved validation of `--target-hip` build option to only accept a gfx-prefixed value [#2481](https://github.com/IntelPython/dpnp/pull/2481)
1717
* Cleaned up backend code to remove obsolete and unused parts of functionality [#2485](https://github.com/IntelPython/dpnp/pull/2485)
18-
* Renamed `--onemkl-interfaces` and `--onemkl-interfaces-dir` options for building script to `--onemath` and `--onemath-dir` to align with [oneMath specification](https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onemath/source/) [#2487](https://github.com/IntelPython/dpnp/pull/2487)
18+
* `--onemkl-interfaces` and `--onemkl-interfaces-dir` options for building script are deprecated, instead `--onemath` and `--onemath-dir` are introduced to be aligned with [oneMath specification](https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onemath/source/) [#2487](https://github.com/IntelPython/dpnp/pull/2487)
1919

2020
### Fixed
2121

scripts/build_locally.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
import os
2828
import subprocess
2929
import sys
30+
import warnings
31+
32+
warnings.simplefilter("default", DeprecationWarning)
3033

3134

3235
def run(
@@ -40,6 +43,8 @@ def run(
4043
cmake_opts="",
4144
target_cuda=None,
4245
target_hip=None,
46+
onemkl_interfaces=False,
47+
onemkl_interfaces_dir=None,
4348
onemath=False,
4449
onemath_dir=None,
4550
):
@@ -98,6 +103,23 @@ def run(
98103
if "DPL_ROOT" in os.environ:
99104
os.environ["DPL_ROOT_HINT"] = os.environ["DPL_ROOT"]
100105

106+
# TODO: onemkl_interfaces and onemkl_interfaces_dir are deprecated in
107+
# dpnp-0.19.0 and should be removed in dpnp-0.20.0.
108+
if onemkl_interfaces:
109+
warnings.warn(
110+
"Using 'onemkl_interfaces' is deprecated. Please use 'onemath' instead.",
111+
DeprecationWarning,
112+
stacklevel=1,
113+
)
114+
onemath = True
115+
if onemkl_interfaces_dir is not None:
116+
warnings.warn(
117+
"Using 'onemkl_interfaces_dir' is deprecated. Please use 'onemath_dir' instead.",
118+
DeprecationWarning,
119+
stacklevel=1,
120+
)
121+
onemath_dir = onemkl_interfaces_dir
122+
101123
if target_cuda is not None:
102124
if not target_cuda.strip():
103125
raise ValueError(
@@ -203,6 +225,19 @@ def run(
203225
"Must specify HIP architecture (e.g., --target-hip=gfx90a)",
204226
type=str,
205227
)
228+
driver.add_argument(
229+
"--onemkl_interfaces",
230+
help="(DEPRECATED) Build using oneMath",
231+
dest="onemkl_interfaces",
232+
action="store_true",
233+
)
234+
driver.add_argument(
235+
"--onemkl_interfaces_dir",
236+
help="(DEPRECATED) Local directory with source of oneMath",
237+
dest="onemkl_interfaces_dir",
238+
default=None,
239+
type=str,
240+
)
206241
driver.add_argument(
207242
"--onemath",
208243
help="Build using oneMath",
@@ -271,6 +306,8 @@ def run(
271306
cmake_opts=args.cmake_opts,
272307
target_cuda=args.target_cuda,
273308
target_hip=args.target_hip,
309+
onemkl_interfaces=args.onemkl_interfaces,
310+
onemkl_interfaces_dir=args.onemkl_interfaces_dir,
274311
onemath=args.onemath,
275312
onemath_dir=args.onemath_dir,
276313
)

0 commit comments

Comments
 (0)