1 #ifndef NOM_TESTS_TEST_UTIL_H 2 #define NOM_TESTS_TEST_UTIL_H 4 #include "caffe2/core/common.h" 5 #include "nomnigraph/Graph/Graph.h" 6 #include "nomnigraph/Graph/Algorithms.h" 7 #include "nomnigraph/Representations/NeuralNet.h" 8 #include "nomnigraph/Converters/Dot.h" 23 !nom::repr::nn::is<nom::repr::NeuralNetOperator>(a) ||
24 !nom::repr::nn::is<nom::repr::NeuralNetOperator>(b)) {
27 auto a_ = nom::repr::nn::get<nom::repr::NeuralNetOperator>(a);
28 auto b_ = nom::repr::nn::get<nom::repr::NeuralNetOperator>(b);
30 bool sameKind = a_->getKind() == b_->getKind();
31 if (sameKind && a_->getKind() == nom::repr::NeuralNetOperator::NNKind::GenericOperator) {
32 return a_->getName() == b_->getName();
44 unsigned int nextInt() {
45 seed_ =
A * seed_ +
C;
50 static const unsigned int A = 1103515245;
51 static const unsigned int C = 12345;
109 std::map<std::string, std::string> BBPrinter(
typename nom::repr::NNCFGraph::NodeRef node);
111 std::map<std::string, std::string> cfgEdgePrinter(
typename nom::repr::NNCFGraph::EdgeRef edge);
118 CAFFE2_API std::map<std::string, std::string> TestNodePrinter(
120 #endif // NOM_TESTS_TEST_UTIL_H
A simple graph implementation.