diff options
author | Michael Butler <butlermichael@google.com> | 2020-05-29 02:37:12 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-05-29 02:37:12 +0000 |
commit | c7e4e604b2d4f1cf8f2bdbe11350a48c719148d3 (patch) | |
tree | d019db552ce45278c3646938d87fe04ef26c9a52 /nn/runtime | |
parent | 2299d26439f28d18aa9d4ef4c6605579ef9bc49a (diff) | |
parent | c38e37d7e7a787b5ef602a51119ed544e9f1842a (diff) | |
download | ml-c7e4e604b2d4f1cf8f2bdbe11350a48c719148d3.tar.gz |
Merge "Omit dimensions for HAS_NO_VALUE operands" into rvc-dev
Diffstat (limited to 'nn/runtime')
-rw-r--r-- | nn/runtime/ExecutionBuilder.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nn/runtime/ExecutionBuilder.cpp b/nn/runtime/ExecutionBuilder.cpp index 61e320f9a..d65d96446 100644 --- a/nn/runtime/ExecutionBuilder.cpp +++ b/nn/runtime/ExecutionBuilder.cpp @@ -876,7 +876,11 @@ std::vector<OutputShape> ExecutionBuilder::getInitialOutputShapes() const { std::vector<OutputShape> outputShapes(mOutputs.size()); std::transform(mOutputs.begin(), mOutputs.end(), outputShapes.begin(), [](const auto& x) -> OutputShape { - return {.dimensions = x.dimensions(), .isSufficient = true}; + hidl_vec<uint32_t> dimensions; + if (x.state() != ModelArgumentInfo::HAS_NO_VALUE) { + dimensions = x.dimensions(); + } + return {.dimensions = std::move(dimensions), .isSufficient = true}; }); return outputShapes; } |