void accept(Visitor *v) override
{
- //TODO: enable this when at least one Visitor operation declared
- // v->visit(this, *static_cast<OpType*>(_props.op));
+ v->visit(this, *static_cast<OpType*>(_props.op));
}
~Node() override {
#include "nnc/core/IR/model/operations/operation.h"
+#include "nnc/core/IR/model/operations/reshape_op.h"
#include "nnc/core/IR/model/graph/ir_node.h"
#include "nncc/core/ADT/feature/Shape.h"
-
#include <gtest/gtest.h>
-
-class DummyOperation : public nncc::contrib::core::IR::model::OpDescription {
- public:
- DummyOperation() : OpDescription(1, 1) {}
-};
-
TEST(IRNode, ConnectionTest) {
using namespace nncc::contrib::core::IR::model;
- auto node1 = Node<DummyOperation>::createNode("node1", 0);
- auto node2 = Node<DummyOperation>::createNode("node2", 1);
+ auto node1 = Node<ops::ReshapeOp>::createNode("node1", 0);
+ auto node2 = Node<ops::ReshapeOp>::createNode("node2", 1);
node2->connectInputTo(0, node1->getOutput(0));