Error when splitting a Node

resnet-runtime: /home/bucky/Desktop/compiler/glow/include/qsnn/Support/Error.h:186: void glow::detail::CheckState<true>::ensureChecked() const: Assertion `checked_ && "Unchecked Error or Expected"' failed.
Aborted (core dumped)

I am facing this error and after a little debugging I understood that below line of code is responsible for the error. But couldnt figure out how to get rid of this error.
Also, I am only facing this error in debug mode, it runs fine in the release mode and produce correct results.

glow::splitNode(Node, SplitNodeByNumChunks({1}, {2}));

splitNode returns Expected<std::vector<Node *>> . So you need something like:

std::vector<Node *> splitNodes;
ASSIGN_VALUE_OR_FATAL(splitNodes, glow::splitNode(Node, SplitNodeByNumChunks({1}, {2})))

Even if you don’t need splitNodes. Or else you can handle the error using your own custom code, check Error.h for ASSIGN_VALUE_OR_FATAL and other options.

1 Like