未验证 提交 6d083483 编写于 作者: K Kun Lu 提交者: GitHub

Fix incorrect values in recorded_allocation on BE machines (#303)

Use base class version of AllocateFromTail() instead of derived class
version in FlatBufferVectorToTfLiteTypeArray() to solve the issue
Signed-off-by: NKun-Lu <kun.lu@ibm.com>
上级 9d1f67e4
......@@ -370,8 +370,8 @@ TfLiteStatus FlatBufferVectorToTfLiteTypeArray(
// Big-endian architecture can not use the same memory layout as
// flatbuffers::Vector<kFlatBufferVectorType>. Allocate from the tail and
// copy values from the flatbuffer into the newly allocated chunk.
kTfLiteArrayType* array =
reinterpret_cast<kTfLiteArrayType*>(allocator->AllocateFromTail(
kTfLiteArrayType* array = reinterpret_cast<kTfLiteArrayType*>(
allocator->SimpleMemoryAllocator::AllocateFromTail(
TfLiteIntArrayGetSizeInBytes(flatbuffer_array->size()),
alignof(kTfLiteArrayType)));
if (array == nullptr) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册