From e2d39fec68d00ce10fa103ef01c1253f60b487a5 Mon Sep 17 00:00:00 2001 From: Surya Siddharth Pemmaraju Date: Tue, 22 Aug 2023 03:24:16 -0700 Subject: [PATCH] Added openvino/torch folder for simplyfing the import (#19281) --- .../src/openvino/frontend/pytorch/torchdynamo/backend.py | 2 +- src/bindings/python/src/openvino/torch/__init__.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 src/bindings/python/src/openvino/torch/__init__.py diff --git a/src/bindings/python/src/openvino/frontend/pytorch/torchdynamo/backend.py b/src/bindings/python/src/openvino/frontend/pytorch/torchdynamo/backend.py index d466faf1037..371d3fae131 100644 --- a/src/bindings/python/src/openvino/frontend/pytorch/torchdynamo/backend.py +++ b/src/bindings/python/src/openvino/frontend/pytorch/torchdynamo/backend.py @@ -36,7 +36,7 @@ log = logging.getLogger(__name__) We can then use this model for inference. We only need to add two lines of code to the Pytorch applications which are marked in the code below - 1) import openvino.frontend.pytorch.torchdynamo.backend + 1) import openvino.torch model = torchvision.models.resnet50() 2) model = torch.compile(model, backend="openvino") """ diff --git a/src/bindings/python/src/openvino/torch/__init__.py b/src/bindings/python/src/openvino/torch/__init__.py new file mode 100644 index 00000000000..f2c246fd827 --- /dev/null +++ b/src/bindings/python/src/openvino/torch/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2018-2023 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +from openvino.frontend.pytorch.torchdynamo import backend