24 if (!tensor.is_allocatable())
28 if (tensor.is_data_allocated())
33 const auto num_elements = tensor.shape().num_elements();
35 auto *
data =
new uint8_t[num_elements * element_size];
36 allocations.push_back(
data);
37 tensor.set_data_buffer(
data);