diff --git a/.github/workflows/benchmarks_compute.yml b/.github/workflows/benchmarks_compute.yml index 126872cedd..a398e6b56b 100644 --- a/.github/workflows/benchmarks_compute.yml +++ b/.github/workflows/benchmarks_compute.yml @@ -151,9 +151,17 @@ jobs: - name: Build SYCL run: cmake --build ${{github.workspace}}/sycl_build -j - - name: Set oneAPI Device Selector - run: | - echo "ONEAPI_DEVICE_SELECTOR=${{ matrix.adapter.str_name }}:${{ matrix.adapter.unit }}" >> $GITHUB_ENV + - name: Configure UR + working-directory: ${{github.workspace}}/ur-repo + run: > + cmake -DCMAKE_BUILD_TYPE=Release + -B${{github.workspace}}/ur-repo/build + -DUR_BUILD_TESTS=OFF + -DUR_BUILD_ADAPTER_L0=ON + -DUR_BUILD_ADAPTER_L0_V2=ON + + - name: Build UR + run: cmake --build ${{github.workspace}}/ur-repo/build -j $(nproc) - name: Run benchmarks id: benchmarks diff --git a/scripts/benchmarks/benches/compute.py b/scripts/benchmarks/benches/compute.py index 672875f2dd..4ff312a553 100644 --- a/scripts/benchmarks/benches/compute.py +++ b/scripts/benchmarks/benches/compute.py @@ -60,7 +60,7 @@ def bin_args(self) -> list[str]: return [] def extra_env_vars(self) -> dict: - return {} + return {"UR_ADAPTERS_FORCE_LOAD" : os.path.join(self.bench.libs, f"libur_adapter_{options.ur_adapter_name}.so")} def unit(self): return "μs" @@ -130,9 +130,6 @@ def name(self): order = "in order" if self.ioq else "out of order" return f"api_overhead_benchmark_ur SubmitKernel {order}" - def extra_env_vars(self) -> dict: - return {"UR_ADAPTERS_FORCE_LOAD" : os.path.join(self.bench.libs, f"libur_adapter_{options.ur_adapter_name}.so")} - def bin_args(self) -> list[str]: return [ f"--Ioq={self.ioq}", diff --git a/scripts/benchmarks/benches/velocity.py b/scripts/benchmarks/benches/velocity.py index e5601c6563..198cacd1a5 100644 --- a/scripts/benchmarks/benches/velocity.py +++ b/scripts/benchmarks/benches/velocity.py @@ -9,6 +9,7 @@ from utils.utils import run, create_build_path import os import re +from .options import options class VelocityBench: def __init__(self, directory): @@ -22,6 +23,7 @@ def __init__(self, name: str, bin_name: str, vb: VelocityBench): self.bench_name = name self.bin_name = bin_name self.code_path = os.path.join(self.vb.repo_path, self.bench_name, 'SYCL') + self.adapter_path = os.path.join(options.ur_dir, 'build', 'lib', f"libur_adapter_{options.ur_adapter_name}.so") def download_deps(self): return @@ -46,7 +48,7 @@ def bin_args(self) -> list[str]: return [] def extra_env_vars(self) -> dict: - return {} + return {"UR_ADAPTERS_FORCE_LOAD" : self.adapter_path} def parse_output(self, stdout: str) -> float: raise NotImplementedError()