Skip to content

Commit ae45f9c

Browse files
authored
Merge branch 'master' into update-cupy-tests
2 parents 8f8a1f9 + a97953e commit ae45f9c

File tree

16 files changed

+673
-719
lines changed

16 files changed

+673
-719
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ Also, that release drops support for Python 3.9, making Python 3.10 the minimum
4242
* Unified `dpnp` public API exports by consolidating function exports in `__init__.py` and removing wildcard imports [#2665](https://github.com/IntelPython/dpnp/pull/2665) [#2666](https://github.com/IntelPython/dpnp/pull/2666)
4343
* Updated tests to reflect the new scalar conversion rules for non-0D `usm_ndarray` [#2694](https://github.com/IntelPython/dpnp/pull/2694)
4444
* Compile indexing extension with `-fno-sycl-id-queries-fit-in-int` to support huge arrays [#2721](https://github.com/IntelPython/dpnp/pull/2721)
45+
* Updated `dpnp.fix` to reuse `dpnp.trunc` internally [#2722](https://github.com/IntelPython/dpnp/pull/2722)
46+
* Changed the build scripts and documentation due to `python setup.py develop` deprecation notice [#2716](https://github.com/IntelPython/dpnp/pull/2716)
4547

4648
### Deprecated
4749

@@ -54,6 +56,7 @@ Also, that release drops support for Python 3.9, making Python 3.10 the minimum
5456
* Dropped support for Python 3.9 [#2626](https://github.com/IntelPython/dpnp/pull/2626)
5557
* Removed the obsolete interface from DPNP to Numba JIT [#2647](https://github.com/IntelPython/dpnp/pull/2647)
5658
* Removed the `newshape` parameter from `dpnp.reshape`, which has been deprecated since dpnp 0.17.0. Pass it positionally or use `shape=` on newer versions [#2670](https://github.com/IntelPython/dpnp/pull/2670)
59+
* Removed unused `pytest` configuration from `pyproject.toml` [#2729](https://github.com/IntelPython/dpnp/pull/2729)
5760

5861
### Fixed
5962

CMakeLists.txt

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ set(DPNP_TARGET_CUDA
107107
Set to a truthy value (e.g., ON, TRUE) to use default architecture (sm_50), \
108108
or to a specific architecture like sm_80."
109109
)
110-
set(HIP_TARGETS "" CACHE STRING "HIP architecture for target")
110+
set(DPNP_TARGET_HIP "" CACHE STRING "HIP architecture for target")
111111

112112
set(_dpnp_sycl_targets)
113113
set(_use_onemath OFF)
@@ -135,18 +135,28 @@ if("x${DPNP_SYCL_TARGETS}" STREQUAL "x")
135135
set(_use_onemath_cuda ON)
136136
endif()
137137

138-
if(HIP_TARGETS)
139-
if(HIP_TARGETS MATCHES "^gfx")
138+
if(DPNP_TARGET_HIP)
139+
if(DPNP_TARGET_HIP MATCHES "^gfx")
140140
if("x${_dpnp_sycl_targets}" STREQUAL "x")
141-
set(_dpnp_sycl_targets "amd_gpu_${HIP_TARGETS},spir64-unknown-unknown")
141+
set(_dpnp_sycl_targets
142+
"amd_gpu_${DPNP_TARGET_HIP},spir64-unknown-unknown"
143+
)
142144
else()
143-
set(_dpnp_sycl_targets "amd_gpu_${HIP_TARGETS},${_dpnp_sycl_targets}")
145+
set(_dpnp_sycl_targets
146+
"amd_gpu_${DPNP_TARGET_HIP},${_dpnp_sycl_targets}"
147+
)
144148
endif()
149+
145150
set(_use_onemath_hip ON)
151+
set(HIP_TARGETS
152+
${DPNP_TARGET_HIP}
153+
CACHE STRING
154+
"HIP GPU targets for oneMath"
155+
)
146156
else()
147157
message(
148158
FATAL_ERROR
149-
"Invalid value for HIP_TARGETS: \"${HIP_TARGETS}\". "
159+
"Invalid value for DPNP_TARGET_HIP: \"${DPNP_TARGET_HIP}\". "
150160
"Expected an architecture name starting with 'gfx', e.g. 'gfx1030'."
151161
)
152162
endif()
@@ -159,11 +169,15 @@ else()
159169
endif()
160170

161171
if("${DPNP_SYCL_TARGETS}" MATCHES "amd_gpu_")
162-
set(_use_onemath_hip ON)
163-
164-
if("x${HIP_TARGETS}" STREQUAL "x")
165-
message(FATAL_ERROR "HIP_TARGETS must be specified when using HIP backend")
172+
if("x${DPNP_TARGET_HIP}" STREQUAL "x")
173+
message(
174+
FATAL_ERROR
175+
"DPNP_TARGET_HIP must be specified when using HIP backend"
176+
)
166177
endif()
178+
179+
set(_use_onemath_hip ON)
180+
set(HIP_TARGETS ${DPNP_TARGET_HIP} CACHE STRING "HIP GPU targets for oneMath")
167181
endif()
168182

169183
if("${DPNP_SYCL_TARGETS}" MATCHES "amdgcn-amd-amdhsa")
@@ -295,6 +309,16 @@ else()
295309
message(FATAL_ERROR "Unsupported system.")
296310
endif()
297311

312+
# Define flags for CMAKE_BUILD_TYPE=Coverage
313+
set(CMAKE_C_FLAGS_COVERAGE "${CMAKE_C_FLAGS_DEBUG} -O1 -g1 -DDEBUG")
314+
set(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_DEBUG} -O1 -g1 -DDEBUG")
315+
set(CMAKE_MODULE_LINKER_FLAGS_COVERAGE "${CMAKE_MODULE_LINKER_FLAGS_DEBUG}")
316+
mark_as_advanced(
317+
CMAKE_C_FLAGS_COVERAGE
318+
CMAKE_CXX_FLAGS_COVERAGE
319+
CMAKE_MODULE_LINKER_FLAGS_COVERAGE
320+
)
321+
298322
if(DPNP_GENERATE_COVERAGE)
299323
string(
300324
CONCAT PROFILE_FLAGS

doc/0.builddoc.sh

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

doc/quick_start_guide.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,15 @@ To build and install the package on Linux OS, run:
112112

113113
.. code-block:: bash
114114
115-
python setup.py install -- -G Ninja -DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icpx
115+
python setup.py build_ext --inplace -- -G Ninja -DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icpx
116+
python -m pip install -e .
116117
117118
To build and install the package on Windows OS, run:
118119

119120
.. code-block:: bash
120121
121-
python setup.py install -- -G Ninja -DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icx
122+
python setup.py build_ext --inplace -- -G Ninja -DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icx
123+
python -m pip install -e .
122124
123125
Alternatively, to develop on Linux OS, you can use the driver script:
124126

dpnp/backend/extensions/ufunc/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ set(_elementwise_sources
3434
${CMAKE_CURRENT_SOURCE_DIR}/elementwise_functions/divmod.cpp
3535
${CMAKE_CURRENT_SOURCE_DIR}/elementwise_functions/erf_funcs.cpp
3636
${CMAKE_CURRENT_SOURCE_DIR}/elementwise_functions/fabs.cpp
37-
${CMAKE_CURRENT_SOURCE_DIR}/elementwise_functions/fix.cpp
3837
${CMAKE_CURRENT_SOURCE_DIR}/elementwise_functions/float_power.cpp
3938
${CMAKE_CURRENT_SOURCE_DIR}/elementwise_functions/fmax.cpp
4039
${CMAKE_CURRENT_SOURCE_DIR}/elementwise_functions/fmin.cpp

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
#include "divmod.hpp"
3434
#include "erf_funcs.hpp"
3535
#include "fabs.hpp"
36-
#include "fix.hpp"
3736
#include "float_power.hpp"
3837
#include "fmax.hpp"
3938
#include "fmin.hpp"
@@ -67,7 +66,6 @@ void init_elementwise_functions(py::module_ m)
6766
init_divmod(m);
6867
init_erf_funcs(m);
6968
init_fabs(m);
70-
init_fix(m);
7169
init_float_power(m);
7270
init_fmax(m);
7371
init_fmin(m);

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

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

dpnp/backend/extensions/ufunc/elementwise_functions/fix.hpp

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

dpnp/backend/kernels/elementwise_functions/fix.hpp

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

0 commit comments

Comments
 (0)