NodeSplitting SegFault

splitNode method throws segfault. I am in “Debug” mode, and using “resnet-runtime” network as the input.

In my case, the segfault occured when dealing Maxpool and AvgPool nodes.

for (auto &node : F->getNodes())
    {
      if (node.getUsers().size() == 0 || static_cast<std::string>(node.getKindName()) == "Convolution")
      {
        continue;
      }
      std::vector<glow::Node *> splitNodes;
      auto dims = node.dims(0);
      if(dims.size() == 4)
      {
        if(dims[3]/VW > 1)
        {
          std::cout << static_cast<std::string>(node.getName()) << "\n";
          ASSIGN_VALUE_OR_FATAL(splitNodes, glow::splitNode(&node, SplitNodeByNumChunks({ShapeNHWC::DimC},{dims[3]/VW})));
        }
      }       
    }```

Thanks for reporting this. Can you file an issue on Github with what you have here, and tag mciprian13, who is the original author of much of the splitNode infra?

https://github.com/pytorch/glow/issues/5789