From 583b2864dfbcd7a6c94e82c209b6d3bc806306e3 Mon Sep 17 00:00:00 2001 From: SaeHie Park Date: Mon, 28 Apr 2025 10:59:45 +0900 Subject: [PATCH] [exo] Fix for gcc-13 overloaded-virtual This will fix for gcc-13 overloaded-virtual option on U24.04 build. ONE-DCO-1.0-Signed-off-by: SaeHie Park --- .../exo/src/Circle/CircleOperationExporter.cpp | 17 +++++++++++++++++ .../exo/src/TFLite/TFLOperationExporter.cpp | 16 ++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/compiler/exo/src/Circle/CircleOperationExporter.cpp b/compiler/exo/src/Circle/CircleOperationExporter.cpp index 8b7337011d5..cc3c474c161 100644 --- a/compiler/exo/src/Circle/CircleOperationExporter.cpp +++ b/compiler/exo/src/Circle/CircleOperationExporter.cpp @@ -37,6 +37,8 @@ #include +#include + using namespace flatbuffers; using namespace circle; @@ -73,6 +75,8 @@ class OperationExporter final : public locoex::TFLNodeMutableVisitor, void visit(locoex::TFLRelu *) final; void visit(locoex::TFLRelu6 *) final; // TODO TFLReshape + // NOTE adding visit() to make compiler happy with "-Werror=overloaded-virtual=" + void visit(locoex::TFLReshape *) final { assert(false); }; void visit(locoex::TFLRsqrt *) final; // TODO TFLSoftmax void visit(locoex::TFLSqrt *) final; @@ -125,6 +129,19 @@ class OperationExporter final : public locoex::TFLNodeMutableVisitor, void visit(locoex::COpCall *); + // NOTE adding visit() to make compiler happy with "-Werror=overloaded-virtual=" + void visit(loco::Node *) final { assert(false); } + void visit(loco::MatMul *) final { assert(false); } + void visit(loco::MatrixDecode *) final { assert(false); } + void visit(loco::MatrixEncode *) final { assert(false); } + void visit(loco::TensorTranspose *) final { assert(false); } + void visit(loco::Forward *) final { assert(false); } + void visit(loco::FilterDecode *) final { assert(false); } + void visit(loco::DepthwiseFilterDecode *) final { assert(false); } + void visit(loco::BiasDecode *) final { assert(false); } + void visit(locoex::TFLNode *) final { assert(false); } + void visit(locoex::CircleNode *) final { assert(false); } + private: /** * @brief Exports TFLMaxPool2D or TFLAveragePool2D diff --git a/compiler/exo/src/TFLite/TFLOperationExporter.cpp b/compiler/exo/src/TFLite/TFLOperationExporter.cpp index b7a0ffea81f..60609e962b6 100644 --- a/compiler/exo/src/TFLite/TFLOperationExporter.cpp +++ b/compiler/exo/src/TFLite/TFLOperationExporter.cpp @@ -33,6 +33,8 @@ #include +#include + using namespace flatbuffers; using namespace tflite; @@ -68,6 +70,8 @@ class OperationExporter final : public locoex::TFLNodeMutableVisitor, void visit(locoex::TFLRelu *) final; void visit(locoex::TFLRelu6 *) final; // TODO TFLReshape + // NOTE adding visit() to make compiler happy with "-Werror=overloaded-virtual=" + void visit(locoex::TFLReshape *) { assert(false); } void visit(locoex::TFLRsqrt *) final; // TODO TFLSoftmax void visit(locoex::TFLSqrt *) final; @@ -117,6 +121,18 @@ class OperationExporter final : public locoex::TFLNodeMutableVisitor, void visit(locoex::COpCall *); + // NOTE adding visit() to make compiler happy with "-Werror=overloaded-virtual=" + void visit(loco::Node *) final { assert(false); } + void visit(loco::MatMul *) final { assert(false); } + void visit(loco::MatrixDecode *) final { assert(false); } + void visit(loco::MatrixEncode *) final { assert(false); } + void visit(loco::TensorTranspose *) final { assert(false); } + void visit(loco::Forward *) final { assert(false); } + void visit(loco::FilterDecode *) final { assert(false); } + void visit(loco::DepthwiseFilterDecode *) final { assert(false); } + void visit(loco::BiasDecode *) final { assert(false); } + void visit(locoex::TFLNode *) final { assert(false); } + private: /** * @brief Exports TFLMaxPool2D or TFLAveragePool2D