diff --git a/devops/actions/run-tests/benchmark/action.yml b/devops/actions/run-tests/benchmark/action.yml index f90eb62f6d4e9..3dfc038a0497e 100644 --- a/devops/actions/run-tests/benchmark/action.yml +++ b/devops/actions/run-tests/benchmark/action.yml @@ -142,27 +142,6 @@ runs: cmake --build build -j "$(nproc)" cmake --install build - cd - - # Install level zero v1.25.2 - # This is to have the latest level zero required by Compute Benchmarks - # Remove this w/a once the sycl nightly images are updated to have level zero v1.25.2 - - name: Install level zero v1.25.2 - shell: bash - run: | - # Install level zero v1.25.2 - # Checkout Level Zero at build ref: - wget https://github.com/oneapi-src/level-zero/archive/refs/tags/v1.25.2.tar.gz -O level-zero-v1.25.2.tar.gz - tar -xvf level-zero-v1.25.2.tar.gz - cd level-zero-1.25.2 - - # Configure Level Zero - cmake -DCMAKE_BUILD_TYPE=Release \ - -Bbuild - - # Build and install Level Zero - cmake --build build -j "$(nproc)" - sudo cmake --install build - cd - - name: Checkout results repo uses: actions/checkout@v5 @@ -228,6 +207,13 @@ runs: WORKDIR="$(realpath ./llvm_test_workdir)" if [ -n "$WORKDIR" ] && [ -d "$WORKDIR" ] && [[ "$WORKDIR" == *llvm_test_workdir* ]]; then rm -rf "$WORKDIR" ; fi + # This step is needed for cherry-picking a fix in compute-benchmarks, + # remove once the Level Zero v1.25.0 is used in docker images. + pushd ./devops + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + popd + taskset -c "$CORES" ./devops/scripts/benchmarks/main.py "$WORKDIR" \ --sycl "$(realpath ./toolchain)" \ --ur "$(realpath ./ur/install)" \ diff --git a/devops/scripts/benchmarks/benches/compute.py b/devops/scripts/benchmarks/benches/compute.py index 96dfc61e56dd6..d73f3d074e369 100644 --- a/devops/scripts/benchmarks/benches/compute.py +++ b/devops/scripts/benchmarks/benches/compute.py @@ -62,8 +62,8 @@ def git_url(self) -> str: return "https://github.com/intel/compute-benchmarks.git" def git_hash(self) -> str: - # Oct 31, 2025 - return "1d4f68f82a5fe8c404aa1126615da4a1b789e254" + # Oct 28, 2025 + return "2cfc831cdc536f1bfd14ce4aafbe59450d5ba090" def setup(self) -> None: if options.sycl is None: @@ -77,6 +77,13 @@ def setup(self) -> None: "compute-benchmarks", use_installdir=False, ) + # Cherry-pick a fix for build with latest unified-runtime + # This is to omit changes that force usage of L0 v1.25.0 + # which are not supported by the latest Compute Runtime yet. + try: + self.project.cherry_pick("8a90f69aa4fdbb73ab5a1d0c0d5a412a03d6c2b5") + except Exception as e: + log.warning(f"Cherry-pick failed, continuing with build: {e}") if not self.project.needs_rebuild(): log.info(f"Rebuilding {self.project.name} skipped") diff --git a/devops/scripts/benchmarks/git_project.py b/devops/scripts/benchmarks/git_project.py index 7d2ffd6706b44..338d2732b3ecd 100644 --- a/devops/scripts/benchmarks/git_project.py +++ b/devops/scripts/benchmarks/git_project.py @@ -107,6 +107,16 @@ def install(self) -> None: """Installs the project.""" run(f"cmake --install {self.build_dir}") + def cherry_pick(self, commit_hash: str) -> None: + """Cherry-pick a specific commit.""" + try: + log.debug(f"Cherry-picking commit {commit_hash} in {self.src_dir}") + run(f"git cherry-pick {commit_hash}", cwd=self.src_dir) + log.debug(f"Successfully cherry-picked commit {commit_hash}") + except Exception as e: + log.error(f"Failed to cherry-pick commit {commit_hash}: {e}") + raise + def _can_shallow_clone_ref(self, ref: str) -> bool: """Check if we can do a shallow clone with this ref using git ls-remote.""" try: diff --git a/devops/scripts/benchmarks/main.py b/devops/scripts/benchmarks/main.py index de372d7279cc2..be6fbf8e87270 100755 --- a/devops/scripts/benchmarks/main.py +++ b/devops/scripts/benchmarks/main.py @@ -57,6 +57,16 @@ def run_iterations( break for bench_result in bench_results: + if bench_result.value == 0.0: + if options.exit_on_failure: + raise RuntimeError("Benchmark result is zero!") + else: + failure_label = f"{benchmark.name()} iteration {iter}" + failures[failure_label] = "benchmark result is zero!" + log.error( + f"complete ({failure_label}: benchmark result is zero!)." + ) + continue log.info( f"{benchmark.name()} complete ({bench_result.label}: {bench_result.value:.3f} {bench_result.unit})." )