diff --git a/.github/workflows/build_and_run.yml b/.github/workflows/build_and_run.yml index 37cd16f3..e0b2cec4 100644 --- a/.github/workflows/build_and_run.yml +++ b/.github/workflows/build_and_run.yml @@ -168,5 +168,8 @@ jobs: - name: Run benchmarks run: dpbench -i ${{env.WORKLOADS}} run -r2 --no-print-results || exit 1 + - name: Run rodinia benchmarks + run: dpbench -i ${{env.WORKLOADS}} run -r2 --no-print-results --rodinia --no-dpbench|| exit 1 + - name: Generate report run: dpbench -i ${{env.WORKLOADS}} report || exit 1 diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index b6c4ec33..1bd9c597 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -195,6 +195,10 @@ jobs: run: | dpbench -i numpy -b azimint_hist run --npbench + - name: Run rodinia benchmark + run: | + dpbench run --rodinia --no-dpbench -r 1 + upload_anaconda: name: Upload dppy/label/dev ['${{ matrix.os }}', python='${{ matrix.python }}'] diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ed1b00bd..fcb558d8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -50,7 +50,8 @@ repos: hooks: - id: pydocstyle # TODO: add packages one by one to enforce pydocstyle eventually - files: (^dpbench/config/|^scripts/|^dpbench/console/|^dpbench/infrastructure/benchmark_runner.py|^dpbench/infrastructure/benchmark_validation.py) + files: (^dpbench/config/|^scripts/|^dpbench/console/|^dpbench/infrastructure/benchmark_runner.py|^dpbench/infrastructure/benchmark_validation.py| + ^dpbench/benchmarks/rodinia) args: ["--convention=google"] # D417 does not work properly: # https://github.com/PyCQA/pydocstyle/issues/459 diff --git a/dpbench/benchmarks/CMakeLists.txt b/dpbench/benchmarks/CMakeLists.txt index 6869220b..c1693bc1 100644 --- a/dpbench/benchmarks/CMakeLists.txt +++ b/dpbench/benchmarks/CMakeLists.txt @@ -10,6 +10,7 @@ add_subdirectory(kmeans) add_subdirectory(knn) add_subdirectory(gpairs) add_subdirectory(dbscan) +add_subdirectory(rodinia) # generate dpcpp version into config set(FILE ${CMAKE_SOURCE_DIR}/dpbench/configs/framework_info/dpcpp.toml) diff --git a/dpbench/config/reader.py b/dpbench/config/reader.py index bc549653..e24d5c53 100644 --- a/dpbench/config/reader.py +++ b/dpbench/config/reader.py @@ -28,6 +28,7 @@ def read_configs( # noqa: C901: TODO: move modules into config no_dpbench: bool = False, with_npbench: bool = False, with_polybench: bool = False, + with_rodinia: bool = False, load_implementations: bool = True, ) -> Config: """Read all configuration files and populate those settings into Config. @@ -85,6 +86,18 @@ def read_configs( # noqa: C901: TODO: move modules into config ) ) + if with_rodinia: + modules.append( + Module( + benchmark_configs_path=os.path.join( + dirname, "../configs/bench_info/rodinia" + ), + benchmark_configs_recursive=True, + benchmarks_module="dpbench.benchmarks.rodinia", + path=os.path.join(dirname, "../benchmarks/rodinia"), + ) + ) + for mod in modules: if mod.benchmark_configs_path != "": read_benchmarks( diff --git a/dpbench/configs/bench_info/rodinia/CMakeLists.txt b/dpbench/configs/bench_info/rodinia/CMakeLists.txt new file mode 100644 index 00000000..5985a8ff --- /dev/null +++ b/dpbench/configs/bench_info/rodinia/CMakeLists.txt @@ -0,0 +1,3 @@ +# SPDX-FileCopyrightText: 2022 - 2023 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 diff --git a/dpbench/console/_namespace.py b/dpbench/console/_namespace.py index 2cefe737..f6c5f63a 100644 --- a/dpbench/console/_namespace.py +++ b/dpbench/console/_namespace.py @@ -19,6 +19,7 @@ class Namespace(argparse.Namespace): dpbench: bool npbench: bool polybench: bool + rodinia: bool print_results: bool validate: bool run_id: Union[int, None] diff --git a/dpbench/console/config.py b/dpbench/console/config.py index fe962f79..f7144367 100644 --- a/dpbench/console/config.py +++ b/dpbench/console/config.py @@ -43,6 +43,7 @@ def execute_config(args: Namespace): implementations=args.implementations, with_npbench=True, with_polybench=True, + with_rodinia=True, ) color_output = args.color diff --git a/dpbench/console/run.py b/dpbench/console/run.py index e22433dd..9e44c8b8 100644 --- a/dpbench/console/run.py +++ b/dpbench/console/run.py @@ -58,6 +58,12 @@ def add_run_arguments(parser: argparse.ArgumentParser): default=False, help="Set if run polybench benchmarks.", ) + parser.add_argument( + "--rodinia", + action=argparse.BooleanOptionalAction, + default=False, + help="Set if run rodinia benchmarks.", + ) parser.add_argument( "-r", "--repeat", @@ -135,6 +141,7 @@ def execute_run(args: Namespace, conn: sqlalchemy.Engine): no_dpbench=not args.dpbench, with_npbench=args.npbench, with_polybench=args.polybench, + with_rodinia=args.rodinia, ) if args.all_implementations: diff --git a/setup.py b/setup.py index 6c55a714..a80df966 100644 --- a/setup.py +++ b/setup.py @@ -49,7 +49,7 @@ "bench_info/polybench/linear-algebra/blas/*.toml", "bench_info/polybench/medley/*.toml", "bench_info/npbench/*.toml", - "framework_info/*.toml", + "bench_info/rodinia/*.toml" "framework_info/*.toml", ], }, cmake_args=cmake_args,