-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #293 from IntelPython/fix/broken_build
Fix CI build
- Loading branch information
Showing
21 changed files
with
207 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,19 +11,26 @@ on: | |
|
||
env: | ||
# sycl is not included. Add it manually if you need | ||
WORKLOADS: python,numpy,dpnp,numba_n,numba_np,numba_npr,numba_dpex_k,numba_dpex_n,numba_dpex_p,numba_mlir_k,numba_mlir_n,numba_mlir_p | ||
WORKLOADS: python,numpy,dpnp,numba_n,numba_np,numba_npr,numba_dpex_k,numba_dpex_n,numba_dpex_p | ||
|
||
jobs: | ||
build_linux: | ||
build: | ||
name: Build and run | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ["ubuntu-latest", "windows-latest"] | ||
python: ["3.9", "3.10"] | ||
python: ["3.9", "3.10", "3.11"] | ||
sycl: ["sycl","no-sycl"] | ||
install: ["pip", "setup.py"] | ||
exclude: | ||
# setuptools<64 + scikit-build produce 'UNKOWN' package name for | ||
# python 3.11. Could not find exact reference for that issue. | ||
# latest setuptools is unable to create editable environment for pip | ||
- python: "3.11" | ||
install: "pip" | ||
sycl: "sycl" | ||
include: | ||
- sycl: sycl | ||
os: ubuntu-latest | ||
|
@@ -40,6 +47,10 @@ jobs: | |
|
||
runs-on: ${{matrix.os}} | ||
|
||
defaults: | ||
run: | ||
shell: ${{ matrix.os == 'windows-latest' && 'cmd /C CALL {0}' || 'bash -el {0}' }} | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
|
@@ -51,6 +62,22 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
# intel:numpy for python 3.11 is not upstreamed yet | ||
- name: Patch numpy dependency for Python 3.11 | ||
if: matrix.python == '3.11' | ||
shell: bash -l {0} | ||
run: | | ||
find ./environments -type f | xargs sed -i 's/intel::numpy/numpy/' | ||
find ./environments -type f | xargs sed -i '/numba-mlir/d' | ||
find ./environments -type f | xargs sed -i 's/setuptools>=42,<64/setuptools/' | ||
# TODO: remove once numba_mlir support python 3.11 | ||
- name: Patch numpy dependency for Python 3.11 | ||
if: matrix.python != '3.11' | ||
shell: bash -l {0} | ||
run: | | ||
echo "WORKLOADS=$WORKLOADS,numba_mlir_k,numba_mlir_n,numba_mlir_p" >> "$GITHUB_ENV" | ||
- name: Setup miniconda | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
|
@@ -63,25 +90,10 @@ jobs: | |
run-post: false | ||
|
||
- name: Conda info | ||
shell: bash -el {0} | ||
run: | | ||
conda info | ||
conda list | ||
- name: Setup OpenCL CPU device | ||
if: runner.os == 'Windows' | ||
shell: pwsh | ||
run: | | ||
$script_path="$env:CONDA_PREFIX\Scripts\set-intel-ocl-icd-registry.ps1" | ||
&$script_path | ||
echo "OCL_ICD_FILENAMES=$env:CONDA_PREFIX\Library\lib\intelocl64.dll" >> $env:GITHUB_ENV | ||
echo "LIB=$env:CONDA_PREFIX\Library\lib;$env:CONDA_PREFIX\compiler\lib;$env:LIB" >> $env:GITHUB_ENV | ||
echo "INCLUDE=$env:CONDA_PREFIX\include;$env:INCLUDE" >> $env:GITHUB_ENV | ||
# Check the variable assisting OpenCL CPU driver to find TBB DLLs which are not located where it expects them by default | ||
$cl_cfg="$env:CONDA_PREFIX\Library\lib\cl.cfg" | ||
Get-Content -Tail 5 -Path $cl_cfg | ||
- name: Configure Python | ||
if: runner.os == 'Windows' | ||
shell: pwsh | ||
|
@@ -98,6 +110,20 @@ jobs: | |
$env:FN="Windows-IntelLLVM.cmake" | ||
Copy-Item ".github\workflows\Windows-IntelLLVM_${env:PATCHED_CMAKE_VERSION}.cmake" "${env:PLATFORM_DIR}\${env:FN}" | ||
# TODO: remove it once it is removed from hard dependency. Not presented | ||
# in conda-forge version, but there are some blockers before we could use | ||
# it. | ||
- name: Remove vs env | ||
if: runner.os == 'Windows' && matrix.sycl == 'sycl' | ||
run: | | ||
conda remove --force vs2017_win-64 | ||
- name: Configure MSBuild | ||
if: runner.os == 'Windows' && matrix.sycl == 'sycl' | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
with: | ||
toolset: 14.35 | ||
|
||
- name: Configure Sycl | ||
if: matrix.sycl == 'sycl' | ||
shell: bash -el {0} | ||
|
@@ -108,31 +134,47 @@ jobs: | |
echo "DPBENCH_SYCL=1" >> "$GITHUB_ENV" | ||
echo "WORKLOADS=$WORKLOADS,sycl" >> "$GITHUB_ENV" | ||
- name: Configure compiler | ||
run: | | ||
echo "CMAKE_GENERATOR=Ninja" >> "$GITHUB_ENV" | ||
- name: Configure OneAPI | ||
run: | | ||
echo "ONEAPI_DEVICE_SELECTOR=opencl:cpu" >> "$GITHUB_ENV" | ||
- name: Populate conda environment paths | ||
shell: pwsh | ||
if: runner.os == 'Windows' | ||
run: | | ||
echo "LIB=$env:CONDA_PREFIX\Library\lib;$env:CONDA_PREFIX\compiler\lib;$env:LIB" >> $env:GITHUB_ENV | ||
echo "INCLUDE=$env:CONDA_PREFIX\include;$env:INCLUDE" >> $env:GITHUB_ENV | ||
- name: Build dpbench | ||
if: matrix.install == 'pip' | ||
shell: bash -el {0} | ||
run: | | ||
pip install \ | ||
--no-index --no-deps --no-build-isolation -e . -v | ||
run: pip install --no-index --no-deps --no-build-isolation -e . -v | ||
|
||
- name: Build dpbench | ||
if: matrix.install == 'setup.py' | ||
shell: bash -el {0} | ||
run: | | ||
python setup.py develop | ||
run: python setup.py develop | ||
|
||
- name: Run benchmarks | ||
- name: Configure dpbench | ||
shell: bash -el {0} | ||
run: | | ||
export NUMBA_MLIR_GPU_RUNTIME=sycl | ||
# TODO: do we need GPU in github acions? | ||
echo "NUMBA_MLIR_GPU_RUNTIME=sycl" >> "GITHUB_ENV" | ||
# Turn off numba-dpex autofall back | ||
export NUMBA_DPEX_FALLBACK_ON_CPU=0 | ||
# Make sure numba-dpex is using native atomics in github CI | ||
export NUMBA_DPEX_ACTIVATE_ATOMICS_FP_NATIVE=1 | ||
echo "NUMBA_DPEX_FALLBACK_ON_CPU=0" >> "GITHUB_ENV" | ||
- name: Setup OpenCL CPU device | ||
if: runner.os == 'Windows' | ||
shell: pwsh | ||
run: | | ||
$script_path="$env:CONDA_PREFIX\Scripts\set-intel-ocl-icd-registry.ps1" | ||
&$script_path | ||
echo "OCL_ICD_FILENAMES=$env:CONDA_PREFIX\Library\lib\intelocl64.dll" >> $env:GITHUB_ENV | ||
dpbench -i ${WORKLOADS} run -r2 --no-print-results || exit 1 | ||
- name: Run benchmarks | ||
run: dpbench -i ${{env.WORKLOADS}} run -r2 --no-print-results || exit 1 | ||
|
||
- name: Generate report | ||
shell: bash -el {0} | ||
run: | | ||
dpbench -i ${WORKLOADS} report || exit 1 | ||
run: dpbench -i ${{env.WORKLOADS}} report || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ env: | |
PACKAGE_NAME: dpbench | ||
MODULE_NAME: dpbench | ||
# There is a separate action that removes defaults. | ||
CHANNELS: 'dppy/label/dev,conda-forge,intel' | ||
CHANNELS: 'dppy/label/dev,conda-forge,intel,nodefaults' | ||
VER_JSON_NAME: 'version.json' | ||
VER_SCRIPT1: "import json; f = open('version.json', 'r'); j = json.load(f); f.close(); " | ||
VER_SCRIPT2: "d = j['dpbench'][0]; print('='.join((d[s] for s in ('version', 'build'))))" | ||
|
@@ -26,14 +26,14 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
python: ['3.9', '3.10'] | ||
python: ['3.9', '3.10', '3.11'] | ||
os: [ubuntu-latest, windows-latest] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
shell: ${{ matrix.os == 'windows-latest' && 'cmd /C CALL {0}' || 'bash -l {0}' }} | ||
|
||
continue-on-error: false | ||
|
||
|
@@ -63,12 +63,19 @@ jobs: | |
run: conda config --remove channels defaults | ||
|
||
- name: Store conda paths as envs | ||
shell: bash -l {0} | ||
run: echo "CONDA_BLD=$CONDA_PREFIX/conda-bld/${{ runner.os == 'Linux' && 'linux' || 'win' }}-64/" | tr "\\" '/' >> $GITHUB_ENV | ||
|
||
# boa is an extention to conda so we can use mamba resolver in conda build | ||
- name: Install conda-build | ||
run: mamba install boa | ||
|
||
- name: Configure MSBuild | ||
if: runner.os == 'Windows' | ||
uses: microsoft/[email protected] | ||
with: | ||
vs-version: '14.35' | ||
|
||
- name: Build conda package | ||
run: conda mambabuild --no-test --python ${{ matrix.python }} conda-recipe | ||
|
||
|
@@ -92,7 +99,7 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
python: ['3.9', '3.10'] | ||
python: ['3.9', '3.10', '3.11'] | ||
os: [ubuntu-20.04, ubuntu-latest, windows-latest] | ||
experimental: [false] | ||
|
||
|
@@ -168,7 +175,7 @@ jobs: | |
|
||
strategy: | ||
matrix: | ||
python: ['3.9', '3.10'] | ||
python: ['3.9', '3.10', '3.11'] | ||
os: [ubuntu-latest, windows-latest] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.