Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:

steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
uses: styfle/cancel-workflow-action@3155a141048f8f89c06b4cdae32e7853e97536bc # 0.13.0
with:
access_token: ${{ github.token }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-onemath.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
uses: styfle/cancel-workflow-action@3155a141048f8f89c06b4cdae32e7853e97536bc # 0.13.0
with:
access_token: ${{ github.token }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:

steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
uses: styfle/cancel-workflow-action@3155a141048f8f89c06b4cdae32e7853e97536bc # 0.13.0
with:
access_token: ${{ github.token }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cron-run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:

steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
uses: styfle/cancel-workflow-action@3155a141048f8f89c06b4cdae32e7853e97536bc # 0.13.0
with:
access_token: ${{ github.token }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate_coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
uses: styfle/cancel-workflow-action@3155a141048f8f89c06b4cdae32e7853e97536bc # 0.13.0
with:
access_token: ${{ github.token }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/openssf-scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4.31.9
uses: github/codeql-action/upload-sarif@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v4.31.10
with:
sarif_file: results.sarif
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/PyCQA/bandit
rev: '1.9.2'
rev: '1.9.3'
hooks:
- id: bandit
pass_filenames: false
Expand Down Expand Up @@ -64,7 +64,7 @@ repos:
additional_dependencies:
- tomli
- repo: https://github.com/psf/black
rev: 25.12.0
rev: 26.1.0
hooks:
- id: black
exclude: "dpnp/_version.py"
Expand Down Expand Up @@ -118,7 +118,7 @@ repos:
]
files: '^dpnp/(dpnp_iface.*|fft|linalg|scipy|dpnp_array)'
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.15.0
rev: v2.16.0
hooks:
- id: pretty-format-toml
args: [--autofix]
Expand All @@ -127,7 +127,7 @@ repos:
hooks:
- id: actionlint
- repo: https://github.com/BlankSpruce/gersemi
rev: 0.25.0
rev: 0.25.1
hooks:
- id: gersemi
exclude: "dpnp/backend/cmake/Modules/"
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,31 @@ Also, that release drops support for Python 3.9, making Python 3.10 the minimum
* 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)
* Updated tests to reflect the new scalar conversion rules for non-0D `usm_ndarray` [#2694](https://github.com/IntelPython/dpnp/pull/2694)
* Compile indexing extension with `-fno-sycl-id-queries-fit-in-int` to support huge arrays [#2721](https://github.com/IntelPython/dpnp/pull/2721)
* Updated `dpnp.fix` to reuse `dpnp.trunc` internally [#2722](https://github.com/IntelPython/dpnp/pull/2722)
* Changed the build scripts and documentation due to `python setup.py develop` deprecation notice [#2716](https://github.com/IntelPython/dpnp/pull/2716)
* Clarified behavior on repeated `axes` in `dpnp.tensordot` and `dpnp.linalg.tensordot` functions [#2733](https://github.com/IntelPython/dpnp/pull/2733)

### Deprecated

* `dpnp.asfarray` is deprecated. Use `dpnp.asarray` with an appropriate dtype instead [#2650](https://github.com/IntelPython/dpnp/pull/2650)
* Passing the output array ``out`` positionally to `dpnp.minimum` and `dpnp.maximum` is deprecated. Pass the output with the keyword form, e.g. ``dpnp.minimum(a, b, out=c)`` [#2659](https://github.com/IntelPython/dpnp/pull/2659)
* `dpnp.ndarray.T` property is deprecated for not two-dimensional array to be compatible with the Python array API standard. To achieve a similar behavior when ``a.ndim != 2``, either ``a.transpose()``, or ``a.mT`` (swaps the last two axes only), or ``dpnp.permute_dims(a, range(a.ndim)[::-1])`` can be used [#2681](https://github.com/IntelPython/dpnp/pull/2681)
* `dpnp.fix` is deprecated. Use `dpnp.trunc` instead, which provides identical functionality [#2730](https://github.com/IntelPython/dpnp/pull/2730)

### Removed

* Dropped support for Python 3.9 [#2626](https://github.com/IntelPython/dpnp/pull/2626)
* Removed the obsolete interface from DPNP to Numba JIT [#2647](https://github.com/IntelPython/dpnp/pull/2647)
* 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)
* Removed unused `pytest` configuration from `pyproject.toml` [#2729](https://github.com/IntelPython/dpnp/pull/2729)

### Fixed

* Suppressed a potential deprecation warning triggered during import of the `dpctl.tensor` module [#2709](https://github.com/IntelPython/dpnp/pull/2709)
* Corrected a phonetic spelling issue due to incorrect using of `a nd` in docstrings [#2719](https://github.com/IntelPython/dpnp/pull/2719)
* Resolved an issue causing `dpnp.linspace` to return an incorrect output shape when inputs were passed as arrays [#2712](https://github.com/IntelPython/dpnp/pull/2712)
* Resolved an issue where `dpnp` always returns the base allocation pointer, when the view start is expected [#2651](https://github.com/IntelPython/dpnp/pull/2651)
* Fixed an issue causing an exception in `dpnp.geomspace` and `dpnp.logspace` when called with explicit `device` keyword but any input array is allocated on another device [#2723](https://github.com/IntelPython/dpnp/pull/2723)

### Security

Expand Down
44 changes: 34 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ set(DPNP_TARGET_CUDA
Set to a truthy value (e.g., ON, TRUE) to use default architecture (sm_50), \
or to a specific architecture like sm_80."
)
set(HIP_TARGETS "" CACHE STRING "HIP architecture for target")
set(DPNP_TARGET_HIP "" CACHE STRING "HIP architecture for target")

set(_dpnp_sycl_targets)
set(_use_onemath OFF)
Expand Down Expand Up @@ -135,18 +135,28 @@ if("x${DPNP_SYCL_TARGETS}" STREQUAL "x")
set(_use_onemath_cuda ON)
endif()

if(HIP_TARGETS)
if(HIP_TARGETS MATCHES "^gfx")
if(DPNP_TARGET_HIP)
if(DPNP_TARGET_HIP MATCHES "^gfx")
if("x${_dpnp_sycl_targets}" STREQUAL "x")
set(_dpnp_sycl_targets "amd_gpu_${HIP_TARGETS},spir64-unknown-unknown")
set(_dpnp_sycl_targets
"amd_gpu_${DPNP_TARGET_HIP},spir64-unknown-unknown"
)
else()
set(_dpnp_sycl_targets "amd_gpu_${HIP_TARGETS},${_dpnp_sycl_targets}")
set(_dpnp_sycl_targets
"amd_gpu_${DPNP_TARGET_HIP},${_dpnp_sycl_targets}"
)
endif()

set(_use_onemath_hip ON)
set(HIP_TARGETS
${DPNP_TARGET_HIP}
CACHE STRING
"HIP GPU targets for oneMath"
)
else()
message(
FATAL_ERROR
"Invalid value for HIP_TARGETS: \"${HIP_TARGETS}\". "
"Invalid value for DPNP_TARGET_HIP: \"${DPNP_TARGET_HIP}\". "
"Expected an architecture name starting with 'gfx', e.g. 'gfx1030'."
)
endif()
Expand All @@ -159,11 +169,15 @@ else()
endif()

if("${DPNP_SYCL_TARGETS}" MATCHES "amd_gpu_")
set(_use_onemath_hip ON)

if("x${HIP_TARGETS}" STREQUAL "x")
message(FATAL_ERROR "HIP_TARGETS must be specified when using HIP backend")
if("x${DPNP_TARGET_HIP}" STREQUAL "x")
message(
FATAL_ERROR
"DPNP_TARGET_HIP must be specified when using HIP backend"
)
endif()

set(_use_onemath_hip ON)
set(HIP_TARGETS ${DPNP_TARGET_HIP} CACHE STRING "HIP GPU targets for oneMath")
endif()

if("${DPNP_SYCL_TARGETS}" MATCHES "amdgcn-amd-amdhsa")
Expand Down Expand Up @@ -295,6 +309,16 @@ else()
message(FATAL_ERROR "Unsupported system.")
endif()

# Define flags for CMAKE_BUILD_TYPE=Coverage
set(CMAKE_C_FLAGS_COVERAGE "${CMAKE_C_FLAGS_DEBUG} -O1 -g1 -DDEBUG")
set(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_DEBUG} -O1 -g1 -DDEBUG")
set(CMAKE_MODULE_LINKER_FLAGS_COVERAGE "${CMAKE_MODULE_LINKER_FLAGS_DEBUG}")
mark_as_advanced(
CMAKE_C_FLAGS_COVERAGE
CMAKE_CXX_FLAGS_COVERAGE
CMAKE_MODULE_LINKER_FLAGS_COVERAGE
)

if(DPNP_GENERATE_COVERAGE)
string(
CONCAT PROFILE_FLAGS
Expand Down
2 changes: 1 addition & 1 deletion conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% set max_compiler_and_mkl_version = environ.get("MAX_BUILD_CMPL_MKL_VERSION", "2026.0a0") %}
{% set required_compiler_and_mkl_version = "2025.0" %}
{% set required_dpctl_version = "0.21.0" %}
{% set required_dpctl_version = "0.22.0*" %}

{% set pyproject = load_file_data('pyproject.toml') %}
{% set py_build_deps = pyproject.get('build-system', {}).get('requires', []) %}
Expand Down
11 changes: 0 additions & 11 deletions doc/0.builddoc.sh

This file was deleted.

6 changes: 4 additions & 2 deletions doc/quick_start_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,15 @@ To build and install the package on Linux OS, run:

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

.. code-block:: bash
python setup.py install -- -G Ninja -DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icx
python setup.py build_ext --inplace -- -G Ninja -DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icx
python -m pip install -e .
Alternatively, to develop on Linux OS, you can use the driver script:

Expand Down
1 change: 0 additions & 1 deletion dpnp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,6 @@
kaiser,
)


# =============================================================================
# Helper functions
# =============================================================================
Expand Down
1 change: 0 additions & 1 deletion dpnp/backend/extensions/ufunc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ set(_elementwise_sources
${CMAKE_CURRENT_SOURCE_DIR}/elementwise_functions/divmod.cpp
${CMAKE_CURRENT_SOURCE_DIR}/elementwise_functions/erf_funcs.cpp
${CMAKE_CURRENT_SOURCE_DIR}/elementwise_functions/fabs.cpp
${CMAKE_CURRENT_SOURCE_DIR}/elementwise_functions/fix.cpp
${CMAKE_CURRENT_SOURCE_DIR}/elementwise_functions/float_power.cpp
${CMAKE_CURRENT_SOURCE_DIR}/elementwise_functions/fmax.cpp
${CMAKE_CURRENT_SOURCE_DIR}/elementwise_functions/fmin.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include "divmod.hpp"
#include "erf_funcs.hpp"
#include "fabs.hpp"
#include "fix.hpp"
#include "float_power.hpp"
#include "fmax.hpp"
#include "fmin.hpp"
Expand Down Expand Up @@ -67,7 +66,6 @@ void init_elementwise_functions(py::module_ m)
init_divmod(m);
init_erf_funcs(m);
init_fabs(m);
init_fix(m);
init_float_power(m);
init_fmax(m);
init_fmin(m);
Expand Down
Loading
Loading