diff options
author | 2018-08-29 11:19:14 -0700 | |
---|---|---|
committer | 2018-08-29 11:26:39 -0700 | |
commit | 4f100201bc69bbb99bc558817a1263a63f26e8de (patch) | |
tree | 937df5f4f0a1a3e2cfac5cc56564fdc9098be2be /tensorflow/contrib/lite/nnapi_delegate.cc | |
parent | 0a4353e835f4c32e663488d6d1396dcc34c833a7 (diff) |
Automated rollback of commit 97fb9a9c7c72c405a790eea698a91654d5184fed
PiperOrigin-RevId: 210755689
Diffstat (limited to 'tensorflow/contrib/lite/nnapi_delegate.cc')
-rw-r--r-- | tensorflow/contrib/lite/nnapi_delegate.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tensorflow/contrib/lite/nnapi_delegate.cc b/tensorflow/contrib/lite/nnapi_delegate.cc index 8090c413d8..38f3e9881b 100644 --- a/tensorflow/contrib/lite/nnapi_delegate.cc +++ b/tensorflow/contrib/lite/nnapi_delegate.cc @@ -191,10 +191,8 @@ TfLiteStatus addTensorOperands(tflite::Interpreter* interpreter, // TODO(aselle): Based on Michael's suggestion, limiting this to read // only memory if (tensor->allocation_type == kTfLiteMmapRo) { - if (static_cast<const Allocation*>(tensor->allocation)->type() == - Allocation::Type::kNNAPI) { - const NNAPIAllocation* alloc = - static_cast<const NNAPIAllocation*>(tensor->allocation); + if (const NNAPIAllocation* alloc = dynamic_cast<const NNAPIAllocation*>( + static_cast<const Allocation*>(tensor->allocation))) { RETURN_ERROR_IF_NN_FAILED( ANeuralNetworksModel_setOperandValueFromMemory( nn_model, next_id, alloc->memory(), |