Added torchdynamo backend entry point in package setup (#24178)

With this change, users don't have to add "import openvino.torch" in
their applications. Providing torch.compile(model, backend="openvino")
automatically imports the necessary modules. This simplifies the user
experience and enables PT2 based benchmarking OOB without any changes. .

More information can be found here:
https://github.com/pytorch/pytorch/pull/124536

JIRA: CVS-139370

---------

Co-authored-by: Surya Siddharth Pemmaraju <surya.siddharth.pemmaraju@intel.com>
This commit is contained in:
Yamini Nimmagadda 2024-05-13 11:51:12 -07:00 committed by GitHub
parent 2fc628ab2a
commit fa9d519bc2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 1 deletions

View File

@ -621,6 +621,7 @@ def find_entry_points(install_cfg):
"""Creates a list of entry points for OpenVINO runtime package."""
entry_points = {
"console_scripts": [],
"torch_dynamo_backends": ["openvino=openvino.frontend.pytorch.torchdynamo.backend:openvino"],
}
for comp_info in install_cfg.values():
empty_point = comp_info.get("entry_point")

View File

@ -15,7 +15,6 @@ from openvino.runtime import Core, Type, PartialShape
import openvino.properties.hint as hints
import torch
from packaging import version
import openvino.torch
import pytest
def skip_if_export(param, reason="Unsupported on torch.export"):