Age | Commit message (Collapse) | Author |
|
Signed-off-by: Finn Williams <Finn.Williams@arm.com>
Change-Id: Ifc5e6f2e36767cb2a5cbf281d40ec9989b581abc
|
|
* Deregister backends in BackendHintTest.
* Deregister backend in ThrowBackendUnavailableException
* Clean up dynamic backends when an exception is thrown from
RuntimeImpl::RuntimeImpl.
* Use CHECK_THROWS_AS_MESSAGE syntax in ClCustomAllocatorTests.
Signed-off-by: Colm Donelan <Colm.Donelan@arm.com>
Change-Id: I0e6e5413dd074b5fcfc9515c85cb8d40a4a0b73c
|
|
* Updates the runtime options with a CustomAllocatorMap which allows to define a CustomAllocator for specific backends
* Change IBackendInternal interface to use a shared pointer to a custom allocator
* Update ClBackend.hpp/cpp to use the CustomAllocator
* Adds an example application and unit test which uses a CustomAllocator for GpuAcc
* Refactor of the interface to use MemorySource instead of the user Mapping cl_mem directly
* Modify the BackendRegistry to also hold a registry of CustomAllocators
* BackendRegistry Deregister will also deregister any allocators associated with that backend id
* set_global_allocator within the BaseMemoryManager so that it always matches the currently used allocator
Signed-off-by: Jan Eilers <jan.eilers@arm.com>
Change-Id: I156d819686021865f4375e6cb7a5c5dec8fee9e8
Signed-off-by: David Monahan <david.monahan@arm.com>
|
|
* Constant weights and biases are now stored as Constant layers.
* Updated Serializer, Deserializer and unit tests to reflect this.
* Updated TfLiteDelegate, TfLiteParser and OnnxParser.
* Updated Schema with IsConstant and ConstantTensorsAsInputs.
* Updated Ref backend to handle constant weights and
bias as inputs rather than reading from member variables.
* Added dynamic or constant input EndToEnd tests.
!android-nn-driver:5959
Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com>
Change-Id: Ibf3cf437df1100e4b322b0d303c575c6339f9696
|
|
* Fixed unit test failures happening on threads.
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
Change-Id: I2a6048f75ece4a9f4c2116306838ff55385aabe7
|
|
* Add GUID as field to layer details and profiling events
* Add Optional GUID param to existing tests
* Improve Details macro to be inline function
* Fix some formatting
Signed-off-by: Keith Davis <keith.davis@arm.com>
Change-Id: I66f192a90a7642b3ee8e7dda0d3f428cce002581
|
|
* Fixed PreCompiledObject type (was const void** instead of void*)
* Fixed bug where a new shared_ptr was being created instead of allowing
std::move to convert the unique_ptr into a shared_ptr.
* Improved tests to ensure that the original pointer is maintained.
Signed-off-by: Mike Kelly <mike.kelly@arm.com>
Change-Id: I3f50d51775ee0180c894c2843ed7bc990a771dea
|
|
* Adds logic to the Runtime to activate protected mode
* Adds ProtectedContentAllocation backend capability to ClBackend
It's not fully activated yet because the CustomAllocator is
missing. Will print an error message and won't register the backend
but won't fail.
* Extends IBackendInternal with an UseCustomAllocator function.
* Adds related unit tests
Signed-off-by: Jan Eilers <jan.eilers@arm.com>
Change-Id: I64f465c5800eb104aa90db1bbf772a4148b5072f
|
|
Refactor code around conditionally-compiled tests to avoid declaring
empty test suites, as this can cause unused function warnings to be
issued under certain combinations of compiler, warning level, and
doctest version.
Signed-off-by: Matthew Bentham <matthew.bentham@arm.com>
Change-Id: Ib501aef80475538a725b857d9c31d1d2f96b124d
|
|
Because the maximum value of an int32_t isn't exactly representable
by a 32-bit float, casting it to a float produces a greater value,
and then casting that back to an int32_t is undefined. (In tested
implementations the cast saturates, so accidentally the correct
result is returned).
Using double for the intermediate value instead gives a high
enough precision that this test case can be safely expressed.
Silences warning from Undefioned Behaviour Sanitiser.
Signed-off-by: Matthew Bentham <matthew.bentham@arm.com>
Change-Id: I6fe3e89cb6ac695049c92f3b75aca0c14d0e14aa
|
|
* Fix type of literals
* Add explicit casts
* #include missing headers
* Replace use of non-standard u_int8_t
* Remove name of unused variables
* Fix DLL export macro - this was broken when some of the exporting headers
were moved to a different library.
Change-Id: Ie569c8df41a077b46c608798f39526352e2aeb3a
Signed-off-by: Rob Hughes <robert.hughes@arm.com>
|
|
Signed-off-by: Matthew Bentham <matthew.bentham@arm.com>
Change-Id: I5889a5f44c0c22da6421d9bd06494c75d74e0440
|
|
* Optimization that searches for layers with ConstantLayers as inputs.
* The layer member variables are then redirected to these ConstantLayers.
Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com>
Change-Id: I24a2bf0e8575b808343e0bbe3897b344e94796ad
|
|
* Added IOptimizedNetwork constructor that takes another
IOptimizedNetwork and a ModelOptions.
* Changed PreCompiledLayer to use shared_ptr rather than unique_ptr
to store the PreCompiledObject (no interface changes).
* Added unit tests to ensure that PreCompiledLayer::Clone() clones
the pointer to the PreCompiledObject correctly.
Signed-off-by: Mike Kelly <mike.kelly@arm.com>
Change-Id: I3ef56055e0d189ffce9e651882d34da16c70a240
|
|
* Ref workload
* Cl workload
* Neon workload
* Serializer
* Deserializer
* Remove boost include from TensorTest.cpp
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com>
Change-Id: I498548169cc77609c55cf3105f1de5a7429772cf
|
|
* This change is necessary because tflite uses a [1,H,W,I*M] format
and uses the I*M dimension for per axis quantization. Our previous
layout [M,I,H,W] can't handle the correlating quantization scales.
* Updates Onnx-, TfLiteParser and TfliteDelegate
* Updates the CpuRef, CpuAcc and GpuAcc backends
* Adjusts unit tests
* Adds test to ensure models with old layout can still be read and
executed
* Adds conversion function to previous layout [1,H,W,I*M] --> [M,I,H,W]
which can be used by backend developers
!android-nn-driver:5553
Signed-off-by: Jan Eilers <jan.eilers@arm.com>
Change-Id: Ifef23368b8c3702cf315a5838d214f7dc13c0152
|
|
profiling/common
Signed-off-by: Nikhil Raj <nikhil.raj@arm.com>
Change-Id: I83de0fe9c83ec7e698817095ce5cfe3319c36ea6
|
|
* Used doctest in ArmNN unit tests
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
Change-Id: Ia9cf5fc72775878885c5f864abf2c56b3a935f1a
|
|
Signed-off-by: Finn Williams <Finn.Williams@arm.com>
Change-Id: I05fc331a8e91bdcb6b8a2f32cfb555060fc5d797
|
|
* Replaced all instances of boost::multi_array with flat vectors.
* Updated LayerTestResult struct with new member variables.
* Updated CompareTensor function to compare flat vectors and the shape.
* Removed MakeTensor function from TensorHelpers.hpp.
* Removed GetTensorShapeAsArray function from LayerTestResult.hpp.
* Removed boost::array usage.
* Removed boost::extents usages.
* Removed boost::random usages.
Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com>
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
Change-Id: Iccde9d6640b534940292ff048fb80c00b38c4743
|
|
* PermutationVector.end() was returning the end of the fixed size array
m_DimMappings rather than the number of mappings set by the constructor.
Signed-off-by: Colm Donelan <Colm.Donelan@arm.com>
Change-Id: Ie218f7922e8c9c35c1dc702e43a5ee2fd1a61ff0
|
|
*All fold pad test are now in a separate file
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com>
Change-Id: Ic0b0436f6b0194404f9a3f1553e2f69524b63580
|
|
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com>
Change-Id: Ib01629256309cfe17f341909d5b9bbbb09361422
|
|
* Added backend specific optimization to chain new reduces layers
for each axis to simulate behaviour of a layer with multiple axes.
* Added function to calculate reduced output shape.
* Added unit tests.
* Includes rework to fix IVGCVSW-5987.
Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com>
Change-Id: I154b3698b5e6756b05b2a0b5a3f0896184efce72
|
|
This block of code to help our Windows user is no longer relevant with
the removal of Boost.
Signed-off-by: Colm Donelan <Colm.Donelan@arm.com>
Change-Id: I0f63277cd6913b8edfbcccf3f2cd1880227c35ec
|
|
* Adding a basic PredicateResult class to replace
boost::test_tools::predicate_result
* Replacing all uses of boost::test_tools::predicate_result with
the new armnn::PredicateResult class
* Replacing use of boost::test_tools::output_test_stream output
with std::ostringstream in ProfilerTests.cpp
Signed-off-by: Colm Donelan <Colm.Donelan@arm.com>
Change-Id: I75cdbbff98d984e26e4a50c125386b2988516fad
|
|
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com>
Change-Id: I4e4eb107aa2bfa09625840d738001f33152e6792
|
|
This reverts commit d905decd256558bbee165e636ce4242ac3b9c917.
Reason for revert: LargeGraph_TENSOR_FLOAT32/FLOAT16 CTS tests failures
Change-Id: Ie69826549e73775825f45134375b5b2c41aebd01
|
|
* Added backend specific optimization to chain new reduces layers
for each axis to simulate behaviour of a layer with multiple axes.
* Added function to calculate reduced output shape.
* Added unit tests.
Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com>
Change-Id: I180b0b111b7bcf3d0c283f1db0b82d5f17757682
|
|
* Generalises ConstCpuTensorHandle and inherited
classes by removing 'Cpu' from aliases.
* New renamed classes: ConstTensorHandle, TensorHandle,
ScopedTensorHandle, PassthroughTensorHandle,
ConstPassthroughTensorHandle.
Signed-off-by: James Conroy <james.conroy@arm.com>
Change-Id: I1824e0e134202735fb77051f20a7252f161dfe16
|
|
* In AddBroadcastReshapeLayerImpl check if a constant layer has other
connections before modifying its output tensor shape.
* In ElementWiseBaseLayer replace an ARMNN_ASSERT with a proper error
message.
Signed-off-by: Colm Donelan <Colm.Donelan@arm.com>
Change-Id: Id3f3796c260eede61f076660505257a8b65d93fc
|
|
Signed-off-by: Kevin May <kevin.may@arm.com>
Change-Id: I8a29df03afdd6f1cc8413b219e179272cd2d51cf
|
|
Some models would add a PAD layer before a pooling when they can't
express their padding configuration as SAME or VALID.
ArmNN can potentially merge the two merge the two because pooling
layers are described with explicit padding.
The merge is possible if the extra padding is neutral in the combined
pooling operation. A merged operation can only fuse paddings in the
dimensions that accept explicit padding in a pooling operation, i.e. the
spatial dimensions.
Signed-off-by: Diego Lopez Recas <diego.lopez.recas@gmail.com>
Signed-off-by: Colm Donelan <Colm.Donelan@arm.com>
Change-Id: Icd54718dcd9e797c923456b7fa6e0213e288e668
|
|
* Reading tensor infos won't allow a permutation vector anymore.
The permutation only changed the quantization dimension not the
shape and was therefore misleading
* The permutation of the full tensor info is now performed in
armnnUtils::Permuted
* Changed TfLite Parser depthwise parsing function
* Added unit tests to TfLite Parser with more random data
* Changed TfLite Delegate depthwise parsing function
* Added unit test to the delegate with per channel quantization
!android-nn-driver:5412
Signed-off-by: Jan Eilers <jan.eilers@arm.com>
Change-Id: I1f985ee69547bcaf16a72201e00a6b6fe1ef9a97
|
|
* Change layer storage of ConstTensors to std::shared_ptr<ConstCpuTensorHandle>
* Change clone to share ConstTensor rather than copy
* Remove uses of non-const GetTensor() call
* Reduce scope of non-optimized network in ExeNet, so memory can be released after use
Signed-off-by: Finn Williams <Finn.Williams@arm.com>
Change-Id: Ibb2c7309d12411d21405bd6024c76bcdf5404545
|
|
* Added AsyncExecution to the BackendCapability enum class.
* Logged a warning if backends do not support AsyncExecution capability if AsyncNetwork is created.
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
Change-Id: I49f8467297f4b6b8e414cb6a3638a7d3f1bb886a
|
|
TfLiteDelegate support for FullyConnected Operator'
* Added front-end support for non-const weights for FULLY_CONNECTED operator
* Added FULLY_CONNECTED end-to-end test
* Updated FULLY_CONNECTED operator support in TfLite Arm NN Delegate for non-const weights
* Updated the version numbers
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
Change-Id: Iffa5b9aa9297aca4c02d923cce4636c88ac21faa
|
|
This reverts commit 51ce7d487c761358de105f82ff90553570aedac0.
Reason for revert: https://jira.arm.com/browse/IVGCVSW-5798 LargeGraph_TENSOR_FLOAT32 CTS tests failures
Change-Id: Ib031a47f605340b2202ecf074ce96a8b54c51075
|
|
Some models would add a PAD layer before a pooling when they can't
express their padding configuration as SAME or VALID.
Arm NN can merge the two because pooling layers are described with
explicit padding.
Signed-off-by: Diego Lopez Recas <diego.lopez.recas@gmail.com>
Change-Id: Id048186db6a005e0257bfbc1406c3b0dab2cdd58
|
|
Optimisation when the input is a const tensor
Signed-off-by: Finn Williams <Finn.Williams@arm.com>
Change-Id: I8b1357bdefc45880d064d7e448af364ac8644c0d
|
|
* fix delegate perchannel quantization
* change delegate to check reshape options before inputs
* Add int8 "qsymms8" option to ExecuteNetwork
* Add option to run ExecuteNetwork on tflite w/o delegate
!referencetests:301301
Signed-off-by: Finn Williams <Finn.Williams@arm.com>
Change-Id: If3e12599b17aff1199d7ab0a55e1c901e480083d
|
|
* CreateTestNetwork() and CreateTransposeTestNetwork should only be
defined if Ref enabled; the same as the test its called in otherwise
it's defined but not called.
Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
Change-Id: I7bc522a7884d216d1a8e51afd7cec7a66e4e2947
|
|
!android-nn-driver:5042
Signed-off-by: Kevin May <kevin.may@arm.com>
Change-Id: Ia1ce8b839e81b46428ba0f78463e085e5906958d
Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
Signed-off-by: Finn Williams <Finn.Williams@arm.com>
|
|
Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
Change-Id: If716f5f4e9b5433586b8a939d326830482da2f74
|
|
Signed-off-by: Jan Eilers <jan.eilers@arm.com>
Signed-off-by: Finn Williams <Finn.Williams@arm.com>
Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
Change-Id: Id7bc8255a8e3f9e5aac65d510bec8a559bf37246
|
|
Signed-off-by: Kevin May <kevin.may@arm.com>
Change-Id: I52448938735b2aa678c47e0f3061c87fa0c693b1
|
|
This patch addes ReduceSum operation support for reference backend,
which computes the sum of elements across dimensions of a tensor.
Changelog v1:
- Fix file header descriptions.
Chagelog v2:
- Fix line limit issue.
- Fix type conversion issue.
Changelog v3:
- Remove tabs.
- Modify newly added file headers.
Changelog v4:
- Symbol on header isn't allowed so drop it from newly added file headers.
Changelog v5:
- Remove tabs, fix the use of brackets and align lines correctly.
Changelog v6:
- Add serializer and deserializer support.
Changelog v7:
- Fix build error add missed code.
Changelog v8:
- Rename ReduceSumDecriptor to ReduceDescriptor
- Update m_KeepDims field data type to bool on ReduceDescriptor
- Add ReduceOperation field to ReduceDescriptor
- Rename ReduceSumLayer to ReduceLayer
- Update ReduceLayer to use ReduceDescriptor
- Update ReduceLayer::ValidateTensorShapesFromInputs() function
- Rename RefReduceSumWokload to RefReduceWorkload
- Update workload to use ReduceDescriptor
- Update workload to use Decoders and Encoders
- Remove ReduceSum.hpp and ReduceSum.cpp
- Added Reduce.hpp and Reduce.cpp
- Move Mean.cpp (which is implementing REDUCE_MEAN) functionality to Reduce.cpp
- Update RefMeanWorkload to call Reduce function with ReduceOperation::Mean argument
- Remove Mean.hpp and Mean.cpp
- Update the Serializer/Deserializer ArmnnSchema.fbs for ReduceLayer, ReduceDescriptor, and ReduceOperation
- Update Serializer and Deserializer for serializing/parsing ReduceLayer
- Added TfLiter parser Sum test for REDUCE_SUM operator
- Make corresponding changes on front-end and Ref backend to support REDUCE_SUM operator
Changelog v9:
- Fixed build errors.
Change-Id: I8c8e034f3df73f9565b3c18eff51ecca6c542195
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
|
|
* Add test for new IsBackendRegistered member function of Handle
* Move deprecated messages to new frontend API of LayerSupportHandle
* Update delegate to use dot operator for IsXXXLayerSupported
Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
Change-Id: I70d7166e207a10e4b3583a827ca0dda2169bcba1
!android-nn-driver:4940
|
|
* ArmnnQuantizer incorrectly converts boolean or integer DataTypes to quantized
DataTypes. This breaks layers like ArgMinMax where the output contains the
index of an element along an axis.
Signed-off-by: Mike Kelly <mike.kelly@arm.com>
Change-Id: I272c3d0f48bf884a2480bfa43eb14ec265fcda6b
|
|
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com>
Change-Id: I6a00045967fa48ec0913c8708ffc146a72ed2b87
|