Age | Commit message (Collapse) | Author |
|
- The previous ref_model was allocating the memory for all tensors in
the graph upfront which is unnecessary and wasteful.
- This patch changes to only allocate initial input tensors on the entry
point using the allocateInputTensor() function.
- The output tensors are ensured to have been allocated before executing
a node. The output tenosrs are the inputs for the next node.
- When a node's evaluation is finished, its input tensors will be freed
if they will no longer be used by anyone else.
Signed-off-by: Jerry Ge <jerry.ge@arm.com>
Change-Id: Ibb3e8c9e6344f6cd9eb20532a03b2097b93247f9
|
|
- Also added run clang-format to pre-commit runs
Signed-off-by: Jerry Ge <jerry.ge@arm.com>
Change-Id: I4e59ac0afbaa30dce0773aa63d92a1a3b119e2f3
|
|
This adds a second run of reference model under precise_mode
when test_desc.json contains a "compliance" dictionary which
contains a "mode" entry with value "dot product".
In this second run, abs_mode will be set to true, which causes:
1. evaluation will take absolute values of inputs for these operators:
conv2d, conv3d, depthwise_conv2d, fully_connected,
matmul, transpose_conv2d, fft2d, rfft2d
reduce_sum, avg_pool2d
2. output files will have prefix "bounds_" prepended to them
Signed-off-by: Tai Ly <tai.ly@arm.com>
Change-Id: I7070ecc7ead2d2ea3375c44663d653c6772b88e0
|
|
Signed-off-by: Jerry Ge <jerry.ge@arm.com>
Change-Id: I5689d7c6b902a319a68fa4628b59e0bcc23aeca4
|
|
Signed-off-by: Tai Ly <tai.ly@arm.com>
Change-Id: Icefa594b25739ebaa331af2352bdcae1aaf81cf5
|
|
This allows IF/WHILE serialization to use regions
instead of blocks to serialize nested regions.
For backward compatibility, both region and block
serialization are supported for IF/WHILE ops.
Signed-off-by: Tai Ly <tai.ly@arm.com>
Change-Id: Icf935561f9f5db38767ff76410bcd36896119395
|
|
Rationale for making this change:
- In the original design, for control flow operators like WhileOp,
child blocks couldn't read the tensor variables (global consts) in the root level block,
this patch added the machanism for child blocks to access their parent
level block's tensors.
- This change also relies on another serialization change on adding
another layer of abtraction called Region:
- Serialization patch: [region] Add TosaSerializationRegion to serialization_lib
- Updated the corresponding python version of the serialization code: TosaSerializerRegion to python version of serialization_lib
- This change also relies on the TOSA MLIR Translator change: Add RegionBuilder to TOSA MLIR Translator
- Added the WhileOp related test cases: While, LSTM, GRU, RNN
- Other related fixes
Signed-off-by: Jerry Ge <jerry.ge@arm.com>
Change-Id: I13ae33628ad07e41d248e88652ce1328654694ab
|
|
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com>
Change-Id: Ib4c4fe433485282713d396b92d8acec812a17188
|
|
* Upgrade Eigen to 3.4.0 (for bfloat16 support) and add work-
arounds for reduce.any() and reduce.all() bugs (introduced
between 3.3.7 and 3.4.0)
* Truncation to bfloat16 now performed in eval() methods
Signed-off-by: James Ward <james.ward@arm.com>
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com>
Change-Id: If5f5c988d76d3d30790acf3b97081726b89205fe
|
|
* Added IModelRunner interface using pimpl idiom, which allows a user to
initialize, configure and run the model.
* Added unit tests for IModelRunner.
* Added doctest as third-party submodule.
* Added user options to specify paths for dependencies.
* Moved general func_config functions to separate utility, which removes
cxxopts dependency.
Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com>
Change-Id: If42f1f82cd6dadf18911a48dcd5fa579b719aff2
|
|
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: I862b4d0fa66328535d555d3d4624a5f3dd856cc0
|
|
In preparation for next release. Also include new version of the
serialization library
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: I577406339d527dd29f14196d6ff1bcd0ac3ffd78
Change-Id: Ia140cd16b21133c674f8ef1cf31e665982478c81
|
|
Change-Id: Ia681aa0eb1d42fa31a4658badb376f7b32b2e338
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
|
|
Include new submodule for serialization library.
Change-Id: I38cdea3ed8ea3968d1dc06c689dab248d21b14fd
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
|
|
Preparation for v0.30 release
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: I65f6ee429a840d562c104c48335f8dcb51f79667
|
|
Any needed information moves into the attributes for each operator.
New serialization library version removes teh quantization information
attributes from the schema
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: Icf6165687ab1fd34a01f64c01b0b92b2820e72fa
|
|
Rename outpad to out_pad, and also fix the dilation in the generator.
Change-Id: I4c1599871f0d0b41856e819d8c644a85ca6d8267
Signed-off-by: TatWai Chong <tatwai.chong@arm.com>
|
|
- Error check on missing test description file instead of throwing
json exception
- Removed outdated help option
Signed-off-by: Jared Smolens <jared.smolens@arm.com>
Change-Id: Ia8780a88f4306af19ce63eaa679c84669f5c2ad9
|
|
Change-Id: I1de45a21779ec014a0fda2c971dbc8f91df45bdb
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
|
|
Update to the corresponding serialization library
Change-Id: I323bf306d409b51bbf53447927953edd0fd79983
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
|
|
- update serialization_lib hash
- check model version against serializer version
- add "-v" to command line option to print out model version
Signed-off-by: Kevin Cheng <kevin.cheng@arm.com>
Change-Id: I554cf0fdead22e7e5f91d2e98831459286c40a2d
|
|
- Also delay tensor allocation after operator being validated
ERROR_IF can be caught first before 0 or negative dimension set the graph_status to UNPREDICTABLE
- Rescale, Argmax, FullyConnected, Matmul, Pad, Reshape, Slice, Transpose, Clamp, Concat, Equal, Greater, GreaterEqual, Table
Signed-off-by: Kevin Cheng <kevin.cheng@arm.com>
Change-Id: I4e1b3e5794fe195ce1a37e28443ae584645a3b91
|
|
- Also replace SIMPLE_FATAL_ERROR() with FATAL_ERROR() since they're duplicate
- Replace FATAL_ERROR()/ASSERT_MSG() with ERROR_IF_SUBGRAPH() if the condition is a graph error
FATAL_ERROR()/ASSERT() should only be used by model internal/runtime error like file reading.
Signed-off-by: Kevin Cheng <kevin.cheng@arm.com>
Change-Id: If1e1e2488054a0ecd800fb0f2ea6487019282500
|
|
instead of bailing out.
Signed-off-by: Kevin Cheng <kevin.cheng@arm.com>
Change-Id: I61e163cfdb54057f65dc967394decc3fad53eb89
|
|
or ERROR_IF()
- Adding return code enum class: {VALID, UNPREDICTABLE, ERROR}
- Runtime errors (e.g. memory allocation failure) will abort immediately, or will return one of the three return codes
Part of the codes are re-written to pass REQUIRE() to the top-level (e.g. apply_scale_32/16())
- Update setExpectedFailure() to setExpectedReturnCode() on test generation script
- Update test regression script to interface with reference model change
Signed-off-by: Kevin Cheng <kevin.cheng@arm.com>
Change-Id: Ia063c936bcb2a54d6e379a5bb6801aa72d1186f1
|
|
- If not specified, will be initialized with dirname(test_desc)
- Like -Cflatbuffer_dir, reference model isn't responsible for creating directory.
User need to make sure target directory path exists.
Signed-off-by: Kevin Cheng <kevin.cheng@arm.com>
Change-Id: I9cfcc801cff648e53306f8de8ea8d5eaaf87ea80
|
|
Change-Id: Iac786eff96183938d2fd11cde9313c6e8e1270a5
|
|
- Remove Usage and Format
- Run black on verif/*.py scripts
Signed-off-by: Kevin Cheng <kevin.cheng@arm.com>
Change-Id: Ie81515891eb0039540f614894f4b6b0e0e78ba74
|
|
Change-Id: I2f8e7fa63e2ae40203e57d2cc8814bde3b312cb6
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
|