Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions compiler/exo/src/Circle/CircleOperationExporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@

#include <flatbuffers/flexbuffers.h>

#include <cassert>

using namespace flatbuffers;
using namespace circle;

Expand Down Expand Up @@ -73,6 +75,8 @@ class OperationExporter final : public locoex::TFLNodeMutableVisitor<void>,
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;
Expand Down Expand Up @@ -125,6 +129,19 @@ class OperationExporter final : public locoex::TFLNodeMutableVisitor<void>,

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); }

Comment on lines +132 to +144

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question,
Does this mean these operations are currently not supported for export?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these are not for circle or tflite dialect so not need to be exported.

private:
/**
* @brief Exports TFLMaxPool2D or TFLAveragePool2D
Expand Down
16 changes: 16 additions & 0 deletions compiler/exo/src/TFLite/TFLOperationExporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

#include <flatbuffers/flexbuffers.h>

#include <cassert>

using namespace flatbuffers;
using namespace tflite;

Expand Down Expand Up @@ -68,6 +70,8 @@ class OperationExporter final : public locoex::TFLNodeMutableVisitor<void>,
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;
Expand Down Expand Up @@ -117,6 +121,18 @@ class OperationExporter final : public locoex::TFLNodeMutableVisitor<void>,

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
Expand Down