diff options
author | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-07-02 16:53:10 +0100 |
---|---|---|
committer | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-07-05 12:58:25 +0100 |
commit | 0bd89a87f15bf0983eace53df1160a3e64bc0e75 (patch) | |
tree | cb6343a43938b22685614b5242cd341aeca94174 /1.2 | |
parent | fb2fa29e83e5ed7cd8ddf90ffb95946e7498f365 (diff) | |
download | android-nn-driver-0bd89a87f15bf0983eace53df1160a3e64bc0e75.tar.gz |
IVGCVSW-3370 Add broadcasting support to PReLU to properly run the Android VTS/NN
tests
* Updated ConvertPrelu to support input broadcasting
* Updated the BroadcastTensor utility function so that it preserves
the order of the inputs
* Updated the documentation
Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
Change-Id: Ibbac6f7161132740e61c85f597f8be70cd5d7325
Diffstat (limited to '1.2')
-rw-r--r-- | 1.2/ArmnnDriverImpl.cpp | 4 | ||||
-rw-r--r-- | 1.2/HalPolicy.cpp | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/1.2/ArmnnDriverImpl.cpp b/1.2/ArmnnDriverImpl.cpp index 87ef08c2..3b2cb744 100644 --- a/1.2/ArmnnDriverImpl.cpp +++ b/1.2/ArmnnDriverImpl.cpp @@ -80,7 +80,7 @@ Return<ErrorStatus> ArmnnDriverImpl::prepareArmnnModel_1_2(const armnn::IRuntime const sp<V1_2::IPreparedModelCallback>& cb, bool float32ToFloat16) { - ALOGV("ArmnnDriverImpl::prepareModel()"); + ALOGV("ArmnnDriverImpl::prepareArmnnModel_1_2()"); if (cb.get() == nullptr) { @@ -290,4 +290,4 @@ Return<void> ArmnnDriverImpl::getCapabilities_1_2(const armnn::IRuntimePtr& runt } } // namespace hal_1_2 -} // namespace armnn_driver
\ No newline at end of file +} // namespace armnn_driver diff --git a/1.2/HalPolicy.cpp b/1.2/HalPolicy.cpp index 1c6159ef..e058e026 100644 --- a/1.2/HalPolicy.cpp +++ b/1.2/HalPolicy.cpp @@ -443,7 +443,7 @@ bool HalPolicy::ConvertPrelu(const Operation& operation, const Model& model, Con if (!output) { - return Fail("%s: Could not read output 0", __func__); + return Fail("%s: Could not read output", __func__); } const armnn::TensorInfo& inputInfo = input.GetTensorInfo(); @@ -467,8 +467,7 @@ bool HalPolicy::ConvertPrelu(const Operation& operation, const Model& model, Con return Fail("%s: AddPreluLayer failed", __func__); } - input.Connect(layer->GetInputSlot(0)); - alpha.Connect(layer->GetInputSlot(1)); + BroadcastTensor(input, alpha, layer, *data.m_Network); return SetupAndTrackLayerOutputSlot<hal_1_2::HalPolicy>(operation, 0, *layer, model, data); } |