microsoft / microsoft/onnxruntime

build params --build_shared_lib and --enable_language_interop_ops

Open
#5,999 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

contributions welcome
Dominant language
C++
Stars
21.9k
Forks
4.2k
Avg merge
4d 11h
Merged PRs (30d)
184

Description

hello

I want to use onnxruntime1.5.1 to infer onnx models which have PyOp nodes.
So i build onnxruntime with command `./build.sh --config RelWithDebInfo --enable_language_interop_ops --build_wheel` as you recommended [here](https://github.com/microsoft/onnxruntime/issues/3164). I found the library file **onnxruntime_pybind11_state.so** was generated in **onnxtuneime/build/Linux/RelWithDebInfo**.

But if i build onnxruntime with command `./build.sh --config RelWithDebInfo --build_shared_lib --build_wheel`, only **libonnxruntime.so.1.5.1** was generated rather than **onnxruntime_pybind11_state.so**.

The two files are about the same size.So i want to know
1.what is the difference bewteen the two files.
2.whether i can infer onnx models with PyOp nodes using just **libonnxruntime.so.1.5.1** or not.
3.Why different library was generated when i enable --enable_language_interop_ops or --enable build_shared_lib.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with build.sh and compare the --enable_language_interop_ops and --build_shared_lib paths that produce onnxruntime_pybind11_state.so and libonnxruntime.so.1.5.1. Trace the relevant build configuration and Python wheel entry points, then document the files' roles, PyOp support, and why the flags produce different artifacts.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
build-system, machine-learning
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.