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