Skip to content

Commit 231e7bb

Browse files
authored
Merge branch 'main' into yc-0829-move-tracing-before-sanitizer
2 parents 0ddd510 + bddc8f3 commit 231e7bb

File tree

24 files changed

+168
-140
lines changed

24 files changed

+168
-140
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
55

66
cmake_minimum_required(VERSION 3.20.0 FATAL_ERROR)
7-
project(unified-runtime VERSION 0.10.0)
7+
project(unified-runtime VERSION 0.11.0)
88

99
# Check if unified runtime is built as a standalone project.
1010
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR UR_STANDALONE_BUILD)

include/ur_api.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
88
*
99
* @file ur_api.h
10-
* @version v0.10-r0
10+
* @version v0.11-r0
1111
*
1212
*/
1313
#ifndef UR_API_H_INCLUDED
@@ -1133,7 +1133,8 @@ typedef enum ur_api_version_t {
11331133
UR_API_VERSION_0_8 = UR_MAKE_VERSION(0, 8), ///< version 0.8
11341134
UR_API_VERSION_0_9 = UR_MAKE_VERSION(0, 9), ///< version 0.9
11351135
UR_API_VERSION_0_10 = UR_MAKE_VERSION(0, 10), ///< version 0.10
1136-
UR_API_VERSION_CURRENT = UR_MAKE_VERSION(0, 10), ///< latest known version
1136+
UR_API_VERSION_0_11 = UR_MAKE_VERSION(0, 11), ///< version 0.11
1137+
UR_API_VERSION_CURRENT = UR_MAKE_VERSION(0, 11), ///< latest known version
11371138
/// @cond
11381139
UR_API_VERSION_FORCE_UINT32 = 0x7fffffff
11391140
/// @endcond

include/ur_ddi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
88
*
99
* @file ur_ddi.h
10-
* @version v0.10-r0
10+
* @version v0.11-r0
1111
*
1212
*/
1313
#ifndef UR_DDI_H_INCLUDED

include/ur_print.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
88
*
99
* @file ur_print.hpp
10-
* @version v0.10-r0
10+
* @version v0.11-r0
1111
*
1212
*/
1313
#ifndef UR_PRINT_HPP

scripts/Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "Intel One API Unified Runtime API"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = v0.10
41+
PROJECT_NUMBER = v0.11
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

scripts/benchmarks/benches/compute.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def run(self, env_vars) -> Result:
8282

8383
result = self.run_bench(command, env_vars)
8484
(label, mean) = self.parse_output(result)
85-
return Result(label=label, value=mean, command=command, env=env_vars, stdout=result)
85+
return Result(label=label, value=mean, command=command, env=env_vars, stdout=result, lower_is_better=self.lower_is_better())
8686

8787
def parse_output(self, output):
8888
csv_file = io.StringIO(output)

scripts/benchmarks/benches/velocity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def run(self, env_vars) -> Result:
6161

6262
result = self.run_bench(command, env_vars)
6363

64-
return Result(label=self.bench_name, value=self.parse_output(result), command=command, env=env_vars, stdout=result)
64+
return Result(label=self.bench_name, value=self.parse_output(result), command=command, env=env_vars, stdout=result, lower_is_better=self.lower_is_better())
6565

6666
def teardown(self):
6767
return

scripts/benchmarks/main.py

Lines changed: 38 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -52,34 +52,46 @@ def main(directory, additional_env_vars, save_name, compare_names, filter):
5252
benchmarks = [benchmark for benchmark in benchmarks if filter.search(benchmark.name())]
5353

5454
for benchmark in benchmarks:
55-
print(f"setting up {benchmark.name()}... ", end='', flush=True)
56-
benchmark.setup()
57-
print("complete.")
55+
try:
56+
print(f"setting up {benchmark.name()}... ", end='', flush=True)
57+
benchmark.setup()
58+
print("complete.")
59+
except Exception as e:
60+
if options.exit_on_failure:
61+
raise e
62+
else:
63+
print(f"failed: {e}")
5864

5965
results = []
6066
for benchmark in benchmarks:
61-
merged_env_vars = {**additional_env_vars}
62-
iteration_results = []
63-
for iter in range(options.iterations):
64-
print(f"running {benchmark.name()}, iteration {iter}... ", end='', flush=True)
65-
bench_results = benchmark.run(merged_env_vars)
66-
if bench_results is not None:
67-
print(f"complete ({bench_results.value} {benchmark.unit()}).")
68-
iteration_results.append(bench_results)
67+
try:
68+
merged_env_vars = {**additional_env_vars}
69+
iteration_results = []
70+
for iter in range(options.iterations):
71+
print(f"running {benchmark.name()}, iteration {iter}... ", end='', flush=True)
72+
bench_results = benchmark.run(merged_env_vars)
73+
if bench_results is not None:
74+
print(f"complete ({bench_results.value} {benchmark.unit()}).")
75+
iteration_results.append(bench_results)
76+
else:
77+
print(f"did not finish.")
78+
79+
if len(iteration_results) == 0:
80+
continue
81+
82+
iteration_results.sort(key=lambda res: res.value)
83+
median_index = len(iteration_results) // 2
84+
median_result = iteration_results[median_index]
85+
86+
median_result.unit = benchmark.unit()
87+
median_result.name = benchmark.name()
88+
89+
results.append(median_result)
90+
except Exception as e:
91+
if options.exit_on_failure:
92+
raise e
6993
else:
70-
print(f"did not finish.")
71-
72-
if len(iteration_results) == 0:
73-
continue
74-
75-
iteration_results.sort(key=lambda res: res.value)
76-
median_index = len(iteration_results) // 2
77-
median_result = iteration_results[median_index]
78-
79-
median_result.unit = benchmark.unit()
80-
median_result.name = benchmark.name()
81-
82-
results.append(median_result)
94+
print(f"failed: {e}")
8395

8496
for benchmark in benchmarks:
8597
print(f"tearing down {benchmark.name()}... ", end='', flush=True)
@@ -126,6 +138,7 @@ def validate_and_parse_env_args(env_args):
126138
parser.add_argument("--timeout", type=int, help='Timeout for individual benchmarks in seconds.', default=600)
127139
parser.add_argument("--filter", type=str, help='Regex pattern to filter benchmarks by name.', default=None)
128140
parser.add_argument("--verbose", help='Print output of all the commands.', action="store_true")
141+
parser.add_argument("--exit_on_failure", help='Exit on first failure.', action="store_true")
129142

130143
args = parser.parse_args()
131144
additional_env_vars = validate_and_parse_env_args(args.env)
@@ -137,6 +150,7 @@ def validate_and_parse_env_args(env_args):
137150
options.timeout = args.timeout
138151
options.ur_dir = args.ur_dir
139152
options.ur_adapter_name = args.ur_adapter_name
153+
options.exit_on_failure = args.exit_on_failure
140154

141155
benchmark_filter = re.compile(args.filter) if args.filter else None
142156

scripts/benchmarks/output.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def generate_summary_table(chart_data: dict[str, list[Result]]):
116116
if key in results:
117117
value = results[key].value
118118
if key == best_key:
119-
row += f" `**{value}**` |" # Highlight the best value
119+
row += f" <ins>{value}</ins> |" # Highlight the best value
120120
else:
121121
row += f" {value} |"
122122
else:
@@ -132,6 +132,7 @@ def generate_markdown(chart_data: dict[str, list[Result]]):
132132

133133
return f"""
134134
# Summary
135+
<ins>result</ins> is better\n
135136
{summary_table}
136137
# Charts
137138
{mermaid_script}

scripts/core/CONTRIB.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ Adapter Change Process
127127
.. _intel/llvm:
128128
https://github.com/intel/llvm
129129
.. _UNIFIED_RUNTIME_REPO:
130-
https://github.com/intel/llvm/blob/sycl/sycl/plugins/unified_runtime/CMakeLists.txt#L102
130+
https://github.com/intel/llvm/blob/sycl/sycl/cmake/modules/FetchUnifiedRuntime.cmake#L119
131131
.. _UNIFIED_RUNTIME_TAG:
132-
https://github.com/intel/llvm/blob/sycl/sycl/plugins/unified_runtime/CMakeLists.txt#L109
132+
https://github.com/intel/llvm/blob/sycl/sycl/cmake/modules/FetchUnifiedRuntime.cmake#L126
133133

134134
Build Environment
135135
=================

0 commit comments

Comments
 (0)