microsoft / nnfusion

A flexible and efficient deep neural network (DNN) compiler that generates high-performance executable from a DNN model description.
MIT License
952 stars 158 forks source link

[BUG] Exception: Unknown symbilic dimension: seq_length #404

Closed Binyang2014 closed 2 years ago

Binyang2014 commented 2 years ago

File "/home/binyangli/nnfusion/build/src/tools/nnfusion/templates/onnx/ort_run_frozen.py", line 109, in ort_inputs.update({tensor.name: get_numpy(tensor)}) File "/home/binyangli/nnfusion/build/src/tools/nnfusion/templates/onnx/ort_run_frozen.py", line 73, in get_numpy check_shape(shape) File "/home/binyangli/nnfusion/build/src/tools/nnfusion/templates/onnx/ort_run_frozen.py", line 67, in check_shape raise Exception(f"Unknown symbilic dimension: {dim}") Exception: Unknown symbilic dimension: seq_length

jlxue commented 2 years ago

you can use -prams to specify missing dims. -params (-p, Model input shape and type, fot torchscript, it's full shape like "1,1:float;2,3,4,5:double", for onnx, it's dynamic dim like "dim1_name:4;dim2_name:128")