Skip to content

Commit

Permalink
Fix the PA documentation on using shape in input data json files (tri…
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmayv25 authored Jul 1, 2021
1 parent dd10830 commit 64d7c6b
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions docs/perf_analyzer.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,12 +342,14 @@ length 4, 3 and 2 in this case.

You can also provide an optional "shape" field to the tensors. This is
especially useful while profiling the models with variable-sized
tensors as input. The specified shape values are treated as an
override and analyzer still expects default input shapes to be
provided as a command line option (see --shape) for variable-sized
inputs. In the absence of "shape" field, the provided defaults will be
used. Below is an example json file for a model with single input
"INPUT", shape [-1,-1] and data type INT32:
tensors as input. Additionally note that when providing the "shape" field,
tensor contents must be provided separately in "content" field in row-major
order. The specified shape values will override default input shapes
provided as a command line option (see --shape) for variable-sized inputs.
In the absence of "shape" field, the provided defaults will be used. There
is no need to specify shape as a command line option if all the data steps
provide shape values for variable tensors. Below is an example json file
for a model with single input "INPUT", shape [-1,-1] and data type INT32:

```
{
Expand Down Expand Up @@ -385,6 +387,19 @@ used. Below is an example json file for a model with single input
}
```

The following is the example to provide contents as base64 string with explicit shapes:

```
{
"data": [{
"INPUT": {
"content": {"b64": "/9j/4AAQSkZ(...)"},
"shape": [7964]
}},
(...)]
}
```

## Shared Memory

By default perf_analyzer sends input tensor data and receives output
Expand Down

0 comments on commit 64d7c6b

Please sign in to comment.