diff options
author | Alan Green <avg@google.com> | 2020-07-14 05:59:40 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2020-07-14 05:59:40 +0000 |
commit | f61fcb6e8704136adccc7289f4d722f3512b52dd (patch) | |
tree | 6754e26cdbad0834b9b686fc7af819088a1e1ed7 /nn/common | |
parent | e3a65e1b5da3b00ecfd1cf0f53bebe5b41038d55 (diff) | |
parent | 0f7a71d531c0c17407f99d971d66767aae2554e5 (diff) | |
download | ml-f61fcb6e8704136adccc7289f4d722f3512b52dd.tar.gz |
Merge changes I7fb673e0,Id2e377baandroid-r-beta-3android-r-beta-2
* changes:
CpuExecutor: reorder field designators
Remove unused identifiers
Diffstat (limited to 'nn/common')
-rw-r--r-- | nn/common/CpuExecutor.cpp | 5 | ||||
-rw-r--r-- | nn/common/ExecutionBurstController.cpp | 2 | ||||
-rw-r--r-- | nn/common/ExecutionBurstServer.cpp | 1 | ||||
-rw-r--r-- | nn/common/OperationsUtils.cpp | 4 | ||||
-rw-r--r-- | nn/common/ValidateHal.cpp | 1 |
5 files changed, 1 insertions, 12 deletions
diff --git a/nn/common/CpuExecutor.cpp b/nn/common/CpuExecutor.cpp index 9373d59e2..b66339b4c 100644 --- a/nn/common/CpuExecutor.cpp +++ b/nn/common/CpuExecutor.cpp @@ -389,9 +389,9 @@ std::optional<RunTimePoolInfo> RunTimePoolInfo::createFromHidlMemory( AHardwareBuffer_Desc desc{ .width = width, - .format = format, .height = height, .layers = layers, + .format = format, .usage = usage, .stride = stride, }; @@ -1111,9 +1111,6 @@ int CpuExecutor::executeOperation(const Operation& operation, RunTimeOperandInfo if (!allParametersPresent(3, 1)) { return ANEURALNETWORKS_BAD_DATA; } - const RunTimeOperandInfo& lookups = operands[ins[HashtableLookup::kLookupTensor]]; - const RunTimeOperandInfo& keys = operands[ins[HashtableLookup::kKeyTensor]]; - const RunTimeOperandInfo& values = operands[ins[HashtableLookup::kValueTensor]]; RunTimeOperandInfo& output = operands[outs[Multinomial::kOutputTensor]]; Shape outputShape; diff --git a/nn/common/ExecutionBurstController.cpp b/nn/common/ExecutionBurstController.cpp index 8463df895..e195e7d31 100644 --- a/nn/common/ExecutionBurstController.cpp +++ b/nn/common/ExecutionBurstController.cpp @@ -281,8 +281,6 @@ void ResultChannelReceiver::invalidate() { } std::optional<std::vector<FmqResultDatum>> ResultChannelReceiver::getPacketBlocking() { - using discriminator = FmqResultDatum::hidl_discriminator; - if (!mValid) { return std::nullopt; } diff --git a/nn/common/ExecutionBurstServer.cpp b/nn/common/ExecutionBurstServer.cpp index 583ebf553..487cd9fad 100644 --- a/nn/common/ExecutionBurstServer.cpp +++ b/nn/common/ExecutionBurstServer.cpp @@ -360,7 +360,6 @@ void RequestChannelReceiver::invalidate() { } std::optional<std::vector<FmqRequestDatum>> RequestChannelReceiver::getPacketBlocking() { - using discriminator = FmqRequestDatum::hidl_discriminator; if (mTeardown) { return std::nullopt; diff --git a/nn/common/OperationsUtils.cpp b/nn/common/OperationsUtils.cpp index e8dd3e2ba..d1814b7c8 100644 --- a/nn/common/OperationsUtils.cpp +++ b/nn/common/OperationsUtils.cpp @@ -463,9 +463,7 @@ bool embeddingLookupPrepare(const Shape& valueShape, const Shape& lookupShape, S NN_OPS_CHECK(getNumberOfDimensions(valueShape) >= 2); NN_OPS_CHECK(getNumberOfDimensions(lookupShape) == 1); - const uint32_t rows = getSizeOfDimension(valueShape, 0); const uint32_t columns = getSizeOfDimension(valueShape, 1); - const uint32_t lookups = getSizeOfDimension(lookupShape, 0); outputShape->type = valueShape.type; @@ -486,8 +484,6 @@ bool hashtableLookupPrepare(const Shape& lookupShape, const Shape& keyShape, NN_OPS_CHECK(getNumberOfDimensions(valueShape) >= 1); const uint32_t lookups = getSizeOfDimension(lookupShape, 0); - const uint32_t keys = getSizeOfDimension(keyShape, 0); - const uint32_t rows = getSizeOfDimension(valueShape, 0); outputShape->type = valueShape.type; outputShape->dimensions = {lookups}; for (uint32_t i = 1; i < getNumberOfDimensions(valueShape); i++) { diff --git a/nn/common/ValidateHal.cpp b/nn/common/ValidateHal.cpp index e5b9b12a8..e5cff404b 100644 --- a/nn/common/ValidateHal.cpp +++ b/nn/common/ValidateHal.cpp @@ -478,7 +478,6 @@ static bool validateOperations(const hidl_vec<VersionedOperation>& operations, CHECK_LT(subgraph.outputIndexes[index], subgraph.operands.size()); return &subgraph.operands[subgraph.outputIndexes[index]]; }; - const size_t operandCount = operands.size(); for (auto& op : operations) { // TODO Validate the shapes and any known values. This is currently // done in CpuExecutor but should be done here for all drivers. |