Skip to content
Open
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: 0 additions & 2 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ extend-ignore = E203, W503
show-source = True

exclude =
versioneer.py
dpctl/_version.py
build
conda.recipe
.git
Expand Down
3 changes: 3 additions & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# *.bat text eol=crlf
* text=auto eol=lf

dpctl/_version.py export-subst
.git_archival.txt export-subst
8 changes: 5 additions & 3 deletions .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Checkout repo
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
# versioneer needs the tags to compute the package version
# setuptools-scm needs the tags to compute the package version
fetch-depth: 0
persist-credentials: false

Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:

- name: Install dpctl dependencies
run: |
pip install numpy cython setuptools"<80" scikit-build cmake ninja versioneer[toml]==0.29
pip install numpy cython scikit-build-core setuptools-scm cython-cmake cmake ninja

- name: Report compiler version
run: |
Expand Down Expand Up @@ -105,7 +105,9 @@ jobs:
run: |
set -o pipefail
source "${ONEAPI_ROOT}/setvars.sh"
# --skip-editable: build_ext --inplace already compiled everything
rm -rf build
# --skip-editable: a regular install is enough for Coverity to see
# all compilation units
cov-build --dir cov-int \
python scripts/build_locally.py --oneapi --skip-editable --verbose \
2>&1 | tee cov-build.log
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/generate-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
- name: Install dpctl dependencies
shell: bash -l {0}
run: |
pip install numpy cython setuptools"<80" pytest pytest-cov scikit-build cmake coverage[toml] versioneer[toml]==0.29
pip install numpy cython pytest pytest-cov scikit-build-core setuptools-scm cython-cmake cmake ninja coverage[toml]

- name: Build dpctl with coverage
shell: bash -l {0}
Expand All @@ -113,7 +113,7 @@ jobs:
shell: bash -l {0}
run: |
echo "Processing c-api-coverage"
DPCTL_LCOV_FN=$(find _skbuild -name dpctl.lcov)
DPCTL_LCOV_FN=$(find build/coverage -name dpctl.lcov)
export DPCTL_LCOV_FN
grep "/tmp" "$DPCTL_LCOV_FN"
coveralls-lcov -v -n \
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/generate-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,9 @@ jobs:
if: ${{ !github.event.pull_request || github.event.action != 'closed' }}
shell: bash -l {0}
run: |
pip install numpy cython setuptools">=70.1" scikit-build cmake sphinx"<7.2" pydot graphviz furo \
pip install numpy cython scikit-build-core setuptools-scm cython-cmake cmake ninja sphinx"<7.2" pydot graphviz furo \
sphinxcontrib-programoutput sphinxcontrib-googleanalytics sphinx-design \
sphinxcontrib-jsmath sphinx-copybutton sphinxcontrib-spelling \
versioneer[toml]==0.29
sphinxcontrib-jsmath sphinx-copybutton sphinxcontrib-spelling
- name: Checkout repo
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
Expand All @@ -78,7 +77,7 @@ jobs:
tar xf doxyrest-2.1.2-linux-amd64.tar.xz
python scripts/gen_docs.py --doxyrest-root="$(pwd)/doxyrest-2.1.2-linux-amd64" --verbose --multiversion --clean || exit 1
python -c "import dpctl; print(dpctl.__version__)" || exit 1
mv "$(find _skbuild -type d -path "*/cmake-install/docs/docs" | head -n 1)" ~/docs
mv build/docs/docs/docs ~/docs
git clean -dfx
git reset --hard
- name: Publish docs
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/intel-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
# versioneer takes the version from git describe.
# setuptools-scm takes the version from the git tags.
fetch-depth: 0

- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
Expand Down Expand Up @@ -245,7 +245,7 @@ jobs:
# oneMKL example looks for, and intel-opencl-rt provides the OpenCL CPU device to run them on
run: |
conda create -y -p "$RUNNER_TEMP/examples" "$DPCTL_SPEC" "$PYTHON_SPEC" pytest \
"setuptools<72.2.0" cmake ninja pybind11 cython scikit-build \
"setuptools<72.2.0" cmake ninja pybind11 cython cython-cmake scikit-build-core \
mkl-dpcpp mkl-devel-dpcpp tbb-devel intel-opencl-rt \
-c "$RUNNER_TEMP/channel" -c conda-forge --override-channels
conda create -y -p "$RUNNER_TEMP/build_env" \
Expand All @@ -261,7 +261,7 @@ jobs:
while IFS= read -r d; do
pushd "$d" > /dev/null
conda activate --stack "$RUNNER_TEMP/build_env"
CC=icx CXX=icpx python setup.py build_ext --inplace -G Ninja
CC=icx CXX=icpx python -m pip install --no-build-isolation --no-deps -e .
conda deactivate
if [ -e tests ]; then
LD_LIBRARY_PATH="${CONDA_PREFIX}/lib" python -m pytest tests
Expand All @@ -278,7 +278,7 @@ jobs:
while IFS= read -r d; do
pushd "$d" > /dev/null
conda activate --stack "$RUNNER_TEMP/build_env"
CC=icx CXX=icpx python setup.py build_ext --inplace -G Ninja
CC=icx CXX=icpx python -m pip install --no-build-isolation --no-deps -e .
conda deactivate
python -m pytest tests
popd > /dev/null
Expand Down Expand Up @@ -350,7 +350,7 @@ jobs:
run: |
@echo on
call conda create -y -p "%RUNNER_TEMP%\examples" "%DPCTL_SPEC%" "%PYTHON_SPEC%" pytest ^
"setuptools<72.2.0" cmake ninja pybind11 cython scikit-build ^
"setuptools<72.2.0" cmake ninja pybind11 cython cython-cmake scikit-build-core ^
mkl-dpcpp mkl-devel-dpcpp tbb-devel intel-opencl-rt ^
-c "%RUNNER_TEMP%\channel" -c conda-forge --override-channels || exit /b 1
call conda create -y -p "%RUNNER_TEMP%\build_env" "%DPCPP_CMPLR%" vs2022_win-64 ^
Expand Down Expand Up @@ -392,7 +392,7 @@ jobs:
REM endlocal drops the compiler's PATH, which conda deactivate leaves behind
setlocal
call conda activate --stack "%RUNNER_TEMP%\build_env" || exit /b 1
python setup.py build_ext --inplace -G Ninja || exit /b 1
python -m pip install --no-build-isolation --no-deps -e . || exit /b 1
endlocal
if exist tests (
python -m pytest -v tests || exit /b 1
Expand All @@ -415,7 +415,7 @@ jobs:
REM endlocal drops the compiler's PATH, which conda deactivate leaves behind
setlocal
call conda activate --stack "%RUNNER_TEMP%\build_env" || exit /b 1
python setup.py build_ext --inplace -G Ninja || exit /b 1
python -m pip install --no-build-isolation --no-deps -e . || exit /b 1
endlocal
python -m pytest -v tests || exit /b 1
popd
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/os-llvm-sycl-build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ jobs:
run: |
$ErrorActionPreference = 'Stop'
$PSNativeCommandUseErrorActionPreference = $true
python -m pip install numpy cython "setuptools<80" pytest scikit-build cmake ninja "versioneer[toml]==0.29"
python -m pip install numpy cython pytest scikit-build-core setuptools-scm cython-cmake cmake ninja

- name: Report compiler version
shell: pwsh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/os-llvm-sycl-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ jobs:
- name: Install dpctl dependencies
shell: bash -l {0}
run: |
pip install numpy cython setuptools"<80" pytest scikit-build cmake ninja versioneer[toml]==0.29
pip install numpy cython pytest scikit-build-core setuptools-scm cython-cmake cmake ninja

- name: Create set_allvars.sh
shell: bash -l {0}
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ __pycache__/

# CMake build and local install directory
build
_skbuild
build_cmake
install

Expand Down
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ repos:
rev: 26.10.1
hooks:
- id: black
exclude: "versioneer.py|dpctl/_version.py"
- repo: https://github.com/pycqa/isort
rev: 9.0.2
hooks:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Changed the development packages on `dppy/label/dev` to build against conda-forge only, and the wheels there to declare `intel-sycl-rt` and `intel-cmplr-lib-rt` in their metadata, at least the compiler version they were built with [gh-2409](https://github.com/IntelPython/dpctl/pull/2409)
* Changed the conda recipe's tests to `pip check`, the import and `python -m dpctl -f`, as in the conda-forge feedstock, so `conda build` and `conda build --test` no longer run the test suite; run it with `ci/hooks.py`, or with `python -m pytest --pyargs dpctl` in an environment with dpctl installed [gh-2409](https://github.com/IntelPython/dpctl/pull/2409)
* Changed the install instructions in `README.md` and the documentation to conda-forge and PyPI [gh-2409](https://github.com/IntelPython/dpctl/pull/2409)
* Build with `scikit-build-core` instead of `scikit-build` and `setuptools`, and compute the version with `setuptools-scm` instead of `versioneer` [gh-2345](https://github.com/IntelPython/dpctl/pull/2345)

## [0.23.0] - Oct. 22, 2026

Expand Down
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ target_link_libraries(DpctlCAPI INTERFACE DPCTLSyclInterfaceHeaders)

install(DIRECTORY
${CMAKE_CURRENT_SOURCE_DIR}/dpctl/apis/include/
DESTINATION ${CMAKE_INSTALL_PREFIX}/dpctl/include
DESTINATION dpctl/include
FILES_MATCHING REGEX "\\.h(pp)?$"
)

Expand All @@ -146,9 +146,15 @@ file(GLOB _cmake_scripts ${CMAKE_SOURCE_DIR}/cmake/*.cmake)
install(FILES ${_cmake_scripts}
DESTINATION dpctl/resources/cmake
)
# Installed into the environment prefix, not site-packages
if(DEFINED SKBUILD_DATA_DIR)
set(_dpctl_config_dest ${SKBUILD_DATA_DIR}/lib/cmake/dpctl)
else()
set(_dpctl_config_dest lib/cmake/dpctl)
endif()
install(FILES
${CMAKE_SOURCE_DIR}/cmake/dpctl-config.cmake
DESTINATION lib/cmake/dpctl
DESTINATION ${_dpctl_config_dest}
)

if (DPCTL_GENERATE_DOCS)
Expand Down
5 changes: 3 additions & 2 deletions conda-recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ REM A workaround for activate-dpcpp.bat issue to be addressed in 2021.4
set "LIB=%BUILD_PREFIX%\Library\lib;%BUILD_PREFIX%\compiler\lib;%LIB%"
set "INCLUDE=%BUILD_PREFIX%\include;%INCLUDE%"

"%PYTHON%" setup.py clean --all

REM useful for building in resources constrained VMs (public CI)
set "CMAKE_ARGS=%CMAKE_ARGS% -DCMAKE_INTERPROCEDURAL_OPTIMIZATION:BOOL=FALSE"

Expand All @@ -22,6 +20,9 @@ set "CC=icx"
set "CXX=icx"

set "CMAKE_GENERATOR=Ninja"
:: Set by the VS activation, but not supported by Ninja
set "CMAKE_GENERATOR_PLATFORM="
set "CMAKE_GENERATOR_TOOLSET="
:: Make CMake verbose
set "VERBOSE=1"

Expand Down
4 changes: 0 additions & 4 deletions conda-recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ export ICPXCFG
ICXCFG="$(pwd)/icpx_for_conda.cfg"
export ICXCFG

if [ -e "_skbuild" ]; then
${PYTHON} setup.py clean --all
fi

export CC=icx
export CXX=icpx

Expand Down
12 changes: 3 additions & 9 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,13 @@ requirements:
- pybind11 >=3.0.2
- intel-sycl-rt
- intel-cmplr-lib-rt
# Ensure we are using latest version of setuptools, since we don't need
# editable environments for release.
- setuptools >=69
- wheel >=0.43
- python-build >=1.1
- scikit-build >=0.17.0,<1.0
- scikit-build-core >=0.11
- setuptools-scm >=8
- cython-cmake >=0.2
- cython >=3.1.0 # [py>=313]
- cython >=3.0.10 # [py<313]
- numpy
# WARNING: check with doc how to upgrade
- versioneer ==0.29
# versioneer dependency
- tomli # [py<311]
run:
- python
- {{ pin_compatible('intel-sycl-rt', min_pin='x.x', max_pin='x') }}
Expand Down
2 changes: 1 addition & 1 deletion docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ if (DPCTL_ENABLE_DOXYREST)
endif()

# Set the location where the generated docs are saved
set(DOC_OUTPUT_DIR ${CMAKE_INSTALL_PREFIX}/docs)
set(DOC_OUTPUT_DIR ${CMAKE_BINARY_DIR}/docs)

# set(INDEX_NO_DOXYREST_IN ${CMAKE_CURRENT_SOURCE_DIR}/index_no_doxyrest.rst.in)
# set(INDEX_DOXYREST_IN ${CMAKE_CURRENT_SOURCE_DIR}/index_doxyrest.rst.in)
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Generating The Documentation

The helper script ``scripts/gen_docs.py`` is the preferred way to generate the
documentation. The generated documentation HTML pages are installed to the
``CMAKE_INSTALL_PREFIX/docs`` directory.
``docs`` directory in the CMake build directory.

----------------------------
```bash
Expand Down
4 changes: 2 additions & 2 deletions docs/doc_sources/api_reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ The package ``dpctl`` provides
* Extension generators
- :ref:`Declarations <dpctl_cython_api>` for classes defined in :py:mod:`dpctl` and supporting functions for use in `Cython <cython_docs_>`_.
- :ref:`Integration <dpctl_pybind11_api>` with `pybind11 <pybind11_docs_>`_ defines type casters connecting SYCL classes and Python classes, as well as defines C++ classes wrapping a Python object for :mod:`dpctl.memory` objects.
- :ref:`Integration <dpctl_cmake_support>` with `CMake <cmake_docs_>`_ to simplify building DPC++-based Python extension using `scikit-build <skbuild_docs_>`_.
- :ref:`Integration <dpctl_cmake_support>` with `CMake <cmake_docs_>`_ to simplify building DPC++-based Python extension using `scikit-build-core <skbuild_docs_>`_.
* C API for DPC++ runtime
- :doc:`DPCTLSyclInterface C library <libsyclinterface/generated/index>`


.. _cmake_docs: https://cmake.org/documentation/
.. _cython_docs: https://cython.readthedocs.io/en/latest/
.. _skbuild_docs: https://scikit-build.readthedocs.io/en/latest/
.. _skbuild_docs: https://scikit-build-core.readthedocs.io/en/latest/
.. _pybind11_docs: https://pybind11.readthedocs.io/en/stable/

.. toctree::
Expand Down
2 changes: 1 addition & 1 deletion docs/doc_sources/beginners_guides/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ One way to create such environment is as follows:

conda create -n dev_dpctl -c conda-forge python=3.12 pip
conda activate dev_dpctl
pip install --no-cache-dir numpy cython scikit-build cmake ninja pytest
pip install --no-cache-dir numpy cython cython-cmake scikit-build-core setuptools-scm cmake ninja pytest

Using such environment and with DPC++ compiler activated, build the project using

Expand Down
Loading
Loading