* limitations under the License.
*/
-#include "Planner.h"
+#include "OperationValidator.h"
#include <typeinfo>
namespace codegen
{
-void Planner::visit(const graph::operation::Conv2DNode &)
+void OperationValidator::visit(const graph::operation::Conv2DNode &)
{
// DO NOTHING
}
-void Planner::visit(const graph::operation::MaxPool2DNode &)
+void OperationValidator::visit(const graph::operation::MaxPool2DNode &)
{
// DO NOTHING
}
-void Planner::visit(const graph::operation::AvgPool2DNode &)
+void OperationValidator::visit(const graph::operation::AvgPool2DNode &)
{
// DO NOTHING
}
-void Planner::visit(const graph::operation::ConcatNode &node)
+void OperationValidator::visit(const graph::operation::ConcatNode &node)
{
(void)node; // NOTE To prevent from unused variable warning
3);
}
-void Planner::visit(const graph::operation::FullyConnectedNode &)
+void OperationValidator::visit(const graph::operation::FullyConnectedNode &)
{
// DO NOTHING
}
-void Planner::visit(const graph::operation::ReshapeNode &node)
+void OperationValidator::visit(const graph::operation::ReshapeNode &node)
{
(void)node; // NOTE To prevent from unused variable warning
_ctx.at(input_index).shape().dim(2)) == _ctx.at(output_index).shape().dim(1));
}
-void Planner::visit(const graph::operation::SoftmaxNode &node)
+void OperationValidator::visit(const graph::operation::SoftmaxNode &node)
{
(void)node; // NOTE To prevent from unused variable warning
assert(_ctx.at(input_index).shape().dim(1) == _ctx.at(output_index).shape().dim(1));
}
-void Planner::visit(const graph::operation::NOPNode &)
+void OperationValidator::visit(const graph::operation::NOPNode &)
{
// DO NOTHING
}
-void Planner::visit(const graph::operation::PermuteNode &node)
+void OperationValidator::visit(const graph::operation::PermuteNode &node)
{
(void)node; // NOTE To prevent from unused variable warning
assert(_ctx.at(output_index).shape().rank() == _ctx.at(input_index).shape().rank());
}
-void Planner::visit(const graph::operation::AddNode &)
+void OperationValidator::visit(const graph::operation::AddNode &)
{
// DO NOTHING
}
* limitations under the License.
*/
-#ifndef __NEURUN_CODEGEN_PLANNER_H__
-#define __NEURUN_CODEGEN_PLANNER_H__
+#ifndef __NEURUN_CODEGEN_OPERATION_VALIDATOR_H__
+#define __NEURUN_CODEGEN_OPERATION_VALIDATOR_H__
#include "graph/operation/NodeVisitor.h"
namespace codegen
{
-// FIXME Rename Planner to OperationAsserter
-class Planner : public graph::operation::NodeVisitor
+class OperationValidator : public graph::operation::NodeVisitor
{
public:
- Planner(const neurun::graph::operand::Set &ctx) : _ctx{ctx} {}
+ OperationValidator(const neurun::graph::operand::Set &ctx) : _ctx{ctx} {}
public:
virtual void visit(const graph::operation::Conv2DNode &) override;
} // namespace codegen
} // namespace neurun
-#endif // __NEURUN_CODEGEN_PLANNER_H__
+#endif // __NEURUN_CODEGEN_OPERATION_VALIDATOR_H__
#include "graph/dumper/Dumper.h"
#include "dumper/dot/DotDumper.h"
#include "codegen/IPlanBuilder.h"
-#include "codegen/Planner.h"
+#include "codegen/OperationValidator.h"
#include "codegen/PlanBuilder.h"
#include "middleend/SubTensorAnalyzer.h"
#include "codegen/ConstantInitializer.h"
neurun::codegen::PlanBuilder plan_builder{plan};
- // NOTE This is actually an Asserter. Will be renamed
- linear->accept(neurun::codegen::Planner{operands});
+ linear->accept(neurun::codegen::OperationValidator{operands});
// Plan building
linear->iterate([&](const neurun::graph::operation::Node *node) {