aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSadik Armagan <sadik.armagan@arm.com>2020-04-21 10:39:28 +0100
committerSadik Armagan <sadik.armagan@arm.com>2020-04-21 10:39:28 +0100
commit7b9ce8d48b74a3487f0597eedc38523c4a8e02ee (patch)
tree3b840bbab4685f1251f064772e2f1c010240a8b0
parent5c8b8b16c928235a4c7408357352b571d21e4b8d (diff)
downloadandroid-nn-driver-7b9ce8d48b74a3487f0597eedc38523c4a8e02ee.tar.gz
IVGCVSW-4679 Fix VTS DeadlineTest failures 1.3 CpuAcc CpuRef
* Optional timeline parameters are not supported yet. Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: Ic5d6cd6af0cd87d4acba102a48fc94ec8b406377
-rw-r--r--ArmnnPreparedModel_1_3.cpp33
-rw-r--r--ConversionUtils.hpp4
2 files changed, 27 insertions, 10 deletions
diff --git a/ArmnnPreparedModel_1_3.cpp b/ArmnnPreparedModel_1_3.cpp
index 68156ca..5b45b4a 100644
--- a/ArmnnPreparedModel_1_3.cpp
+++ b/ArmnnPreparedModel_1_3.cpp
@@ -258,11 +258,29 @@ template<typename HalVersion>
Return<void> ArmnnPreparedModel_1_3<HalVersion>::executeFenced(const V1_3::Request&,
const hidl_vec<hidl_handle>&,
MeasureTiming,
- const OptionalTimePoint&,
- const OptionalTimeoutDuration&,
+ const OptionalTimePoint& deadline,
+ const OptionalTimeoutDuration& loopTimeoutDuration,
const OptionalTimeoutDuration&,
executeFenced_cb cb)
{
+ ALOGV("ArmnnPreparedModel_1_3::executeFenced(...)");
+ if (cb == nullptr)
+ {
+ ALOGE("ArmnnPreparedModel_1_3::executeFenced invalid callback passed");
+ cb(ErrorStatus::INVALID_ARGUMENT, hidl_handle(nullptr), nullptr);
+ return Void();
+ }
+
+ if (deadline.getDiscriminator() != OptionalTimePoint::hidl_discriminator::none)
+ {
+ ALOGW("ArmnnPreparedModel_1_3::executeFenced parameter deadline is set but not supported.");
+ }
+
+ if (loopTimeoutDuration.getDiscriminator() != OptionalTimeoutDuration::hidl_discriminator::none)
+ {
+ ALOGW("ArmnnPreparedModel_1_3::executeFenced parameter loopTimeoutDuration is set but not supported.");
+ }
+
cb(ErrorStatus::INVALID_ARGUMENT, hidl_handle(nullptr), nullptr);
return Void();
}
@@ -471,16 +489,13 @@ Return<void> ArmnnPreparedModel_1_3<HalVersion>::executeSynchronously_1_3(
if (deadline.getDiscriminator() != OptionalTimePoint::hidl_discriminator::none)
{
- ALOGE("ArmnnPreparedModel_1_3::executeSynchronously_1_3 invalid request model");
- cb(V1_3::ErrorStatus::INVALID_ARGUMENT, {}, g_NoTiming);
- return Void();
+ ALOGW("ArmnnPreparedModel_1_3::executeSynchronously_1_3 parameter deadline is set but not supported.");
}
if (loopTimeoutDuration.getDiscriminator() != OptionalTimeoutDuration::hidl_discriminator::none)
- {
- ALOGE("ArmnnPreparedModel_1_3::executeSynchronously_1_3 invalid request model");
- cb(V1_3::ErrorStatus::INVALID_ARGUMENT, {}, g_NoTiming);
- return Void();
+ {
+ ALOGW(
+ "ArmnnPreparedModel_1_3::executeSynchronously_1_3 parameter loopTimeoutDuration is set but not supported.");
}
auto cbWrapper = [cb](V1_3::ErrorStatus errorStatus,
diff --git a/ConversionUtils.hpp b/ConversionUtils.hpp
index ebfc43b..d19131c 100644
--- a/ConversionUtils.hpp
+++ b/ConversionUtils.hpp
@@ -3193,10 +3193,12 @@ bool ConvertPad(HalOperation& operation, const HalModel& model, ConversionData&
return Fail("%s: Could not convert paddings", __func__);
}
+ // For a ANEURALNETWORKS_TENSOR_QUANT8_ASYMM and ANEURALNETWORKS_TENSOR_QUANT8_ASYMM_SIGNED tensor,
+ // the scale and zeroPoint must be the same as input0
// Before Android Q, the pad value for ANEURALNETWORKS_TENSOR_QUANT8_ASYMM was undefined. Since Android Q the pad
// value must be "logical zero" we set it to be equal to the QuantizationOffset so effectively it ends up as
// (QuantizationOffset - QuantizationOffset) * scale = 0.
- if (inputInfo.GetDataType() == armnn::DataType::QAsymmU8)
+ if (inputInfo.GetDataType() == armnn::DataType::QAsymmU8 || inputInfo.GetDataType() == armnn::DataType::QAsymmS8)
{
descriptor.m_PadValue = inputInfo.GetQuantizationOffset();
}