18#include "kernels/Utils.h"
19#include "tensorflow/lite/kernels/internal/reference/reference_ops.h"
31template <
typename T>
void Fill::configureShape()
40 throw std::runtime_error(
"Fill dimensions must be >= 0");
58 dims()->element_type() == DataType::S64);
64 if (
value()->element_type() == loco::DataType::S16
or
65 value()->element_type() == loco::DataType::S8)
70 if (
value()->element_type() == loco::DataType::S16)
74 switch (
dims()->element_type())
83 throw std::runtime_error(
"luci-intp Fill(1) Unsupported type.");
89 switch (
output()->element_type())
107 case DataType::FLOAT32:
112 throw std::runtime_error(
"luci-intp Fill(2) Unsupported type.");
void resize(const Shape &new_shape)
const Shape & shape() const
Fill(const Tensor *dims, const Tensor *value, Tensor *output)
void configure() override
const Tensor * dims() const
const Tensor * value() const
void execute() const override
#define LUCI_INTERPRETER_CHECK(cond)
const luci_interpreter::RuntimeShape output_shape
const T * data(const std::vector< T, Alloc > &v)
tflite::RuntimeShape getTensorShape(const Tensor *tensor)
T must_cast(loco::Node *node)