Imported Upstream version 1.25.0
[platform/core/ml/nnfw.git] / compiler / luci-interpreter / src / kernels / Gelu.h
@@ -1,6 +1,5 @@
 /*
- * Copyright (c) 2020 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.
@@ -15,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef LUCI_INTERPRETER_KERNELS_EXP_H
-#define LUCI_INTERPRETER_KERNELS_EXP_H
+#ifndef LUCI_INTERPRETER_KERNELS_GELU_H
+#define LUCI_INTERPRETER_KERNELS_GELU_H
 
 #include "core/Kernel.h"
 #include "core/KernelParams.h"
@@ -26,10 +25,10 @@ namespace luci_interpreter
 namespace kernels
 {
 
-class Exp : public Kernel
+class Gelu : public KernelWithParams<GeluParams>
 {
 public:
-  Exp(const Tensor *input, Tensor *output);
+  Gelu(const Tensor *input, Tensor *output, const GeluParams &params);
 
   const Tensor *input() const { return _inputs[0]; }
   Tensor *output() const { return _outputs[0]; }
@@ -39,9 +38,12 @@ public:
 
 private:
   void evalFloat() const;
+
+private:
+  bool _approximate = false;
 };
 
 } // namespace kernels
 } // namespace luci_interpreter
 
-#endif // LUCI_INTERPRETER_KERNELS_EXP_H
+#endif // LUCI_INTERPRETER_KERNELS_GELU_H