summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/locomotiv/src/Node/ReLU6.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/compiler/locomotiv/src/Node/ReLU6.cpp b/compiler/locomotiv/src/Node/ReLU6.cpp
index 7da892628..586c015fc 100644
--- a/compiler/locomotiv/src/Node/ReLU6.cpp
+++ b/compiler/locomotiv/src/Node/ReLU6.cpp
@@ -16,6 +16,8 @@
#include "NodeExecution.h"
+// TODO Remove deprecated code
+#if 0
#include "NodeDataImpl.h"
#include "NodeDomain.h"
#include "Validation.h"
@@ -31,6 +33,7 @@ using nncc::core::ADT::tensor::make_buffer;
#include <cassert>
#include <stdexcept>
+#endif
namespace
{
@@ -44,6 +47,8 @@ namespace locomotiv
void NodeExecution::execute(loco::ReLU6 *relu6)
{
+// TODO Remove deprecated code
+#if 0
auto input_data = annot_data(relu6->input());
validate(input_data, "Input not ready");
@@ -76,6 +81,16 @@ void NodeExecution::execute(loco::ReLU6 *relu6)
assert(relu6_data != nullptr);
annot_data(relu6, std::move(relu6_data));
annot_domain(relu6, annot_domain(relu6->input()));
+#endif
+
+ struct Func final : public UnaryFunc
+ {
+ float apply(float v) const final { return relu6_ew(v); }
+ };
+
+ Func f;
+
+ eltwise_unary(relu6, f);
}
} // namespace locomotiv