Skip to content

Commit a321e98

Browse files
[Bench] Use one workdir version in all bench scripts (#20624)
1 parent 993100b commit a321e98

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-8
lines changed

devops/scripts/benchmarks/main.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,9 @@
2828
from utils.validate import Validate
2929
from utils.detect_versions import DetectVersion
3030
from utils.logger import log, initialize_logger
31+
from utils.workdir_version import INTERNAL_WORKDIR_VERSION
3132
from presets import enabled_suites, presets
3233

33-
# Update this if you are changing the layout of the results files
34-
INTERNAL_WORKDIR_VERSION = "2.0"
35-
3634

3735
def run_iterations(
3836
benchmark: Benchmark,

devops/scripts/benchmarks/tests/test_integration.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,20 @@
22
# Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM Exceptions.
33
# See LICENSE.TXT
44
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
5-
import logging
5+
6+
import json
67
import os
78
import shutil
8-
import unittest
9-
import tempfile
109
import subprocess
11-
import json
10+
import sys
11+
import tempfile
12+
import unittest
1213
from collections import namedtuple
1314

15+
sys.path.append(f"{os.path.dirname(__file__)}/../")
16+
from utils.workdir_version import INTERNAL_WORKDIR_VERSION
17+
18+
1419
DataJson = namedtuple("DataJson", ["runs", "metadata", "tags", "names"])
1520
DataJsonRun = namedtuple("DataJsonRun", ["name", "results"])
1621
DataJsonResult = namedtuple(
@@ -49,7 +54,7 @@ def prepare_dirs(self):
4954
with open(
5055
os.path.join(self.WORKDIR_DIR, "BENCH_WORKDIR_VERSION"), "w"
5156
) as f:
52-
f.write("2.0") # TODO: take from main.INTERNAL_WORKDIR_VERSION
57+
f.write(INTERNAL_WORKDIR_VERSION)
5358

5459
def remove_dirs(self):
5560
for d in [self.RESULTS_DIR, self.OUTPUT_DIR, self.WORKDIR_DIR]:
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Copyright (C) 2025 Intel Corporation
2+
# Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM Exceptions.
3+
# See LICENSE.TXT
4+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
5+
6+
# Update this if you are changing the layout of the results files
7+
INTERNAL_WORKDIR_VERSION = "2.0"

0 commit comments

Comments
 (0)