I don’t know if this is the right place to post this, but I’m new to MLIR. I’m trying to lower a MobileNet V1 model to LLVM IR. Here are the steps I’ve followed so far:
(1) Translate from model.pbtxt to tf_executor Dialect
tf-mlir-translate – --graphdef-to-mlir ${PWD}/mobilenetv1_graph.pbtxt -o ${PWD}/mobilenet.mlir
I can’t see your code exactly, but when I run a pass and the entire IR disappears, it usually means that the values were determined to be “dead” (unused) and deleted by the canonicalizer pass.
Perhaps your input mlir model should return the final computed value from main, to avoid that? It might also help to post a link to the mlir code just before the pass that breaks things.
Yes, it looks like your main function returns nothing, and the functions defined within are marked private and not called. So a canonicalizer would delete them as unused. I am not familiar with the pipelines you’re calling, but I imagine you could continue if your IR used the functions and returned a value from main.