pytorch / glow

Compiler for Neural Network hardware accelerators
Apache License 2.0
3.21k stars 688 forks source link

Floating point exception (core dumped) for the resnet50-v2 model #5388

Open ravishk1 opened 3 years ago

ravishk1 commented 3 years ago

I tried to compile the model (resnet50-v2-7.onnx) which I downloaded from ONNX-ZOO. When I just compiled the model, by command ./model-compiler -backend=CPU -model=resnet50-v2-7.onnx -emit-bundle/ -bundle-api=dynamic It runs perfectly fine, but when I compiled it after creating the profile, by command

_./image-classifier cat285.png -image-mode=0to1 -model=resnet50-v2-7.onnx -dump-profile=profile.yml -model-input-name=data ./model-compiler -backend=CPU -model=resnet50-v2-7.onnx -emit-bundle=bundle2/ -bundle-api=dynamic -load-profile=profile.yml -relocation-model=pic

It produces an error, Floating point exception (core dumped)

What can be the problem? It's clear that the profiler is creating the problem in some node, but how this error can be resolved?

jfix71 commented 3 years ago

Hi @ravishk1, It’s hard to say what the problem could be without more details. Can you compile in debug mode/run in a debugger to get a stack trace?

wangshankun commented 3 years ago

-keep-original-precision-for-nodes=Add,Sub,Mul,Div,Exp,SoftMax

wangshankun commented 3 years ago

-keep-original-precision-for-nodes=Div