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
34 changes: 20 additions & 14 deletions .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,24 @@ jobs:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
- name: Add conda to system path
run: echo $CONDA/bin >> $GITHUB_PATH
- name: Install conda-build
run: conda install conda-build -c conda-forge --override-channels
- name: Install rattler-build
run: conda install conda-build rattler-build -c conda-forge --override-channels
- name: Store conda paths as envs
shell: bash -l {0}
run: |
echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE${{ runner.os == 'Linux' && '/' || '\\' }}" >> $GITHUB_ENV
- name: Create variant config
run: |
echo "python:\n- ${{ matrix.python }}\n\nnumpy:\n - 2.0" > $GITHUB_WORKSPACE/conda-recipe/variant-config.yaml
- name: Build conda package
run: |
# use bootstrap channel to pull NumPy linked with OpenBLAS
CHANNELS="-c conda-forge --override-channels"
VERSIONS="--python ${{ matrix.python }} --numpy 2.0"
TEST="--no-test"
conda build \
$TEST \
$VERSIONS \
$CHANNELS \
conda-recipe
rattler-build build \
-r $GITHUB_WORKSPACE/conda-recipe/recipe.yaml \
-m $GITHUB_WORKSPACE/conda-recipe/variant-config.yaml \
--test skip \
--experimental \
--channel-priority strict \
-c conda-forge
- name: Upload artifact
uses: actions/[email protected]
with:
Expand Down Expand Up @@ -105,10 +106,10 @@ jobs:
conda-remove-defaults: true
python-version: ${{ matrix.python }}

- name: Install conda build
- name: Install rattler-build
run: |
conda activate
conda install -y conda-build
conda install -y conda-build rattler-build
conda list -n base

- name: Cache conda packages
Expand All @@ -129,13 +130,18 @@ jobs:
echo "CONDA_BLD=$CONDA/conda-bld/win-64/" | tr "\\\\" '/' >> $GITHUB_ENV
echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE${{ runner.os == 'Linux' && '/' || '\\' }}" >> $GITHUB_ENV

- name: Create variant config
shell: bash -l {0}
run: |
echo "python:\n- ${{ matrix.python }}\n\nnumpy:\n - 2.0" > $GITHUB_WORKSPACE/conda-recipe/variant-config.yaml

- name: Build conda package
env:
OVERRIDE_INTEL_IPO: 1 # IPO requires more resources that GH actions VM provides
run: |
conda activate
# TODO: roll back use of Intel channel when 2025.1 is available on conda-forge
conda build --no-test --python ${{ matrix.python }} --numpy 2.0 -c ${{ env.INTEL_CHANNEL }} -c conda-forge --override-channels conda-recipe
rattler-build build -r %GITHUB_WORKSPACE%\conda-recipe\recipe.yaml -m %GITHUB_WORKSPACE%\conda-recipe\variant-config.yaml --test skip --experimental --channel-priority strict -c ${{ env.INTEL_CHANNEL }} -c conda-forge

- name: Upload artifact
uses: actions/[email protected]
Expand Down
4 changes: 3 additions & 1 deletion conda-recipe/bld.bat → conda-recipe/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ set "INCLUDE=%BUILD_PREFIX%\include;%INCLUDE%"

REM Overriding IPO is useful for building in resources constrained VMs (public CI)
if DEFINED OVERRIDE_INTEL_IPO (
set "CMAKE_ARGS=%CMAKE_ARGS% -DCMAKE_INTERPROCEDURAL_OPTIMIZATION:BOOL=FALSE"
if "%OVERRIDE_INTEL_IPO%"!="" (
set "CMAKE_ARGS=%CMAKE_ARGS% -DCMAKE_INTERPROCEDURAL_OPTIMIZATION:BOOL=FALSE"
)
)

FOR %%V IN (17.0.0 17 18.0.0 18 19.0.0 19 20.0.0 20) DO @(
Expand Down
92 changes: 0 additions & 92 deletions conda-recipe/meta.yaml

This file was deleted.

118 changes: 118 additions & 0 deletions conda-recipe/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
schema_version: 1

context:
name: dpctl
git_repo_url: "https://github.com/IntelPython/dpctl.git"
latest_tag: ${{ git.latest_tag( git_repo_url ) }}
version: ${{ latest_tag }}
buildnumber: ${{ GIT_DESCRIBE_NUMBER }}
required_compiler_version: "2024.2.0"

package:
name: ${{ name }}
version: ${{ version }}

source:
path: ..
use_gitignore: false

build:
number: ${{buildnumber}}
script:
env:
WHEELS_OUTPUT_FOLDER: ${{ env.get("WHEELS_OUTPUT_FOLDER", default="") }}
OVERRIDE_INTEL_IPO: ${{ env.get("OVERRIDE_INTEL_IPO", default="") }}

requirements:
ignore_run_exports:
by_name:
- level-zero
# TODO: keep in sync with /pyproject.toml
build:
- ${{ compiler('cxx') }}
- ${{ stdlib('c') }}
- ${{ compiler('dpcpp') }} >= ${{ required_compiler_version }}
host:
- python
- pip >=24.0
- level-zero-devel >=1.16
- pybind11 >=2.12
- ${{ pin_compatible('intel-sycl-rt', lower_bound='x.x', upper_bound='x') }}
- ${{ pin_compatible('intel-cmplr-lib-rt', lower_bound='x.x', upper_bound='x') }}
# Ensure we are using latest version of setuptools, since we don't need
# editable environments for release.
- setuptools >=63.0
- wheel>=0.43
- python-build>=1.1
- scikit-build>=0.17.0
- if: linux
then:
- ninja>=1.11.1
- cmake>=3.29.0
- if: match(python, ">=3.13")
then:
- cython>=3.0.10,<3.1.0
- if: match(python, "<3.13")
then:
- cython>=3.0.10
- numpy>=1.23
# WARNING: check with doc how to upgrade
- versioneer==0.29
# versioneer dependency
- if: python < "3.11"
then:
- tomli
run:
- python
- ${{ pin_compatible('intel-sycl-rt', lower_bound='x.x', upper_bound='x') }}
- ${{ pin_compatible('intel-cmplr-lib-rt', lower_bound='x.x', upper_bound='x') }}
- numpy

tests:
- script:
- if: linux
then:
- run_test.sh
- if: win
then:
- run_test.bat
files:
recipe:
- run_test.sh
- run_test.bat
requirements:
run:
- ${{ compiler('c') }}
- ${{ compiler('cxx') }}
- ${{ stdlib('c') }}
- if: match(python, ">=3.13")
then:
- cython>=3.0.10,<3.1.0
- if: match(python, "<3.13")
then:
- cython>=3.0.10
- setuptools
- pytest
- pytest-cov

about:
homepage: https://github.com/IntelPython/dpctl.git
license: Apache-2.0
license_file: LICENSE
summary: 'A lightweight Python wrapper for a subset of SYCL API.'
description: |
<strong>LEGAL NOTICE: Use of this software package is subject to the
software license agreement (as set forth above, in the license section of
the installed Conda package and/or the README file) and all notices,
disclaimers or license terms for third party or open source software
included in or with the software.</strong>
<br/><br/>
EULA: <a href="https://opensource.org/licenses/Apache-2.0" target="_blank">Apache-2.0</a>
<br/><br/>

extra:
recipe-maintainers:
- ndgrigorian
- antonwolfy
- vtavana
- vlad-perevezentsev