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