wespeaker icon indicating copy to clipboard operation
wespeaker copied to clipboard

Segmentation fault during MNN Model export

Open MarcoMultichannel opened this issue 1 year ago • 5 comments

I get a "segmentation fault" when I try to convert the ONNX model in MNN model:

MNNConvert -f ONNX --modelFile voxceleb_resnet34.onnx --MNNModel model.mnn --bizCode MNN
The device support i8sdot:0, support fp16:0, support i8mm: 0
Start to Convert Other Model Format To MNN Model..., target version: 2.8
[13:09:33] /home/user/MNN-976d1d7c0f916ea8a7acc3d31352789590f00b18/tools/converter/source/onnx/onnxConverter.cpp:46: ONNX Model ir version: 7
[13:09:33] /home/user/MNN-976d1d7c0f916ea8a7acc3d31352789590f00b18/tools/converter/source/onnx/onnxConverter.cpp:47: ONNX Model opset version: 14
Start to Optimize the MNN Net...
Segmentation fault

It happens both with and without --saveStaticModel. The model used is the pretrained model available, but I tried exporting a model using the updated export_onnx.py script and the problem persists. The MNN version and flags are the same as defined in the CMakeFiles.txt.

MarcoMultichannel avatar May 13 '24 11:05 MarcoMultichannel

@cdliang11 Pls follow this.

JiJiJiang avatar May 14 '24 03:05 JiJiJiang

mnn version:

MNN    2.8.3

Try exporting the model using export_mnn.py.

cdliang11 avatar Oct 31 '24 11:10 cdliang11

Still segmentation fault. If I try to export the model using export_mnn.py it doesn't find the executable "MNNConvert", since it calls MNNConvert using os.system.

How can I compile MNN to recreate the same environment of the test? I'm starting to think that I'm not compiling it properly.

MarcoMultichannel avatar Nov 12 '24 13:11 MarcoMultichannel

Still segmentation fault. If I try to export the model using export_mnn.py it doesn't find the executable "MNNConvert", since it calls MNNConvert using os.system.

How can I compile MNN to recreate the same environment of the test? I'm starting to think that I'm not compiling it properly.

try: pip install MNN

cdliang11 avatar Nov 13 '24 06:11 cdliang11

I managed to convert the model without a segmentation fault happening. I installed mnn with pip install MNN as you said and then instead of using MMNConvert I executed the python version:

python -m mnnconvert -f ONNX --modelFile model.onnx --MNNModel model.mnn --bizCode MNN

MarcoMultichannel avatar Nov 13 '24 15:11 MarcoMultichannel