Snap for 8076550 from 3d6827c12b2d94af2053d600308373ea73f1a4be to sc-v2-release

Change-Id: I1243be3501d06c8051df8037864df6b58eb4adb3
diff --git a/shim_and_sl/ShimDevice.cpp b/shim_and_sl/ShimDevice.cpp
index 06e18d7..eadbbef 100644
--- a/shim_and_sl/ShimDevice.cpp
+++ b/shim_and_sl/ShimDevice.cpp
@@ -416,7 +416,7 @@
                              "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;