@@ -13,7 +13,7 @@ resources.
13
13
14
14
An execution profile is useful for testing of a run recipe. It allows
15
15
for one external application controlling execution of a run recipe by
16
- defininng :
16
+ defining :
17
17
18
18
- how data is bound to resources
19
19
- how validation is performed
@@ -35,6 +35,8 @@ how many times along with what should be done in each iteration.
35
35
36
36
## QoS
37
37
38
+ This section is optional.
39
+
38
40
Simple key/value pairs designating configuration parameters for
39
41
hardware context creation.
40
42
```
@@ -44,11 +46,14 @@ hardware context creation.
44
46
},
45
47
```
46
48
The json schema doesn't enforce key names or value ranges, XRT will
47
- warn but ignore unrecoqnized keys. Improper values are implementation
49
+ warn but ignore unrecognized keys. Improper values are implementation
48
50
defined.
49
51
50
52
## Bindings
51
53
54
+ This section is optional if all buffer resources specified in the
55
+ recipe are specified with ` size ` (see [ recipe] ( recipe.md#buffer ) ).
56
+
52
57
The bindings section specifies how external buffers should be created,
53
58
initialized, and validated. The section is an array of binding elements,
54
59
where each binding element must reference a resource in the run-recipe.
@@ -68,7 +73,7 @@ file, but is otherwise required.
68
73
{ ... }
69
74
],
70
75
```
71
- A binding elememnt has some simple attributes and more complex
76
+ A binding element has some simple attributes and more complex
72
77
nested attributes
73
78
74
79
### Simple attributes of a binding element
@@ -111,7 +116,7 @@ should be initialized. There are multiple ways to initialize a buffer.
111
116
### Initialization of a resource buffer
112
117
113
118
A bindings element results in the creation of the ` xrt::bo ` buffer
114
- object. Upon creation, the buffer object is initialzied per the init
119
+ object. Upon creation, the buffer object is initialized per the init
115
120
sub-element. There are several ways to initialize a buffer only one
116
121
of which can be specified.
117
122
@@ -137,10 +142,10 @@ have been specified.
137
142
}
138
143
```
139
144
File initialization implies that the resource buffer should be
140
- intialized with content from ` file ` . The ` file ` must reference
145
+ initialized with content from ` file ` . The ` file ` must reference
141
146
a key that locates a file on disk or in an artifacts repository used
142
147
during construction of the ` xrt::runner ` . If the binding element
143
- specifies a ` size ` value, then this size takes precendence over the
148
+ specifies a ` size ` value, then this size takes precedence over the
144
149
size of the file, otherwise the size of the file will be the size of
145
150
the buffer. The optional ` skip ` element
146
151
allows skipping first bytes of the file during initialization of the
@@ -157,7 +162,7 @@ of the file are used.
157
162
158
163
If a bindings element specifies ` reinit ` , then the buffer is
159
164
reinitialized with bytes from the file in each iteration of the
160
- recipe. The initalization in an iteration picks up from an offset
165
+ recipe. The initialization in an iteration picks up from an offset
161
166
into the file at the point where the previous iteration stopped
162
167
copying. Again, the file wraps around when end-of-file is reached
163
168
without filling all the bytes of the buffer.
@@ -166,9 +171,9 @@ without filling all the bytes of the buffer.
166
171
167
172
```
168
173
"init": {
169
- "stride": 1, // stide bytes
174
+ "stride": 1, // stride bytes
170
175
"value": 239, // value to write at each stride
171
- "begin": 0, // begining of range to write at
176
+ "begin": 0, // beginning of range to write at
172
177
"end": 524288 // end of range
173
178
}
174
179
```
@@ -179,7 +184,7 @@ is referred to as strided buffer initialization.
179
184
In the above example, the buffer range specified by ` begin ` and ` end `
180
185
is written with the byte value ` 239 ` at every byte (` stride ` is
181
186
1). The value can be any uint64_t value, but must be a decimal value
182
- in order to be valid json. To initalize a buffer with with
187
+ in order to be valid json. To initialize a buffer with with
183
188
0xdeadbeef, convert to decimal and write:
184
189
185
190
```
@@ -191,8 +196,8 @@ in order to be valid json. To initalize a buffer with with
191
196
192
197
#### Validation
193
198
194
- After executon , a buffer can be validated against golden data. This is
195
- specifed using a ` validate ` element for the binding.
199
+ After execution , a buffer can be validated against golden data. This is
200
+ specified using a ` validate ` element for the binding.
196
201
197
202
```
198
203
{
@@ -218,13 +223,23 @@ specifics as needed.
218
223
219
224
## Execution
220
225
226
+ This section is optional. If not present, the recipe will execute
227
+ one iteration.
228
+
221
229
The execution section of a profile specifies how many times the recipe
222
230
should be executed and how. It controls what should happen after each
223
- iteration and before next iteration.
231
+ iteration and before next iteration. if ` iterations ` is not specified,
232
+ then the recipe will execute one iteration.
233
+
234
+ By default the profile execution will display to stdout elapsed,
235
+ throughput, and latency computed from running the recipe specified
236
+ number of iterations.
237
+ This can be disabled by setting ` verbose: false ` .
224
238
225
239
```
226
240
"execution" : {
227
241
"iterations": 500,
242
+ "verbose": false, // disable reporting of cpu time
228
243
"iteration" : {
229
244
"bind": false, // re-bind binding buffers
230
245
"init": true, // re-initialize binding buffers
@@ -235,15 +250,15 @@ iteration and before next iteration.
235
250
}
236
251
```
237
252
238
- The iteration element specifies what should happen before after each
239
- iteration of the run recipe.
253
+ The iteration element is optional, but if present specifies what
254
+ should happen before after each iteration of the run recipe.
240
255
241
256
- ` bind ` indicates if buffers should be re-bound to the
242
- recipe before an iteration. Only buffers whos binding element
257
+ recipe before an iteration. Only buffers whose binding element
243
258
specifies ` rebind ` are re-bound. All buffers are by default
244
259
bound to the recipe upon creation.
245
260
- ` init ` indicates if buffer should be re-initialized before an
246
- iteration. Only buffers whos binding element specifies has an ` init `
261
+ iteration. Only buffers whose binding element specifies has an ` init `
247
262
element and specifies ` reinit ` are re-initialized. All buffers are by
248
263
default initialized upon creation if their binding element has an
249
264
` init ` element.
@@ -256,18 +271,3 @@ iterations and after last iteration.
256
271
- ` validate ` means buffer validation per what is specified in
257
272
the binding element.
258
273
259
- # Instatiating an xrt::runner with a profile
260
-
261
- An execution profile is useless without a run recipe. But a run
262
- recipe can have several execution profiles, and less likely a
263
- profile could be used with multiple recipes.
264
-
265
- The profile (and the recipe) may reference file artifacts. These
266
- artifacts can be passed to the runner in two different ways. (1) the
267
- runner can be instantied with a path to a directory containing the
268
- referenced artifacts (files), or (2) it can be instantiated with an
269
- artifacts repository that have all the artifacts in memory pre-loaded.
270
-
271
- See [ runner.h] ( runner.h ) or details.
272
-
273
-
0 commit comments