/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd. All Rights Reserved
- * Copyright 2019 The TensorFlow Authors. All Rights Reserved.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* limitations under the License.
*/
-#ifndef LUCI_INTERPRETER_KERNELS_SHAPE_H
-#define LUCI_INTERPRETER_KERNELS_SHAPE_H
+#ifndef LUCI_INTERPRETER_KERNELS_SUM_H
+#define LUCI_INTERPRETER_KERNELS_SUM_H
#include "core/Kernel.h"
#include "core/KernelParams.h"
+#include <memory>
+
namespace luci_interpreter
{
namespace kernels
{
-class ShapeKernel : public KernelWithParams<ShapeParams>
+class Sum : public KernelWithParams<ReducerParams>
{
public:
- ShapeKernel(const Tensor *input, Tensor *output, const ShapeParams ¶ms);
+ // TODO Add temp_sum to support quantized kernels
+ Sum(const Tensor *input, const Tensor *axes, Tensor *output, Tensor *temp_index,
+ Tensor *resolved_axes, const ReducerParams ¶ms);
const Tensor *input() const { return _inputs[0]; }
+ const Tensor *axes() const { return _inputs[1]; }
Tensor *output() const { return _outputs[0]; }
void configure() override;
void execute() const override;
private:
- template <typename T> void evalInt() const;
+ void evalFloat() const;
};
} // namespace kernels
} // namespace luci_interpreter
-#endif // LUCI_INTERPRETER_KERNELS_SHAPE_H
+#endif // LUCI_INTERPRETER_KERNELS_SUM_H