Skip to content

Commit b997ca8

Browse files
committed
Add versioneer
1 parent f56f819 commit b997ca8

File tree

12 files changed

+736
-7
lines changed

12 files changed

+736
-7
lines changed

.flake8

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ exclude =
88
__pycache__
99
./dist
1010
./setup.py
11+
./dpbench/_version.py
1112
max-complexity = 10

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# SPDX-FileCopyrightText: 2022 - 2023 Intel Corporation
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
dpbench/_version.py export-subst

.github/workflows/build_and_run.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ on:
1111

1212
env:
1313
# sycl is not included. Add it manually if you need
14-
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
14+
# 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
15+
WORKLOADS: python,numpy,dpnp,numba_n,numba_np,numba_npr,numba_dpex_k,numba_dpex_n,numba_dpex_p
1516

1617
jobs:
17-
build_linux:
18+
build:
1819
name: Build and run
1920

2021
strategy:
@@ -107,6 +108,13 @@ jobs:
107108
echo "CXX=${{matrix.cxx}}" >> "$GITHUB_ENV"
108109
echo "DPBENCH_SYCL=1" >> "$GITHUB_ENV"
109110
echo "WORKLOADS=$WORKLOADS,sycl" >> "$GITHUB_ENV"
111+
echo "SKBUILD_ARGS=-G Ninja" >> "$GITHUB_ENV"
112+
113+
- name: Configure Sycl for Windows
114+
if: matrix.sycl == 'sycl'
115+
shell: bash -el {0}
116+
run: |
117+
echo "SKBUILD_ARGS=-G Ninja -- -DMSVC_TOOLSET_VERSION=141" >> "$GITHUB_ENV"
110118
111119
- name: Build dpbench
112120
if: matrix.install == 'pip'
@@ -119,7 +127,7 @@ jobs:
119127
if: matrix.install == 'setup.py'
120128
shell: bash -el {0}
121129
run: |
122-
python setup.py develop
130+
python setup.py develop $SKBUILD_ARGS
123131
124132
- name: Run benchmarks
125133
shell: bash -el {0}

conda-recipe/bld.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ SET "DPBENCH_SYCL=1"
1818
"%PYTHON%" setup.py clean --all
1919

2020
set "SKBUILD_ARGS=-G Ninja -- -DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icx"
21+
set "SKBUILD_ARGS=%SKBUILD_ARGS% -DMSVC_TOOLSET_VERSION=141"
2122
set "SKBUILD_ARGS=%SKBUILD_ARGS% -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"
2223

2324
FOR %%V IN (14.0.0 14 15.0.0 15 16.0.0 16 17.0.0 17) DO @(

conda-recipe/meta.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,32 @@
44

55
package:
66
name: dpbench
7-
version: 0.1
7+
version: {{ GIT_DESCRIBE_TAG }}
8+
89
source:
910
path: ..
1011

12+
build:
13+
number: {{ GIT_DESCRIBE_NUMBER }}
14+
script_env:
15+
- WHEELS_OUTPUT_FOLDER
16+
1117
requirements:
1218
build:
1319
- {{ compiler('cxx') }}
1420
- {{ compiler('dpcpp') }} >=2023.1 # [not osx]
1521
- sysroot_linux-64 >=2.28 # [linux]
22+
- versioneer
1623
host:
1724
- python
1825
- setuptools
1926
- cmake
20-
- ninja
27+
- ninja # [not win]
2128
- wheel
2229
- scikit-build
2330
- cython
2431
- pybind11
32+
- versioneer
2533
# runtime requirements, cause conda tries to install after build
2634
# - tomli
2735
# - alembic
@@ -40,6 +48,7 @@ requirements:
4048
- tomli
4149
- alembic
4250
- sqlalchemy
51+
- versioneer
4352
# - py-cpuinfo
4453
- scipy
4554
- scikit-learn

dpbench/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
# SPDX-FileCopyrightText: 2022 - 2023 Intel Corporation
22
#
33
# SPDX-License-Identifier: Apache-2.0
4+
5+
from . import _version
6+
7+
__version__ = _version.get_versions()["version"]

0 commit comments

Comments
 (0)