19#include "kernels/Utils.h"
21#include <tensorflow/lite/kernels/internal/reference/reference_ops.h>
47 if (
t0->element_type() != DataType::S32 &&
t0->element_type() != DataType::FLOAT32 &&
48 t0->element_type() != DataType::U8 &&
t0->element_type() != DataType::S8 &&
49 t0->element_type() != DataType::S16 &&
t0->element_type() != DataType::S64)
51 throw std::runtime_error(
"luci-intp Pack(1) Unsupported type.");
59 for (
int d = 0; d <
t0->shape().num_dims(); ++d)
79 if (
t0->element_type() == DataType::U8 ||
t0->element_type() == DataType::S8 ||
80 t0->element_type() == DataType::S16)
98 switch (
_inputs[0]->element_type())
100 case DataType::FLOAT32:
119 throw std::runtime_error(
"luci-intp Pack(2) Unsupported type.");
123template <
typename T>
void Pack::evalGeneric()
const
134 tflite::PackParams
params{};
const std::vector< const Tensor * > _inputs
const PackParams & params() const
void resize(const Shape &new_shape)
const Shape & shape() const
int32_t zero_point() const
void configure() override
Pack(std::vector< const Tensor * > inputs, Tensor *output, const PackParams ¶ms)
void execute() const override
#define LUCI_INTERPRETER_CHECK(cond)
const luci_interpreter::RuntimeShape output_shape
tflite::RuntimeShape getTensorShape(const Tensor *tensor)
T must_cast(loco::Node *node)