Skip to content

Commit 49c95c5

Browse files
authored
Merge pull request #294 from IntelPython/fix/add_npbench_configs
Add npbench/polybench benchmarks to package release
2 parents 5a588e0 + 87775da commit 49c95c5

File tree

7 files changed

+42
-29
lines changed

7 files changed

+42
-29
lines changed

.github/workflows/build_and_run.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
env:
1313
# sycl is not included. Add it manually if you need
1414
WORKLOADS: python,numpy,dpnp,numba_n,numba_np,numba_npr,numba_dpex_k,numba_dpex_n,numba_dpex_p
15+
PYTHONIOENCODING: 'utf-8'
1516

1617
jobs:
1718
build:
@@ -49,7 +50,7 @@ jobs:
4950

5051
defaults:
5152
run:
52-
shell: ${{ matrix.os == 'windows-latest' && 'cmd /C CALL {0}' || 'bash -el {0}' }}
53+
shell: ${{ matrix.os == 'windows-latest' && 'cmd /U /C CALL {0}' || 'bash -el {0}' }}
5354

5455
steps:
5556
- name: Cancel Previous Runs
@@ -94,13 +95,6 @@ jobs:
9495
conda info
9596
conda list
9697
97-
- name: Configure Python
98-
if: runner.os == 'Windows'
99-
shell: pwsh
100-
run: |
101-
# Set python encoding to support utf-8 symblos like ms.
102-
echo "PYTHONIOENCODING=utf-8" >> $env:GITHUB_ENV
103-
10498
- name: Patch IntelLLVM cmake
10599
if: runner.os == 'Windows' && matrix.sycl == 'sycl'
106100
shell: pwsh

.github/workflows/conda-package.yml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ env:
1818
VER_JSON_NAME: 'version.json'
1919
VER_SCRIPT1: "import json; f = open('version.json', 'r'); j = json.load(f); f.close(); "
2020
VER_SCRIPT2: "d = j['dpbench'][0]; print('='.join((d[s] for s in ('version', 'build'))))"
21+
PYTHONIOENCODING: 'utf-8'
2122

2223
jobs:
2324
build:
@@ -33,7 +34,7 @@ jobs:
3334

3435
defaults:
3536
run:
36-
shell: ${{ matrix.os == 'windows-latest' && 'cmd /C CALL {0}' || 'bash -l {0}' }}
37+
shell: ${{ matrix.os == 'windows-latest' && 'cmd /U /C CALL {0}' || 'bash -el {0}' }}
3738

3839
continue-on-error: false
3940

@@ -94,7 +95,7 @@ jobs:
9495

9596
defaults:
9697
run:
97-
shell: ${{ matrix.os == 'windows-latest' && 'cmd /C CALL {0}' || 'bash -l {0}' }}
98+
shell: ${{ matrix.os == 'windows-latest' && 'cmd /U /C CALL {0}' || 'bash -el {0}' }}
9899

99100
strategy:
100101
fail-fast: false
@@ -155,19 +156,35 @@ jobs:
155156
cat ${{ env.VER_JSON_PATH }}
156157
157158
- name: Install dpbench
158-
run: mamba install ${{ env.PACKAGE_NAME }}=${{ env.PACKAGE_VERSION }} pytest opencl_rt python=${{ matrix.python }} -c ${{ env.CHANNEL_PATH }}
159+
run: mamba install ${{ env.PACKAGE_NAME }}=${{ env.PACKAGE_VERSION }} pytest intel::intel-opencl-rt python=${{ matrix.python }} -c ${{ env.CHANNEL_PATH }}
160+
161+
- name: Setup OpenCL CPU device
162+
if: runner.os == 'Windows'
163+
shell: pwsh
164+
run: |
165+
$script_path="$env:CONDA_PREFIX\Scripts\set-intel-ocl-icd-registry.ps1"
166+
&$script_path
167+
echo "OCL_ICD_FILENAMES=$env:CONDA_PREFIX\Library\lib\intelocl64.dll" >> $env:GITHUB_ENV
159168
160169
- name: List installed packages
161170
run: conda list
162171

163172
- name: Smoke test
164173
run: python -c "import dpnp, dpctl, dpbench; dpctl.lsplatform()"
165174

166-
- name: Run benchmakrs
175+
- name: Run benchmarks
167176
run: |
168177
dpbench -i numpy,numba_dpex_p,dpnp,numba_n,sycl run
178+
179+
- name: Generate report
180+
run: |
169181
dpbench report
170182
183+
# we want to make sure that configuration files are geting populated
184+
- name: Run npbench benchmark
185+
run: |
186+
dpbench -i numpy -b azimint_hist run --npbench
187+
171188
upload_anaconda:
172189
name: Upload dppy/label/dev ['${{ matrix.os }}', python='${{ matrix.python }}']
173190

@@ -182,7 +199,7 @@ jobs:
182199

183200
defaults:
184201
run:
185-
shell: bash -l {0}
202+
shell: bash -el {0}
186203

187204
continue-on-error: false
188205

dpbench/benchmarks/__init__.py

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

dpbench/configs/__init__.py

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

dpbench/configs/bench_info/__init__.py

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

dpbench/configs/framework_info/__init__.py

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

setup.py

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import os
88

99
import versioneer
10-
from setuptools import find_packages
10+
from setuptools import find_namespace_packages, find_packages
1111

1212
if not os.getenv("DPBENCH_SYCL"):
1313
from setuptools import setup
@@ -28,15 +28,29 @@
2828
# https://github.com/pypa/packaging-problems/issues/606
2929
url="https://github.com/IntelPython/dpbench",
3030
packages=(
31-
find_packages(include=["*"])
32-
+ find_packages(where="./dpbench/benchmarks/*/*")
31+
find_packages(include=["dpbench*"], exclude=["dpbench.benchmarks*"])
32+
+ find_namespace_packages(include=["dpbench.benchmarks*"])
33+
+ find_namespace_packages(include=["dpbench.configs*"])
3334
),
3435
version=versioneer.get_version(),
3536
cmdclass=versioneer.get_cmdclass(),
3637
include_package_data=True,
3738
package_data={
3839
"dpbench.migrations": ["alembic.ini"],
39-
"dpbench.configs": ["*/*.toml", "*.toml"],
40+
"dpbench.configs": [
41+
"*.toml",
42+
"bench_info/*.toml",
43+
"bench_info/polybench/*.toml",
44+
"bench_info/polybench/stencils/*.toml",
45+
"bench_info/polybench/datamining/*.toml",
46+
"bench_info/polybench/linear-algebra/*.toml",
47+
"bench_info/polybench/linear-algebra/kernels/*.toml",
48+
"bench_info/polybench/linear-algebra/solvers/*.toml",
49+
"bench_info/polybench/linear-algebra/blas/*.toml",
50+
"bench_info/polybench/medley/*.toml",
51+
"bench_info/npbench/*.toml",
52+
"framework_info/*.toml",
53+
],
4054
},
4155
cmake_args=cmake_args,
4256
)

0 commit comments

Comments
 (0)