Skip to content

Commit faae61a

Browse files
committed
Update xrt::runner recipe schema with additional buffer types
Signed-off-by: Soren Soe <[email protected]>
1 parent 6771f4d commit faae61a

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

src/runtime_src/core/common/runner/recipe.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,29 @@ created input and output tensors, or they can be internal buffers used
153153
during execution of the compiled graph at the discretion of the
154154
compiler (VAIML).
155155

156+
#### Buffer types
157+
158+
The `type` of a buffer is one of
159+
160+
- input
161+
- output
162+
- internal
163+
- weight
164+
- spill
165+
- unknown
166+
167+
For all pratical purposes the `type` is ignored by the xrt::runner
168+
when it creates the recipe. The only enforcement is that internal
169+
buffers must specify a size so that the recipe can create an xrt::bo
170+
object for the internal buffer. All other buffers are treated as
171+
external and must be bound to the recipe by the framework. Note that
172+
binding can be implicit by using a [profile](profile.md) to explicit
173+
through the xrt::runner interface.
174+
156175
#### External buffers (graph input and output)
157176

158177
External buffers (input and output) are created by the framework /
159-
application outside of the runner and bound to the recipe during
178+
application outside of the recipe and bound to the recipe during
160179
execution. If the recipe buffer element doesn't specify a buffer size,
161180
then the runner does not create `xrt::bo` objects for
162181
external buffers, but instead relies on the framework

src/runtime_src/core/common/runner/schema/recipe.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"name": { "$ref": "#/$defs/key" },
7171
"type": {
7272
"type": "string",
73-
"enum": ["input", "output", "internal"]
73+
"enum": ["input", "output", "internal", "weight", "spill", "unknown"]
7474
},
7575
"size": { "$ref": "#/$defs/size" }
7676
},

0 commit comments

Comments
 (0)