Skip to content

Commit 5ed41e0

Browse files
committed
Remove the legacy backend RNG
dpnp.random no longer uses dpnp_backend_c, so drop the dpnp_algo_random Cython module, the backend RNG kernels, DPNPRandomState, the DPNP_FN_RNG_* function pointers, the backend engines and their examples and tests, and the now-unused parts of the backend, including its GTest suite, the DPNP_BACKEND_TESTS option and call_origin. The conda recipes no longer pin onemkl-sycl-rng.
1 parent 843a343 commit 5ed41e0

38 files changed

Lines changed: 17 additions & 9416 deletions

‎CHANGELOG.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ This release drops support for Python 3.10, making Python 3.11 the minimum requi
4141

4242
* Removed the unused `FourZeroOffsets_Indexer`, `FixedDimStridedIndexer` and `ThreeOffsets_FixedDimStridedIndexer` from the libtensor header `utils/offset_utils.hpp` [#3131](https://github.com/IntelPython/dpnp/pull/3131)
4343
* Dropped support for Python 3.10 [#3173](https://github.com/IntelPython/dpnp/pull/3173)
44+
* Removed the legacy backend implementation of `dpnp.random`, which no longer needs `onemkl-sycl-rng` [#3163](https://github.com/IntelPython/dpnp/pull/3163)
45+
* Removed the unused parts of the legacy `dpnp_backend_c` library, including its empty GTest suite, the `DPNP_BACKEND_TESTS` CMake option and the NumPy fallback helper `call_origin` [#3163](https://github.com/IntelPython/dpnp/pull/3163)
4446

4547
### Fixed
4648

‎CMakeLists.txt‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ option(
4242
"Build dpnp tensor pybind11 offloading extensions with coverage instrumentation"
4343
OFF
4444
)
45-
option(DPNP_BACKEND_TESTS "Enable building of DPNP backend test suite" OFF)
4645
option(
4746
DPNP_WITH_REDIST
4847
"Build DPNP assuming DPC++ redistributable is installed into Python prefix"

‎conda-recipe-cf/meta.yaml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ requirements:
5454
- {{ pin_compatible('onemkl-sycl-blas', min_pin='x.x', max_pin='x') }}
5555
- {{ pin_compatible('onemkl-sycl-dft', min_pin='x.x', max_pin='x') }}
5656
- {{ pin_compatible('onemkl-sycl-lapack', min_pin='x.x', max_pin='x') }}
57-
- {{ pin_compatible('onemkl-sycl-rng', min_pin='x.x', max_pin='x') }}
5857
- {{ pin_compatible('onemkl-sycl-vm', min_pin='x.x', max_pin='x') }}
5958
- numpy
6059
- ocl-icd-system # [linux]

‎conda-recipe/meta.yaml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ requirements:
6767
- {{ pin_compatible('onemkl-sycl-blas', min_pin='x.x', max_pin='x') }}
6868
- {{ pin_compatible('onemkl-sycl-dft', min_pin='x.x', max_pin='x') }}
6969
- {{ pin_compatible('onemkl-sycl-lapack', min_pin='x.x', max_pin='x') }}
70-
- {{ pin_compatible('onemkl-sycl-rng', min_pin='x.x', max_pin='x') }}
7170
- {{ pin_compatible('onemkl-sycl-vm', min_pin='x.x', max_pin='x') }}
7271
- {{ pin_compatible('onemkl-sycl-sparse', min_pin='x.x', max_pin='x') }}
7372
- numpy

‎conda-recipe/rattler_recipe.yaml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ requirements:
6767
- ${{ pin_compatible('onemkl-sycl-blas', lower_bound='x.x', upper_bound='x') }}
6868
- ${{ pin_compatible('onemkl-sycl-dft', lower_bound='x.x', upper_bound='x') }}
6969
- ${{ pin_compatible('onemkl-sycl-lapack', lower_bound='x.x', upper_bound='x') }}
70-
- ${{ pin_compatible('onemkl-sycl-rng', lower_bound='x.x', upper_bound='x') }}
7170
- ${{ pin_compatible('onemkl-sycl-vm', lower_bound='x.x', upper_bound='x') }}
7271
- ${{ pin_compatible('onemkl-sycl-sparse', lower_bound='x.x', upper_bound='x') }}
7372
- numpy

‎dpnp/AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- `dpnp_utils/`: shared helpers (`get_usm_allocations`, `map_dtype_to_device`, reduction wrappers)
88
- `linalg/`, `fft/`, `random/`, `scipy/`, `lib/`: subpackages, each exporting through its own `__init__.py`
99
- `random/`: `_bit_generator.py` (`BitGenerator`, `Philox4x3210`, `PCG64DXSM`, `MRG32k3a`; `SeedSequence` is NumPy's), `_generator.py` (`Generator`, which implements every distribution), `dpnp_random_state.py` (`RandomState`, the same samplers with NumPy's legacy checks) and `dpnp_iface_random.py` (module functions, one `RandomState` per queue). The kernels are in `dpnp.libtensor._rng_impl`.
10-
- Legacy, don't extend: the Cython `dpnp_algo` path and `dpnp_backend_c` (still used by `dpnp.partition` and `dpnp.random`), and the NumPy fallback `call_origin`. New kernels go into `dpnp/libtensor` (see `dpnp/libtensor/AGENTS.md`).
10+
- Legacy, don't extend: the Cython `dpnp_algo` path and `dpnp_backend_c` (still used by `dpnp.partition`). New kernels go into `dpnp/libtensor` (see `dpnp/libtensor/AGENTS.md`).
1111

1212
## Adding a Public Function
1313
1. Implement it in the matching `dpnp_iface_*.py` or subpackage module. Iface modules have no `__all__`.

‎dpnp/CMakeLists.txt‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,4 +235,3 @@ add_subdirectory(libtensor/extensions/sparse)
235235

236236
add_subdirectory(dpnp_algo)
237237
add_subdirectory(dpnp_utils)
238-
add_subdirectory(random)

‎dpnp/backend/AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
Legacy, don't extend: new kernels and bindings go into `dpnp/libtensor` (see `dpnp/libtensor/AGENTS.md`, which also holds the C++ rules and build options).
44

55
## Layout
6-
- `src/`, `include/` and `kernels/dpnp_krnl_*.cpp` build `dpnp_backend_c` (still used by `dpnp.partition` and `dpnp.random`); `tests/` (GTest, `-DDPNP_BACKEND_TESTS=ON`) and `examples/` are not built in CI
6+
- `src/`, `include/` and `kernels/dpnp_krnl_*.cpp` build `dpnp_backend_c` (still used by `dpnp.partition`)
77
- `cmake/Modules/`: vendored `IntelSYCL`, `MKL`, `TBB` and `oneDPL` config modules, used by the whole build

‎dpnp/backend/CMakeLists.txt‎

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,7 @@
2727
# THE POSSIBILITY OF SUCH DAMAGE.
2828
# *****************************************************************************
2929

30-
set(DPNP_SRC
31-
kernels/dpnp_krnl_arraycreation.cpp
32-
kernels/dpnp_krnl_common.cpp
33-
kernels/dpnp_krnl_random.cpp
34-
kernels/dpnp_krnl_sorting.cpp
35-
src/dpnp_iface_fptr.cpp
36-
src/memory_sycl.cpp
37-
src/queue_sycl.cpp
38-
src/verbose.cpp
39-
src/dpnp_random_state.cpp
40-
)
30+
set(DPNP_SRC kernels/dpnp_krnl_sorting.cpp src/dpnp_iface_fptr.cpp)
4131

4232
set(_trgt "dpnp_backend_c")
4333

@@ -69,12 +59,6 @@ if(DPNP_GENERATE_COVERAGE)
6959
target_link_options(${_trgt} PRIVATE -fprofile-instr-generate -fcoverage-mapping)
7060
endif()
7161

72-
# Link only the MKL SYCL domains actually used by the backend sources
73-
# (BLAS: mkl_blas::scal; RNG: engines/distributions; VM: vector math ops)
74-
target_link_libraries(
75-
${_trgt}
76-
PUBLIC MKL::MKL_SYCL::BLAS MKL::MKL_SYCL::RNG MKL::MKL_SYCL::VM
77-
)
7862
target_link_libraries(${_trgt} PUBLIC oneDPL)
7963

8064
if(UNIX)
@@ -103,10 +87,6 @@ if(DPNP_WITH_REDIST)
10387
set_target_properties(${_trgt} PROPERTIES INSTALL_RPATH "$ORIGIN/../../../")
10488
endif()
10589

106-
if(DPNP_BACKEND_TESTS)
107-
add_subdirectory(tests)
108-
endif()
109-
11090
set(_lib_destination dpnp)
11191
set(_include_destination dpnp/backend/include)
11292
install(

‎dpnp/backend/examples/example10.cpp‎

Lines changed: 0 additions & 137 deletions
This file was deleted.

0 commit comments

Comments
 (0)