aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrzemysław Szczepaniak <pszczepaniak@google.com>2021-12-20 13:43:27 +0000
committerPrzemysław Szczepaniak <pszczepaniak@google.com>2022-01-06 15:14:56 +0000
commit3d6827c12b2d94af2053d600308373ea73f1a4be (patch)
tree93f5533ebbc53456fd79c37a50ac43fcd7dfb68d
parent834b6a50717b764cd1ef5bb208abbf58c7b4d3bd (diff)
downloadNeuralNetworks-3d6827c12b2d94af2053d600308373ea73f1a4be.tar.gz
Bug: 210970637 Test: cts Change-Id: I76d5b89e2d95d4e775ca544c54ec5100e404ba47 Merged-In: I76d5b89e2d95d4e775ca544c54ec5100e404ba47 (cherry picked from commit b5c6b2dca691228341b20e2ac39c1c7e975d954e)
-rw-r--r--shim_and_sl/ShimDevice.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/shim_and_sl/ShimDevice.cpp b/shim_and_sl/ShimDevice.cpp
index 06e18d7d2..eadbbef4f 100644
--- a/shim_and_sl/ShimDevice.cpp
+++ b/shim_and_sl/ShimDevice.cpp
@@ -416,7 +416,7 @@ class ShimBuffer : public BnBuffer {
"ShimDriver::allocate -- ANeuralNetworksMemoryDesc_addInputRole fail");
}
const auto& model = pmodel->getMainModel();
- const auto& op = model.getOperands()[model.getInputs()[role.ioIndex]];
+ const auto& op = model.getOperands()[model.getOutputs()[role.ioIndex]];
auto operandType = static_cast<::android::nn::OperandType>(op.operandType.type);
if (!type) {
type = operandType;