Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimizer reports "Unresolved value references" since v0.3.0 #28

Open
zhenhuaw-me opened this issue Nov 13, 2022 · 2 comments
Open

Optimizer reports "Unresolved value references" since v0.3.0 #28

zhenhuaw-me opened this issue Nov 13, 2022 · 2 comments
Assignees

Comments

@zhenhuaw-me
Copy link
Owner

Via pipeline https://github.com/zhenhuaw-me/onnxcli/actions/runs/3453474851/jobs/5764096907.

A simple model works no issue till optimizer v0.2.7 (verified locally), but starts to fail with optimizer v0.3.0 (verified locally) and still fail with v0.3.2 (the pipeline).

It's onnx optimize ./assets/tests/conv.float32.onnx optimized.onnx.

@zhenhuaw-me zhenhuaw-me self-assigned this Nov 13, 2022
@zhenhuaw-me
Copy link
Owner Author

Log

2022-11-13 12:15:29,988 D [testing][test_dispatcher.py:34] Running optimize ./assets/tests/conv.float32.onnx optimized.onnx
2022-11-13 12:15:29,988 D [onnxcli][dispatcher.py:25] Running ['optimize', './assets/tests/conv.float32.onnx', 'optimized.onnx']
2022-11-13 12:15:29,994 I [onnxcli][optimize.py:27] Running <Optimization> on model ./assets/tests/conv.float32.onnx
2022-11-13 12:15:30,483 W [onnxcli][optimize.py:38] No optimization passes specified, running all available passes: ['rename_input_output', 'set_unique_name_for_nodes', 'nop', 'eliminate_nop_cast', 'eliminate_nop_dropout', 'eliminate_nop_flatten', 'extract_constant_to_initializer', 'eliminate_if_with_const_cond', 'eliminate_nop_monotone_argmax', 'eliminate_nop_pad', 'eliminate_nop_expand', 'eliminate_shape_gather', 'eliminate_slice_after_shape', 'eliminate_nop_transpose', 'fuse_add_bias_into_conv', 'fuse_bn_into_conv', 'fuse_consecutive_concats', 'fuse_consecutive_log_softmax', 'fuse_consecutive_reduce_unsqueeze', 'fuse_consecutive_squeezes', 'fuse_consecutive_transposes', 'fuse_matmul_add_bias_into_gemm', 'fuse_pad_into_conv', 'fuse_pad_into_pool', 'fuse_transpose_into_gemm', 'replace_einsum_with_matmul', 'lift_lexical_references', 'split_init', 'split_predict', 'fuse_concat_into_reshape', 'eliminate_nop_reshape', 'eliminate_deadend', 'eliminate_identity', 'eliminate_shape_op', 'eliminate_unused_initializer', 'eliminate_duplicate_initializer']
Traceback (most recent call last):
  File "/Users/zhenhuaw/workspace/ONNX/onnxcli/tests/test_dispatcher.py", line 55, in <module>
    test_dispatch_core()
  File "/Users/zhenhuaw/workspace/ONNX/onnxcli/tests/test_dispatcher.py", line 36, in test_dispatch_core
    dispatch_core(shlex.split(cmd))
  File "/Users/zhenhuaw/workspace/ONNX/onnxcli/onnxcli/dispatcher.py", line 40, in dispatch_core
    args.func(args)
  File "/Users/zhenhuaw/workspace/ONNX/onnxcli/onnxcli/optimize.py", line 44, in run
    optimized = onnxoptimizer.optimize(model, passes)
  File "/Users/zhenhuaw/workspace/toolchain/runtime.git/python/venv/onnx/lib/python3.10/site-packages/onnxoptimizer/__init__.py", line 50, in optimize
    optimized_model_str = C.optimize(model_str, passes)
RuntimeError: Unresolved value references: Conv2D_bias,Variable/read,

@zhenhuaw-me
Copy link
Owner Author

Next to ping onnxoptimizer verion before it's resolved.

zhenhuaw-me added a commit that referenced this issue Nov 13, 2022
Via pipeline https://github.com/zhenhuaw-me/onnxcli/actions/runs/3453474851/jobs/5764096907.

A simple model works no issue till optimizer v0.2.7 (verified locally), but starts to fail with optimizer v0.3.0 (verified locally) and still fail with v0.3.2 (the pipeline).

It's onnx optimize ./assets/tests/conv.float32.onnx optimized.onnx.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant