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

UEP 4.1 release #11834

Merged
merged 13 commits into from
Jun 17, 2022
Merged

UEP 4.1 release #11834

merged 13 commits into from
Jun 17, 2022

Conversation

sfatimar
Copy link
Contributor

Update File Version Details in Onnxruntime_providers_openvino.dll
Update PyPi Package information for OpenVINO
Include Training Package in OpenVINO PyPi Package

Motivation and Context

  • This changes is required to ensure that we are able to host signed binaries in public domain
  • If it fixes an open issue, please link to the issue here.

@lgtm-com
Copy link

lgtm-com bot commented Jun 13, 2022

This pull request introduces 4 alerts when merging 02b90ff into 7582644 - view on LGTM.com

new alerts:

  • 1 for Use of the return value of a procedure
  • 1 for Unused local variable
  • 1 for Unused global variable
  • 1 for Module is imported with 'import' and 'import from'

@@ -15,6 +16,8 @@
from shutil import copyfile

from setuptools import Extension, setup
from setuptools.command.install import install as InstallCommandBase
from wheel.vendored.packaging.tags import sys_tags

nightly_build = False
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variables used in master. Should we change it to upper case or disable the pylint warning for this file

@@ -52,6 +55,7 @@ def parse_arg_remove_string(argv, arg_name_equal):
cuda_version = None
rocm_version = None
is_rocm = False
is_openvino = False
# The following arguments are mutually exclusive
if wheel_name_suffix == "gpu":
# TODO: how to support multiple CUDA versions?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning is thrown from the master branch comment. It should be safely ignored.

self._rewrite_ld_preload(to_preload)
self._rewrite_ld_preload_cuda(to_preload_cuda)
self._rewrite_ld_preload_tensorrt(to_preload_tensorrt)
_bdist_wheel.run(self)
if is_manylinux and not disable_auditwheel_repair:
if is_manylinux and not disable_auditwheel_repair and not is_openvino:
file = glob(path.join(self.dist_dir, "*linux*.whl"))[0]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.dist_dir is member of _bdist_wheel which gets its value during runtime. At compilation its set to None. Pylint is throwing error for adding path to dist_dir. Should we set a path to this member variable ?

setup.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
@lgtm-com
Copy link

lgtm-com bot commented Jun 14, 2022

This pull request introduces 4 alerts when merging ad8670a into f6d2b62 - view on LGTM.com

new alerts:

  • 1 for Use of the return value of a procedure
  • 1 for Unused local variable
  • 1 for Unused global variable
  • 1 for Module is imported with 'import' and 'import from'

@jywu-msft
Copy link
Member

preetha-intel

@preetha-intel can you see if these alerts can be addressed as well?

@jywu-msft
Copy link
Member

/azp run Linux OpenVINO CI Pipeline

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

setup.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
@lgtm-com
Copy link

lgtm-com bot commented Jun 15, 2022

This pull request introduces 1 alert when merging de834d5 into a805a49 - view on LGTM.com

new alerts:

  • 1 for Use of the return value of a procedure

@jywu-msft
Copy link
Member

please fix the Lint / Python format errors. there are still 3 or 4 issues left to fix.

@lgtm-com
Copy link

lgtm-com bot commented Jun 16, 2022

This pull request introduces 1 alert when merging 1a63a21 into 3f8c914 - view on LGTM.com

new alerts:

  • 1 for Use of the return value of a procedure

@jywu-msft
Copy link
Member

/azp run Linux OpenVINO CI Pipeline

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lgtm-com
Copy link

lgtm-com bot commented Jun 17, 2022

This pull request introduces 1 alert when merging d8e3843 into 10478a0 - view on LGTM.com

new alerts:

  • 1 for Use of the return value of a procedure

@sfatimar
Copy link
Contributor Author

@jywu-msft The pipelines failed with the same error. Can we modify the requirements.txt in https://github.com/intel/onnxruntime/blob/master/tools/ci_build/github/linux/docker/scripts/

Else we can find another solutions like modifying Dockerfile.ubuntu_openvino to install the wheel package directly...

@jywu-msft
Copy link
Member

@jywu-msft The pipelines failed with the same error. Can we modify the requirements.txt in https://github.com/intel/onnxruntime/blob/master/tools/ci_build/github/linux/docker/scripts/

Else we can find another solutions like modifying Dockerfile.ubuntu_openvino to install the wheel package directly...

I think you would need to update requirements.txt since that import would be invoked for all other python package builds right?
can you find the specific version of wheel that needs to be added to requirements.txt?

@sfatimar
Copy link
Contributor Author

@jywu-msft The pipelines failed with the same error. Can we modify the requirements.txt in https://github.com/intel/onnxruntime/blob/master/tools/ci_build/github/linux/docker/scripts/
Else we can find another solutions like modifying Dockerfile.ubuntu_openvino to install the wheel package directly...

I think you would need to update requirements.txt since that import would be invoked for all other python package builds right? can you find the specific version of wheel that needs to be added to requirements.txt?

@jywu-msft wheel>=0.35.1

@jywu-msft
Copy link
Member

@jywu-msft The pipelines failed with the same error. Can we modify the requirements.txt in https://github.com/intel/onnxruntime/blob/master/tools/ci_build/github/linux/docker/scripts/
Else we can find another solutions like modifying Dockerfile.ubuntu_openvino to install the wheel package directly...

I think you would need to update requirements.txt since that import would be invoked for all other python package builds right? can you find the specific version of wheel that needs to be added to requirements.txt?

@jywu-msft wheel>=0.35.1

make the change and i'll kick off the CI again

@jywu-msft
Copy link
Member

/azp run Linux OpenVINO CI Pipeline

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jywu-msft
Copy link
Member

/azp run Windows GPU TensorRT CI Pipeline, onnxruntime-binary-size-checks-ci-pipeline, onnxruntime-python-checks-ci-pipeline, orttraining-linux-ci-pipeline, orttraining-linux-gpu-ci-pipeline, orttraining-ortmodule-distributed

@jywu-msft
Copy link
Member

/azp run Linux CPU CI Pipeline, Linux CPU Minimal Build E2E CI Pipeline, Linux GPU CI Pipeline, Linux GPU TensorRT CI Pipeline, Linux Nuphar CI Pipeline, MacOS CI Pipeline, ONNX Runtime Web CI Pipeline, Windows CPU CI Pipeline, Windows GPU CI Pipeline

@azure-pipelines
Copy link

Azure Pipelines successfully started running 6 pipeline(s).

@azure-pipelines
Copy link

Azure Pipelines successfully started running 9 pipeline(s).

@lgtm-com
Copy link

lgtm-com bot commented Jun 17, 2022

This pull request introduces 1 alert when merging 3842635 into 4ac72e3 - view on LGTM.com

new alerts:

  • 1 for Use of the return value of a procedure

RUN yum -y install wget git

# libusb1.0.22
RUN cd /home/ && wget https://github.com/libusb/libusb/archive/v1.0.22.zip && \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

libusb is GPL. It implies obligations. I will consult our compliance team on whether we need to register this component to our security&compliance database or not. @jywu-msft , FYI.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to enable VPU for OpenVINO Execution Provider..

@@ -0,0 +1,82 @@
FROM quay.io/pypa/manylinux2014_x86_64:latest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So what is this file for? It looks like it is very different than the other docker files in this dir because it takes dependency on ORT code, and build arbitrary branches, not the current code. It makes feel that you put this file in wrong place.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is to build OpenVINO Execution Provider for ORT. Last time we needed to build a special branch but going forward we can build on master. Anyways the input branch is a Docker argument so by default we can keep it as master

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the other docker files in this directory do not do "git checkout https://github.com/Microsoft/onnxruntime". Why does this one need to?
And, for you information, I'm asked to remove all references to "quay.io/pypa/:". For now I will not touch this file. But I want to know more about this file, how is it used and how to test it when I need to make changes to it?

@@ -105,6 +105,7 @@ target_compile_definitions(onnxruntime PRIVATE VER_MINOR=${VERSION_MINOR_PART})
target_compile_definitions(onnxruntime PRIVATE VER_BUILD=${VERSION_BUILD_PART})
target_compile_definitions(onnxruntime PRIVATE VER_PRIVATE=${VERSION_PRIVATE_PART})
target_compile_definitions(onnxruntime PRIVATE VER_STRING=\"${VERSION_STRING}\")
target_compile_definitions(onnxruntime PRIVATE FILE_NAME=\"onnxruntime.dll\")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this change made? How does it relate to #11058 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change was needed because the onnxruntime.rc was hard coding onnxruntime.dll and we needed to change to ensure that filedetails for onnxruntime_providers_shared.dll were updated properly

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file was created by Microsoft Windows team, and it was specific for that use. You can see it claims the file is a part of Windows. But Windows does not ship onnxruntime_providers_shared.dll and the other DLLs.

@@ -794,7 +802,7 @@ if (onnxruntime_USE_OPENVINO)
endif()

source_group(TREE ${ONNXRUNTIME_ROOT}/core FILES ${onnxruntime_providers_openvino_cc_srcs})
onnxruntime_add_shared_library_module(onnxruntime_providers_openvino ${onnxruntime_providers_openvino_cc_srcs})
onnxruntime_add_shared_library_module(onnxruntime_providers_openvino ${onnxruntime_providers_openvino_cc_srcs} "${ONNXRUNTIME_ROOT}/core/dll/onnxruntime.rc")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't say Microsoft is the author of the OpenVino EP DLL. Unless it meets Microsoft compliance requirements, it can't be published under the name of Microsoft. For example, at very minimum Microsoft's legal team needs to know if this DLL contains any GPL code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess if it is breaking a security code we could create a new rc document for it. @jywu-msft can comment

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes is required to ensure that we are able to host signed binaries in public domain

I have concerns on this. You can't publish binaries under the name of Microsoft and let Microsoft sign the binaries, when Microsoft's security and compliance team doesn't know anything about the binaries. If you do both of the things with your company's identity, then I won't have any concern because it is your business.

Microsoft is signing the onnxruntime.dll and onnxruntime_providers_shared.dll and Intel is signing the onnxruntime_providers_openvino.dll... that is the current process... It is the one we are following with MSFT and communicated to George too...

will follow up about this offline.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess if it is breaking a security code we could create a new rc document for it. @jywu-msft can comment

this part seems like a problem then. it shouldn't be marked as created by microsoft.


if is_openvino and is_manylinux:

def get_tag(self):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this part is needed? manylinux's audithwheel tool only supports very a few tags(glibc verions). Here you force changing their tag, which means this code won't support most Linux distro versions. It would only work in very specific environments.

Why do you need to change the tag? Why can't let the docker image provide this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have training components also included so auditwheel repair is disabled. And we were not getting a manylinux tag if we did not run auditwheel repair

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you do not want to run auditwheel, you can see we have a flag to disable it.
When you want to run it, the tool get tag information from env. It uses AUDITWHEEL_PLAT environment variable as a default option to --plat. Usually the env is set correctly in manylinux docker images. So, may I know in which case you need to manually set it by using the information from ldd?


class InstallCommand(InstallCommandBase):
def finalize_options(self):
ret = InstallCommandBase.finalize_options(self)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this class is needed?
Our linter reports an error on this line. It says InstallCommandBase.finalize_options doesn't return any value.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we can try removing this and check if it works out...

@snnn
Copy link
Member

snnn commented Jul 13, 2022

This changes is required to ensure that we are able to host signed binaries in public domain

I have concerns on this. You can't publish binaries under the name of Microsoft and let Microsoft sign the binaries, when Microsoft's security and compliance team doesn't know anything about the binaries. If you do both of the things with your company's identity, then I won't have any concern because it is your business.

@sfatimar
Copy link
Contributor Author

This changes is required to ensure that we are able to host signed binaries in public domain

I have concerns on this. You can't publish binaries under the name of Microsoft and let Microsoft sign the binaries, when Microsoft's security and compliance team doesn't know anything about the binaries. If you do both of the things with your company's identity, then I won't have any concern because it is your business.

Microsoft is signing the onnxruntime.dll and onnxruntime_providers_shared.dll and Intel is signing the onnxruntime_providers_openvino.dll... that is the current process... It is the one we are following with MSFT and communicated to George too...

@sfatimar
Copy link
Contributor Author

The change will still stand because onnxruntime_providers_shared.dll had incorrect File Details Info

yan12125 added a commit to archlinuxcn/repo that referenced this pull request Jul 23, 2022
* Update Python dependencies following upstream [1].
* Rebase patches for devendoring after upstream changes [2].
* Avoid wheel.vendored, which is needed since [3] while devendored in
  Arch [4].

[1] microsoft/onnxruntime#11522
[2] microsoft/onnxruntime#11146
[3] microsoft/onnxruntime#11834
[4] archlinux/svntogit-community@e691288
archlinux-github pushed a commit to archlinux/aur that referenced this pull request Aug 2, 2022
* Update Python dependencies following upstream [1].
* Rebase patches for devendoring after upstream changes [2].
* Avoid wheel.vendored, which is needed since [3] while devendored in
  Arch [4].

[1] microsoft/onnxruntime#11522
[2] microsoft/onnxruntime#11146
[3] microsoft/onnxruntime#11834
[4] archlinux/svntogit-community@e691288
@sfatimar sfatimar deleted the UEP-4.1-Release branch October 23, 2024 16:13
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

Successfully merging this pull request may close these issues.

6 participants