diff --git a/.github/workflows/build_and_run.yml b/.github/workflows/build_and_run.yml index 7071de0e..13ad8f85 100644 --- a/.github/workflows/build_and_run.yml +++ b/.github/workflows/build_and_run.yml @@ -12,6 +12,7 @@ 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 + PYTHONIOENCODING: 'utf-8' jobs: build: @@ -49,7 +50,7 @@ jobs: defaults: run: - shell: ${{ matrix.os == 'windows-latest' && 'cmd /C CALL {0}' || 'bash -el {0}' }} + shell: ${{ matrix.os == 'windows-latest' && 'cmd /U /C CALL {0}' || 'bash -el {0}' }} steps: - name: Cancel Previous Runs @@ -94,13 +95,6 @@ jobs: conda info conda list - - name: Configure Python - if: runner.os == 'Windows' - shell: pwsh - run: | - # Set python encoding to support utf-8 symblos like ms. - echo "PYTHONIOENCODING=utf-8" >> $env:GITHUB_ENV - - name: Patch IntelLLVM cmake if: runner.os == 'Windows' && matrix.sycl == 'sycl' shell: pwsh diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index 87fc7284..a9afea0b 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -18,6 +18,7 @@ env: 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'))))" + PYTHONIOENCODING: 'utf-8' jobs: build: @@ -33,7 +34,7 @@ jobs: defaults: run: - shell: ${{ matrix.os == 'windows-latest' && 'cmd /C CALL {0}' || 'bash -l {0}' }} + shell: ${{ matrix.os == 'windows-latest' && 'cmd /U /C CALL {0}' || 'bash -el {0}' }} continue-on-error: false @@ -94,7 +95,7 @@ jobs: defaults: run: - shell: ${{ matrix.os == 'windows-latest' && 'cmd /C CALL {0}' || 'bash -l {0}' }} + shell: ${{ matrix.os == 'windows-latest' && 'cmd /U /C CALL {0}' || 'bash -el {0}' }} strategy: fail-fast: false @@ -155,7 +156,15 @@ jobs: cat ${{ env.VER_JSON_PATH }} - name: Install dpbench - run: mamba install ${{ env.PACKAGE_NAME }}=${{ env.PACKAGE_VERSION }} pytest opencl_rt python=${{ matrix.python }} -c ${{ env.CHANNEL_PATH }} + run: mamba install ${{ env.PACKAGE_NAME }}=${{ env.PACKAGE_VERSION }} pytest intel::intel-opencl-rt python=${{ matrix.python }} -c ${{ env.CHANNEL_PATH }} + + - 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 - name: List installed packages run: conda list @@ -163,11 +172,19 @@ jobs: - name: Smoke test run: python -c "import dpnp, dpctl, dpbench; dpctl.lsplatform()" - - name: Run benchmakrs + - name: Run benchmarks run: | dpbench -i numpy,numba_dpex_p,dpnp,numba_n,sycl run + + - name: Generate report + run: | dpbench report + # we want to make sure that configuration files are geting populated + - name: Run npbench benchmark + run: | + dpbench -i numpy -b azimint_hist run --npbench + upload_anaconda: name: Upload dppy/label/dev ['${{ matrix.os }}', python='${{ matrix.python }}'] @@ -182,7 +199,7 @@ jobs: defaults: run: - shell: bash -l {0} + shell: bash -el {0} continue-on-error: false diff --git a/dpbench/benchmarks/__init__.py b/dpbench/benchmarks/__init__.py deleted file mode 100644 index 5985a8ff..00000000 --- a/dpbench/benchmarks/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# SPDX-FileCopyrightText: 2022 - 2023 Intel Corporation -# -# SPDX-License-Identifier: Apache-2.0 diff --git a/dpbench/configs/__init__.py b/dpbench/configs/__init__.py deleted file mode 100644 index 5985a8ff..00000000 --- a/dpbench/configs/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# SPDX-FileCopyrightText: 2022 - 2023 Intel Corporation -# -# SPDX-License-Identifier: Apache-2.0 diff --git a/dpbench/configs/bench_info/__init__.py b/dpbench/configs/bench_info/__init__.py deleted file mode 100644 index 5985a8ff..00000000 --- a/dpbench/configs/bench_info/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# SPDX-FileCopyrightText: 2022 - 2023 Intel Corporation -# -# SPDX-License-Identifier: Apache-2.0 diff --git a/dpbench/configs/framework_info/__init__.py b/dpbench/configs/framework_info/__init__.py deleted file mode 100644 index 5985a8ff..00000000 --- a/dpbench/configs/framework_info/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# SPDX-FileCopyrightText: 2022 - 2023 Intel Corporation -# -# SPDX-License-Identifier: Apache-2.0 diff --git a/setup.py b/setup.py index 07231062..6c55a714 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ import os import versioneer -from setuptools import find_packages +from setuptools import find_namespace_packages, find_packages if not os.getenv("DPBENCH_SYCL"): from setuptools import setup @@ -28,15 +28,29 @@ # https://github.com/pypa/packaging-problems/issues/606 url="https://github.com/IntelPython/dpbench", packages=( - find_packages(include=["*"]) - + find_packages(where="./dpbench/benchmarks/*/*") + find_packages(include=["dpbench*"], exclude=["dpbench.benchmarks*"]) + + find_namespace_packages(include=["dpbench.benchmarks*"]) + + find_namespace_packages(include=["dpbench.configs*"]) ), version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), include_package_data=True, package_data={ "dpbench.migrations": ["alembic.ini"], - "dpbench.configs": ["*/*.toml", "*.toml"], + "dpbench.configs": [ + "*.toml", + "bench_info/*.toml", + "bench_info/polybench/*.toml", + "bench_info/polybench/stencils/*.toml", + "bench_info/polybench/datamining/*.toml", + "bench_info/polybench/linear-algebra/*.toml", + "bench_info/polybench/linear-algebra/kernels/*.toml", + "bench_info/polybench/linear-algebra/solvers/*.toml", + "bench_info/polybench/linear-algebra/blas/*.toml", + "bench_info/polybench/medley/*.toml", + "bench_info/npbench/*.toml", + "framework_info/*.toml", + ], }, cmake_args=cmake_args, )