-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
OpenVino add build_shared_lib flag in the build command #6560
Conversation
2021_1 indendation changes
add build shared lib flag
add build shared lib flag
/azp run Linux OpenVINO CI Pipeline |
Azure Pipelines successfully started running 1 pipeline(s). |
is it really necessary to change the dockerfiles? (which are for building python bindings/package) |
We have added build_shared_lib to build libonnxruntime.so as some developers found that it was easier to build C++ samples this way. |
Hello George. To build the CPP samples that are already available here https://github.com/microsoft/onnxruntime/tree/master/samples/c_cxx, we need the libonnxruntime.so shared lib to be linked while compiling along with two other shared libs (libonnxruntime_providers_shared.so and libonnxruntime_providers_openvino.so). Without this libonnxruntime.so lib, when we try compiling, it doesn't get compiled with this error. so, we thought of adding --build_shared_lib flag as default while compiling OpenVINO-EP, so that the developers won't have issues building CPP samples. we added the same flag inside the docker files which are for building python bindings/package because anyways the onnxruntime dir gets deleted as part of optimization at this line
so, if some user wants to use the same docker file to build CPP samples, all he has to do is remove this step. |
/azp run Linux CPU CI Pipeline,Linux CPU x64 NoContribops CI Pipeline,Linux GPU CI Pipeline,Linux GPU TensorRT CI Pipeline,MacOS CI Pipeline,MacOS NoContribops CI Pipeline,Windows CPU CI Pipeline,Windows GPU CI Pipeline,Windows GPU TensorRT CI Pipeline |
Azure Pipelines successfully started running 9 pipeline(s). |
yes, understood that the CPP sample needs the libonnxruntime.so |
ok i missed your comment that the user would need to manually leave out the step which removes the build directory. |
I think what they mean is that some user reuse same docker file for development, the developer will comment out the line which delete the build directory. For normal user build docker image directly from the original docker file, they won't aware of the libonnxruntime.so file since it will be deleted anyway. |
/azp run orttraining-linux-ci-pipeline,orttraining-mac-ci-pipeline,orttraining-linux-gpu-ci-pipeline,centos7_cpu,Linux CPU Minimal Build E2E CI Pipeline,Linux Nuphar CI Pipeline,MacOS NoContribops CI Pipeline,orttraining-distributed |
Azure Pipelines successfully started running 8 pipeline(s). |
Right Hector. This is the main reason, we added the option in the docker file. so, that we don't have to explicitly tell the user every time that they need to add this flag themselves if they want to work with CPP samples. |
We were not able to build C++ samples without build_shared_lib flag in the build command.
Motivation and Context