21#include "TestMemoryManager.h"
28 if (!
tensor.is_allocatable())
32 if (
tensor.is_data_allocated())
37 const auto num_elements =
tensor.shape().num_elements();
39 auto *
data =
new uint8_t[num_elements * element_size];
40 allocations.push_back(
data);
46 tensor.set_data_buffer(
nullptr);
void release_memory(luci_interpreter::Tensor &tensor) final
void allocate_memory(luci_interpreter::Tensor &tensor) final
const T * data(const std::vector< T, Alloc > &v)
size_t getDataTypeSize(DataType data_type)
T must_cast(loco::Node *node)