@@ -110,71 +110,56 @@ def setup(self) -> None:
110
110
111
111
def additional_metadata (self ) -> dict [str , BenchmarkMetadata ]:
112
112
metadata = {
113
- "SubmitKernel" : BenchmarkMetadata (
114
- type = "group" ,
115
- description = "Measures CPU time overhead of submitting kernels through different APIs." ,
116
- notes = "Each layer builds on top of the previous layer, adding functionality and overhead.\n "
117
- "The first layer is the Level Zero API, the second is the Unified Runtime API, and the third is the SYCL API.\n "
118
- "The UR v2 adapter noticeably reduces UR layer overhead, also improving SYCL performance.\n "
119
- "Work is ongoing to reduce the overhead of the SYCL API\n " ,
120
- tags = ["submit" , "micro" , "SYCL" , "UR" , "L0" ],
121
- range_min = 0.0 ,
122
- ),
123
113
"SinKernelGraph" : BenchmarkMetadata (
124
114
type = "group" ,
125
115
unstable = "This benchmark combines both eager and graph execution, and may not be representative of real use cases." ,
126
116
tags = ["submit" , "memory" , "proxy" , "SYCL" , "UR" , "L0" , "graph" ],
127
117
),
128
- "SubmitGraph" : BenchmarkMetadata (
129
- type = "group" , tags = ["submit" , "micro" , "SYCL" , "UR" , "L0" , "graph" ]
130
- ),
131
118
"FinalizeGraph" : BenchmarkMetadata (
132
119
type = "group" , tags = ["finalize" , "micro" , "SYCL" , "graph" ]
133
120
),
134
121
}
135
122
136
123
# Add metadata for all SubmitKernel group variants
137
- base_metadata = metadata ["SubmitKernel" ]
138
-
124
+ submit_kernel_metadata = BenchmarkMetadata (
125
+ type = "group" ,
126
+ notes = "Each layer builds on top of the previous layer, adding functionality and overhead.\n "
127
+ "The first layer is the Level Zero API, the second is the Unified Runtime API, and the third is the SYCL API.\n "
128
+ "The UR v2 adapter noticeably reduces UR layer overhead, also improving SYCL performance.\n "
129
+ "Work is ongoing to reduce the overhead of the SYCL API\n " ,
130
+ tags = ["submit" , "micro" , "SYCL" , "UR" , "L0" ],
131
+ range_min = 0.0 ,
132
+ )
139
133
for order in ["in order" , "out of order" ]:
140
134
for completion in ["" , " with completion" ]:
141
135
for events in ["" , " using events" ]:
142
136
group_name = f"SubmitKernel { order } { completion } { events } long kernel"
143
- metadata [group_name ] = BenchmarkMetadata (
144
- type = "group" ,
145
- description = f"Measures CPU time overhead of submitting { order } kernels with longer execution times through different APIs." ,
146
- notes = base_metadata .notes ,
147
- tags = base_metadata .tags ,
148
- range_min = base_metadata .range_min ,
137
+ metadata [group_name ] = copy .deepcopy (submit_kernel_metadata )
138
+ metadata [group_name ].description = (
139
+ f"Measures CPU time overhead of submitting { order } kernels with longer execution times through different APIs."
149
140
)
150
-
151
141
# CPU count variants
152
142
cpu_count_group = f"{ group_name } , CPU count"
153
- metadata [cpu_count_group ] = BenchmarkMetadata (
154
- type = "group" ,
155
- description = f"Measures CPU time overhead of submitting { order } kernels with longer execution times through different APIs." ,
156
- notes = base_metadata .notes ,
157
- tags = base_metadata .tags ,
158
- range_min = base_metadata .range_min ,
143
+ metadata [cpu_count_group ] = copy .deepcopy (submit_kernel_metadata )
144
+ metadata [cpu_count_group ].description = (
145
+ f"Measures CPU instructions count overhead of submitting { order } kernels with longer execution times through different APIs."
159
146
)
160
147
161
148
# Add metadata for all SubmitGraph group variants
162
- base_metadata = metadata ["SubmitGraph" ]
149
+ submit_graph_metadata = BenchmarkMetadata (
150
+ type = "group" , tags = ["submit" , "micro" , "SYCL" , "UR" , "L0" , "graph" ]
151
+ )
163
152
for order in ["in order" , "out of order" ]:
164
153
for completion in ["" , " with completion" ]:
165
154
for events in ["" , " using events" ]:
166
155
for num_kernels in self .submit_graph_num_kernels :
167
156
for host_tasks in ["" , " use host tasks" ]:
168
157
group_name = f"SubmitGraph { order } { completion } { events } { host_tasks } , { num_kernels } kernels"
169
- metadata [group_name ] = BenchmarkMetadata (
170
- type = "group" ,
171
- tags = base_metadata .tags ,
172
- )
158
+ metadata [group_name ] = copy .deepcopy (submit_graph_metadata )
173
159
# CPU count variants
174
160
cpu_count_group = f"{ group_name } , CPU count"
175
- metadata [cpu_count_group ] = BenchmarkMetadata (
176
- type = "group" ,
177
- tags = base_metadata .tags ,
161
+ metadata [cpu_count_group ] = copy .deepcopy (
162
+ submit_graph_metadata
178
163
)
179
164
return metadata
180
165
0 commit comments