diff options
author | Xusong Wang <xusongw@google.com> | 2020-05-15 10:04:42 -0700 |
---|---|---|
committer | Xusong Wang <xusongw@google.com> | 2020-05-21 10:28:58 -0700 |
commit | 28e0c9d9d39528d0d1c9ed18b3b9d861c7ec06fb (patch) | |
tree | 70c1716494deac50e593ebd017f1b67ab3e136b3 /nn | |
parent | 3594be18553db032e3af6dae5c6b9e310eb2f3d8 (diff) | |
download | ml-28e0c9d9d39528d0d1c9ed18b3b9d861c7ec06fb.tar.gz |
Fix CAST issue with outputs of unknown rank.
Fixes: 156750075
Test: NNT_static
Test: 1.3 VTS with ag/11509996
Change-Id: I9afea6076af8153ab7572b5f0fecfec41451ec86
Diffstat (limited to 'nn')
-rw-r--r-- | nn/common/operations/Cast.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/nn/common/operations/Cast.cpp b/nn/common/operations/Cast.cpp index f8ca4022e..77e35afb0 100644 --- a/nn/common/operations/Cast.cpp +++ b/nn/common/operations/Cast.cpp @@ -17,12 +17,13 @@ #define LOG_TAG "Operations" #include "Cast.h" + +#include <algorithm> + #include "HalInterfaces.h" #include "Operations.h" #include "Tracing.h" -#include <algorithm> - namespace android { namespace nn { namespace cast { @@ -67,9 +68,6 @@ bool copyToTensor(const FromT* inputData, int numElements, uint8_t* outputData, } // namespace bool prepare(const Shape& input, Shape* output) { - if (input.dimensions.size() != output->dimensions.size()) { - return false; - } output->dimensions = input.dimensions; return true; } |