{"id":94112,"date":"2022-12-01T08:00:00","date_gmt":"2022-12-01T16:00:00","guid":{"rendered":""},"modified":"2023-03-14T13:34:21","modified_gmt":"2023-03-14T20:34:21","slug":"faster-inference-for-pytorch-models-with-openvino-integration-with-torch-ort","status":"publish","type":"post","link":"https:\/\/opensource.microsoft.com\/blog\/2022\/12\/01\/faster-inference-for-pytorch-models-with-openvino-integration-with-torch-ort\/","title":{"rendered":"Faster inference for PyTorch models with OpenVINO Integration with Torch-ORT"},"content":{"rendered":"\n<p>Deep learning models are everywhere without us even realizing it. The number of AI use cases have been increasing exponentially with the rapid development of new algorithms, cheaper compute, and greater access to data. Almost every industry has deep learning applications, from healthcare to education to manufacturing, construction, and beyond.&nbsp;Many developers opt to use popular AI Frameworks like PyTorch, which simplifies the process of analyzing predictions, training models, leveraging data, and refining future results.<\/p>\n\n\n<div class=\"wp-block-msxcm-cta-block theme-dark\" data-moray data-bi-an=\"CTA Block\">\n\t<div class=\"card d-block mx-ng mx-md-0\">\n\t\t<div class=\"row no-gutters bg-gray-800 text-white\">\n\n\t\t\t\t\t\t\t<div class=\"col-md-4\">\n\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"577\" src=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2022\/11\/PreviewImage-2-1024x577.png\" class=\"card-img img-object-cover\" alt=\"Open Source CTA image\" srcset=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2022\/11\/PreviewImage-2-1024x577.png 1024w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2022\/11\/PreviewImage-2-300x169.png 300w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2022\/11\/PreviewImage-2-768x433.png 768w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2022\/11\/PreviewImage-2-235x132.png 235w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2022\/11\/PreviewImage-2-960x540.png 960w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2022\/11\/PreviewImage-2-800x451.png 800w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2022\/11\/PreviewImage-2-400x225.png 400w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2022\/11\/PreviewImage-2-450x254.png 450w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2022\/11\/PreviewImage-2-650x366.webp 650w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2022\/11\/PreviewImage-2.webp 1038w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/>\t\t\t\t<\/div>\n\t\t\t\n\t\t\t<div class=\"d-flex col-md\">\n\t\t\t\t<div class=\"card-body align-self-center p-4 p-md-5\">\n\t\t\t\t\t\n\t\t\t\t\t<h2>PyTorch on Azure<\/h2>\n\n\t\t\t\t\t<div class=\"mb-3\">\n\t\t\t\t\t\t<p>Get an enterprise-ready PyTorch experience in the cloud.<\/p>\n\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"link-group\">\n\t\t\t\t\t\t\t<a href=\"https:\/\/azure.microsoft.com\/en-us\/resources\/developers\/pytorch\/#what-is-pytorch\" class=\"btn btn-link text-decoration-none p-0 text-light-blue\" target=\"_blank\">\n\t\t\t\t\t\t\t\t<span>Learn more<\/span>\n\t\t\t\t\t\t\t\t<span class=\"glyph-append glyph-append-chevron-right glyph-append-xsmall\"><\/span>\n\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t<\/div>\n\n\t\t\t\t\t<\/div>\n\t<\/div>\n<\/div>\n\n\n\n<p><a href=\"http:\/\/pytorch.org\">PyTorch&nbsp;<\/a>is a&nbsp;machine learning&nbsp;framework used for applications such as&nbsp;computer vision&nbsp;and&nbsp;natural language processing, originally developed by&nbsp;Meta AI&nbsp;and now a part of the&nbsp;Linux Foundation&nbsp;umbrella, under the name of PyTorch Foundation. PyTorch has a powerful,&nbsp;<a href=\"https:\/\/pytorch.org\/docs\/stable\/jit.html?fbclid=IwAR30U-aGyFiqjRxE3z_DICq3FnkTTMaeFzzbRlfV6XC3REZw3bJAQuJNNHk\" target=\"_blank\" rel=\"noreferrer noopener\">TorchScript-based<\/a>&nbsp;implementation that transforms the model from eager to graph mode for deployment scenarios.<\/p>\n\n\n\n<p>One of the biggest challenges PyTorch developers face in their deep learning projects is model optimization and performance. Oftentimes, the question arises: How can I improve the performance of my PyTorch models? As you might have read in our previous blog, <a href=\"https:\/\/medium.com\/openvino-toolkit\/streamline-pytorch-with-intel-openvino-integration-with-torch-ort-a098358ef2e2\" target=\"_blank\" rel=\"noreferrer noopener\">Intel\u00ae and Microsoft have joined hands<\/a> to tackle this problem with <a href=\"https:\/\/github.com\/pytorch\/ort#-inference\" target=\"_blank\" rel=\"noreferrer noopener\">OpenVINO\u2122 Integration with Torch-ORT<\/a>. Initially, Microsoft had released <a href=\"https:\/\/github.com\/pytorch\/ort\" target=\"_blank\" rel=\"noreferrer noopener\">Torch-ORT<\/a>, which focused on accelerating PyTorch model training using ONNX Runtime. Recently, this capability was extended to accelerate PyTorch model inferencing by using the <a href=\"https:\/\/www.intel.com\/content\/www\/us\/en\/developer\/tools\/openvino-toolkit\/overview.html\" target=\"_blank\" rel=\"noreferrer noopener\">OpenVINO\u2122 toolkit<\/a> on Intel\u00ae central processing unit (CPU), graphical processing unit (GPU), and video processing unit (VPU)&nbsp;with just two lines of code.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"338\" src=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2022\/11\/Picture1.jpg\" alt=\"diagram\" class=\"wp-image-94146\" \/><figcaption class=\"wp-element-caption\"><em>Figure 1: OpenVINO\u2122 Integration with Torch-ORT Application Flow. This figure shows how OpenVINO\u2122 Integration with Torch-ORT can be used in a Computer Vision Application.<\/em><\/figcaption><\/figure>\n\n\n\n<p>By adding just two lines of code, we achieved 2.15 times faster inference for PyTorch Inception V3 model on an 11<sup>th<\/sup> Gen Intel\u00ae Core\u2122 i7 processor<sup>1<\/sup>. In addition to Inception V3, we also see performance gains for many popular PyTorch models such as ResNet50, Roberta-Base, and more. Currently, OpenVINO\u2122 Integration with Torch-ORT supports over 120 <a href=\"https:\/\/github.com\/pytorch\/ort\/blob\/main\/torch_ort_inference\/docs\/MODELS.md\" target=\"_blank\" rel=\"noreferrer noopener\">PyTorch models<\/a> from popular model zoo\u2019s, like Torchvision and Hugging Face.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"936\" height=\"389\" src=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2022\/11\/Picture2.jpg\" alt=\"Performance graph comparing PyTorch models with OpenVINO integration with Torch-ORT for Resnet50, VGG16, Inception3, Roberta-Base, Bert-base-uncased, YOLOv7.\" class=\"wp-image-94114\" srcset=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2022\/11\/Picture2.jpg 936w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2022\/11\/Picture2-300x125.jpg 300w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2022\/11\/Picture2-768x319.jpg 768w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2022\/11\/Picture2-800x332.jpg 800w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2022\/11\/Picture2-400x166.jpg 400w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2022\/11\/Picture2-450x187.jpg 450w, https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2022\/11\/Picture2-650x270.jpg 650w\" sizes=\"auto, (max-width: 936px) 100vw, 936px\" \/><figcaption class=\"wp-element-caption\"><em>Figure 2: FP32 Model Performance of OpenVINO\u2122 Integration with Torch-ORT as compared to PyTorch. This chart shows average inference latency (in milliseconds) for 100 runs after 15 warm-up iterations on an 11th Gen Intel(R) Core (TM) i7-1185G7 @ 3.00GHz.<\/em><\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Features<\/h2>\n\n\n\n<p>OpenVINO\u2122 Integration with Torch-ORT introduces the following features:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Inline conversion of static\/dynamic input shape models<\/li>\n\n\n\n<li>Graph partitioning<\/li>\n\n\n\n<li>Support for INT8 models<\/li>\n\n\n\n<li>Dockerfiles\/Docker Containers<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Inline conversion of static\/dynamic input shape models<\/h3>\n\n\n\n<p>OpenVINO\u2122 Integration with Torch-ORT performs inferencing of PyTorch models by converting these models to ONNX inline and subsequently performing inference with <a href=\"https:\/\/onnxruntime.ai\/docs\/execution-providers\/OpenVINO-ExecutionProvider.html\" target=\"_blank\" rel=\"noreferrer noopener\">OpenVINO\u2122 Execution Provider<\/a>. Currently, both static and dynamic&nbsp;input shape models are supported with OpenVINO\u2122 Integration with Torch-ORT. You also have the ability to save the inline exported ONNX model using the <a href=\"https:\/\/github.com\/pytorch\/ort\/blob\/main\/torch_ort_inference\/docs\/usage.md\" target=\"_blank\" rel=\"noreferrer noopener\">DebugOptions<\/a> API.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Graph partitioning<\/h3>\n\n\n\n<p>OpenVINO\u2122 Integration with Torch-ORT supports many PyTorch models by leveraging the existing graph partitioning feature from ONNX Runtime. With this feature, the input model graph is divided into subgraphs depending on the operators supported by OpenVINO and the OpenVINO-compatible subgraphs run using OpenVINO\u2122 Execution Provider and unsupported operators fall back to MLAS CPU Execution Provider.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Support for INT8 models<\/h3>\n\n\n\n<p>OpenVINO\u2122 Integration with Torch-ORT extends the support for lower precision inference through post-training quantization (PTQ) technique. Using <a href=\"https:\/\/github.com\/openvinotoolkit\/nncf\/tree\/develop\/examples\/experimental\/torch\" target=\"_blank\" rel=\"noreferrer noopener\">PTQ<\/a>, developers can quantize their PyTorch models with <a href=\"https:\/\/github.com\/openvinotoolkit\/nncf\" target=\"_blank\" rel=\"noreferrer noopener\">Neural Network Compression Framework<\/a> (NNCF) and then run inferencing with OpenVINO\u2122 Integration with Torch-ORT. <strong>Note: <\/strong>Currently, our INT8 model support is in the early stages, only including <a href=\"https:\/\/github.com\/openvinotoolkit\/openvino_notebooks\/tree\/main\/notebooks\/112-pytorch-post-training-quantization-nncf\" target=\"_blank\" rel=\"noreferrer noopener\">ResNet50<\/a> and MobileNetv2.&nbsp;We are continuously expanding our INT8 model coverage.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Docker Containers<\/h3>\n\n\n\n<p>You can now use OpenVINO\u2122 Integration with Torch-ORT on Mac OS and Windows OS through Docker. Pre-built <a href=\"https:\/\/hub.docker.com\/r\/openvino\/torch_ort_infer_ubuntu18\" target=\"_blank\" rel=\"noreferrer noopener\">Docker images<\/a> are readily available on Docker Hub for your convenience. With a simple docker pull, you will now be able to unleash the key to accelerating performance of PyTorch models. To build the docker image yourself, you can also find <a href=\"https:\/\/github.com\/pytorch\/ort\/tree\/main\/torch_ort_inference\/docker\" target=\"_blank\" rel=\"noreferrer noopener\">dockerfiles<\/a> readily available on Github.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Customer story<\/h2>\n\n\n\n<p><strong>Roboflow<\/strong>\u2014<a href=\"https:\/\/roboflow.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Roboflow<\/a> empowers ISVs to build their own computer vision applications and enables hundreds of thousands of developers with a rich catalog of services, models, and frameworks to further optimize their AI workloads on a variety of different Intel\u00ae hardware. An easy-to-use developer toolkit to accelerate models, properly integrated with AI frameworks, such as OpenVINO\u2122 integration with Torch-ORT provides the best of both worlds\u2014an increase in inference speed as well as the ability to reuse already created AI application code with minimal changes. The Roboflow team has showcased a <a href=\"https:\/\/blog.roboflow.com\/accelerate-pytorch-openvino-torch-ort\/\" target=\"_blank\" rel=\"noreferrer noopener\">case study<\/a> that demonstrates performance gains with OpenVINO\u2122 Integration with Torch-ORT as compared to Native PyTorch for YOLOv7 model on Intel\u00ae CPU. The Roboflow team is continuing to actively test OpenVINO\u2122 integration with Torch-ORT with the goal of enabling PyTorch developers in the Roboflow Community.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Try it out<\/h2>\n\n\n\n<p>Try out OpenVINO\u2122 Integration with Torch-ORT through a collection of <a href=\"https:\/\/github.com\/pytorch\/ort\/tree\/main\/torch_ort_inference\/demos\/notebooks\" target=\"_blank\" rel=\"noreferrer noopener\">Jupyter Notebooks<\/a>. Through these sample tutorials, you will see how to install OpenVINO\u2122 Integration with Torch-ORT and accelerate performance for PyTorch models with just two additional lines of code. Stay in the PyTorch framework and leverage OpenVINO\u2122 optimizations\u2014it doesn\u2019t get much easier than this.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Learn more<\/h2>\n\n\n\n<p>Here is a list of resources to help you learn more:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/github.com\/pytorch\/ort#accelerate-inference-for-pytorch-models-with-onnx-runtime-preview\" target=\"_blank\" rel=\"noreferrer noopener\">Github Repository<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/pytorch\/ort\/tree\/main\/torch_ort_inference\/demos\/notebooks\" target=\"_blank\" rel=\"noreferrer noopener\">Sample Notebooks<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/pytorch\/ort\/blob\/main\/torch_ort_inference\/docs\/MODELS.md\" target=\"_blank\" rel=\"noreferrer noopener\">Supported Models<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/pytorch\/ort\/blob\/main\/torch_ort_inference\/docs\/usage.md\" target=\"_blank\" rel=\"noreferrer noopener\">Usage Guide<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/azure.microsoft.com\/resources\/developers\/pytorch\/#what-is-pytorch\">PyTorch on Azure<\/a><\/li>\n<\/ul>\n\n\n\n<p><strong><em>Notes:<\/em><\/strong><\/p>\n\n\n\n<p><em><sup>1<\/sup>Framework configuration: ONNXRuntime 1.13.1<br>Application configuration: torch_ort_infer 1.13.1, python timeit module for timing inference of models<\/em><br><em>Input: Classification models: torch.Tensor; NLP models: Masked sentence; OD model: .jpg image<br>Application Metric: Average Inference latency for 100 iterations calculated after 15 warmup iterations<br>Platform: Tiger Lake<br>Number of Nodes: 1 Numa Node<br>Number of Sockets: 1<br>CPU or Accelerator: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz<br>Cores\/socket, Threads\/socket or EU\/socket: 4, 2 Threads\/Core<br>ucode: 0xa4<br>HT: Enabled<br>Turbo: Enabled<br>BIOS Version: TNTGLV57.9026.2020.0916.1340<br>System DDR Mem Config: slots \/ cap \/ run-speed: 2\/32 GB\/2667 MT\/s<br>Total Memory\/Node (DDR+DCPMM): 64GB<br>Storage \u2013 boot: Sabrent Rocket 4.0 500GB &#8211; size: 465.8G<br>OS: Ubuntu 20.04.4 LTS<br>Kernel: 5.15.0-1010-intel-iotg<\/em><\/p>\n\n\n\n<p><strong><em>Notices and disclaimers:<\/em><\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><em>Performance varies by use, configuration, and other factors. Learn more at <a href=\"http:\/\/www.Intel.com\/PerformanceIndex\" target=\"_blank\" rel=\"noreferrer noopener\">www.Intel.com\/PerformanceIndex<\/a>.<\/em><\/li>\n\n\n\n<li><em>Performance results are based on testing as of dates shown in configurations and may not reflect all publicly available updates. See backup for configuration details. No product or component can be absolutely secure.<\/em><\/li>\n\n\n\n<li><em>Your costs and results may vary.<\/em><\/li>\n\n\n\n<li>Intel technologies may require enabled hardware, software, or service activation.<\/li>\n\n\n\n<li><em>Intel disclaims all express and implied warranties, including without limitation, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement, as well as any warranty arising from a course of performance, course of dealing, or usage in trade.<\/em><\/li>\n\n\n\n<li><em>Results have been estimated or simulated.<\/em><\/li>\n\n\n\n<li><em>\u00a9 Intel Corporation. Intel, the Intel logo, OpenVINO\u2122, and the OpenVINO\u2122 logo are trademarks of Intel Corporation or its subsidiaries. Other names and brands may be claimed as the property of others.<\/em><\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Many developers opt to use popular AI Frameworks like PyTorch, which simplifies the process of analyzing predictions, training models, leveraging data, and refining future results.<\/p>\n","protected":false},"author":6194,"featured_media":95478,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"msxcm_post_with_no_image":false,"ep_exclude_from_search":false,"_classifai_error":"","_classifai_text_to_speech_error":"","footnotes":""},"post_tag":[],"content-type":[361],"topic":[],"programming-languages":[],"coauthors":[1970,1971,1969,1839],"class_list":["post-94112","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","content-type-project-updates","review-flag-1593580428-734","review-flag-1593580419-521","review-flag-1-1593580432-963","review-flag-2-1593580437-411","review-flag-3-1593580442-169","review-flag-4-1593580448-609","review-flag-5-1593580453-725","review-flag-fall-1593580732-697","review-flag-lever-1593580265-989","review-flag-new-1593580248-669"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Faster inference for PyTorch models with OpenVINO Integration with Torch-ORT | Microsoft Open Source Blog<\/title>\n<meta name=\"description\" content=\"Use ONNX Runtime and Intel OpenVINO to speed up inference of PyTorch deep learning models.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/opensource.microsoft.com\/blog\/2022\/12\/01\/faster-inference-for-pytorch-models-with-openvino-integration-with-torch-ort\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Faster inference for PyTorch models with OpenVINO Integration with Torch-ORT | Microsoft Open Source Blog\" \/>\n<meta property=\"og:description\" content=\"Use ONNX Runtime and Intel OpenVINO to speed up inference of PyTorch deep learning models.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/opensource.microsoft.com\/blog\/2022\/12\/01\/faster-inference-for-pytorch-models-with-openvino-integration-with-torch-ort\/\" \/>\n<meta property=\"og:site_name\" content=\"Microsoft Open Source Blog\" \/>\n<meta property=\"article:published_time\" content=\"2022-12-01T16:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-03-14T20:34:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2022\/11\/PreviewImage-3.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1038\" \/>\n\t<meta property=\"og:image:height\" content=\"692\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Sai Jayanthi, Vishnudas Thaniel S., Devang Aggarwal, Natalie Kershaw\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2022\/11\/PreviewImage-3.png\" \/>\n<meta name=\"twitter:creator\" content=\"@OpenAtMicrosoft\" \/>\n<meta name=\"twitter:site\" content=\"@OpenAtMicrosoft\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sai Jayanthi, Vishnudas Thaniel S., Devang Aggarwal, Natalie Kershaw\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 min read\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/2022\/12\/01\/faster-inference-for-pytorch-models-with-openvino-integration-with-torch-ort\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/2022\/12\/01\/faster-inference-for-pytorch-models-with-openvino-integration-with-torch-ort\/\"},\"author\":[{\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/author\/sai-jayanthi\/\",\"@type\":\"Person\",\"@name\":\"Sai Jayanthi\"},{\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/author\/vishnudas-thaniel-s\/\",\"@type\":\"Person\",\"@name\":\"Vishnudas Thaniel S.\"},{\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/author\/devang-aggarwal\/\",\"@type\":\"Person\",\"@name\":\"Devang Aggarwal\"},{\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/author\/natalie-kershaw\/\",\"@type\":\"Person\",\"@name\":\"Natalie Kershaw\"}],\"headline\":\"Faster inference for PyTorch models with OpenVINO Integration with Torch-ORT\",\"datePublished\":\"2022-12-01T16:00:00+00:00\",\"dateModified\":\"2023-03-14T20:34:21+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/2022\/12\/01\/faster-inference-for-pytorch-models-with-openvino-integration-with-torch-ort\/\"},\"wordCount\":1132,\"publisher\":{\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/2022\/12\/01\/faster-inference-for-pytorch-models-with-openvino-integration-with-torch-ort\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2024\/06\/MSC17_catapult_009.webp\",\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/2022\/12\/01\/faster-inference-for-pytorch-models-with-openvino-integration-with-torch-ort\/\",\"url\":\"https:\/\/opensource.microsoft.com\/blog\/2022\/12\/01\/faster-inference-for-pytorch-models-with-openvino-integration-with-torch-ort\/\",\"name\":\"Faster inference for PyTorch models with OpenVINO Integration with Torch-ORT | Microsoft Open Source Blog\",\"isPartOf\":{\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/2022\/12\/01\/faster-inference-for-pytorch-models-with-openvino-integration-with-torch-ort\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/2022\/12\/01\/faster-inference-for-pytorch-models-with-openvino-integration-with-torch-ort\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2024\/06\/MSC17_catapult_009.webp\",\"datePublished\":\"2022-12-01T16:00:00+00:00\",\"dateModified\":\"2023-03-14T20:34:21+00:00\",\"description\":\"Use ONNX Runtime and Intel OpenVINO to speed up inference of PyTorch deep learning models.\",\"breadcrumb\":{\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/2022\/12\/01\/faster-inference-for-pytorch-models-with-openvino-integration-with-torch-ort\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/opensource.microsoft.com\/blog\/2022\/12\/01\/faster-inference-for-pytorch-models-with-openvino-integration-with-torch-ort\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/2022\/12\/01\/faster-inference-for-pytorch-models-with-openvino-integration-with-torch-ort\/#primaryimage\",\"url\":\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2024\/06\/MSC17_catapult_009.webp\",\"contentUrl\":\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2024\/06\/MSC17_catapult_009.webp\",\"width\":1170,\"height\":640},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/2022\/12\/01\/faster-inference-for-pytorch-models-with-openvino-integration-with-torch-ort\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/opensource.microsoft.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Faster inference for PyTorch models with OpenVINO Integration with Torch-ORT\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/#website\",\"url\":\"https:\/\/opensource.microsoft.com\/blog\/\",\"name\":\"Microsoft Open Source Blog\",\"description\":\"Open dialogue about openness at Microsoft \u2013 open source, standards, interoperability\",\"publisher\":{\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/opensource.microsoft.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/#organization\",\"name\":\"Microsoft Open Source Blog\",\"url\":\"https:\/\/opensource.microsoft.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/08\/Microsoft-Logo.png\",\"contentUrl\":\"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/08\/Microsoft-Logo.png\",\"width\":259,\"height\":194,\"caption\":\"Microsoft Open Source Blog\"},\"image\":{\"@id\":\"https:\/\/opensource.microsoft.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/OpenAtMicrosoft\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Faster inference for PyTorch models with OpenVINO Integration with Torch-ORT | Microsoft Open Source Blog","description":"Use ONNX Runtime and Intel OpenVINO to speed up inference of PyTorch deep learning models.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/opensource.microsoft.com\/blog\/2022\/12\/01\/faster-inference-for-pytorch-models-with-openvino-integration-with-torch-ort\/","og_locale":"en_US","og_type":"article","og_title":"Faster inference for PyTorch models with OpenVINO Integration with Torch-ORT | Microsoft Open Source Blog","og_description":"Use ONNX Runtime and Intel OpenVINO to speed up inference of PyTorch deep learning models.","og_url":"https:\/\/opensource.microsoft.com\/blog\/2022\/12\/01\/faster-inference-for-pytorch-models-with-openvino-integration-with-torch-ort\/","og_site_name":"Microsoft Open Source Blog","article_published_time":"2022-12-01T16:00:00+00:00","article_modified_time":"2023-03-14T20:34:21+00:00","og_image":[{"width":1038,"height":692,"url":"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2022\/11\/PreviewImage-3.png","type":"image\/png"}],"author":"Sai Jayanthi, Vishnudas Thaniel S., Devang Aggarwal, Natalie Kershaw","twitter_card":"summary_large_image","twitter_image":"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2022\/11\/PreviewImage-3.png","twitter_creator":"@OpenAtMicrosoft","twitter_site":"@OpenAtMicrosoft","twitter_misc":{"Written by":"Sai Jayanthi, Vishnudas Thaniel S., Devang Aggarwal, Natalie Kershaw","Est. reading time":"4 min read"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/opensource.microsoft.com\/blog\/2022\/12\/01\/faster-inference-for-pytorch-models-with-openvino-integration-with-torch-ort\/#article","isPartOf":{"@id":"https:\/\/opensource.microsoft.com\/blog\/2022\/12\/01\/faster-inference-for-pytorch-models-with-openvino-integration-with-torch-ort\/"},"author":[{"@id":"https:\/\/opensource.microsoft.com\/blog\/author\/sai-jayanthi\/","@type":"Person","@name":"Sai Jayanthi"},{"@id":"https:\/\/opensource.microsoft.com\/blog\/author\/vishnudas-thaniel-s\/","@type":"Person","@name":"Vishnudas Thaniel S."},{"@id":"https:\/\/opensource.microsoft.com\/blog\/author\/devang-aggarwal\/","@type":"Person","@name":"Devang Aggarwal"},{"@id":"https:\/\/opensource.microsoft.com\/blog\/author\/natalie-kershaw\/","@type":"Person","@name":"Natalie Kershaw"}],"headline":"Faster inference for PyTorch models with OpenVINO Integration with Torch-ORT","datePublished":"2022-12-01T16:00:00+00:00","dateModified":"2023-03-14T20:34:21+00:00","mainEntityOfPage":{"@id":"https:\/\/opensource.microsoft.com\/blog\/2022\/12\/01\/faster-inference-for-pytorch-models-with-openvino-integration-with-torch-ort\/"},"wordCount":1132,"publisher":{"@id":"https:\/\/opensource.microsoft.com\/blog\/#organization"},"image":{"@id":"https:\/\/opensource.microsoft.com\/blog\/2022\/12\/01\/faster-inference-for-pytorch-models-with-openvino-integration-with-torch-ort\/#primaryimage"},"thumbnailUrl":"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2024\/06\/MSC17_catapult_009.webp","inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/opensource.microsoft.com\/blog\/2022\/12\/01\/faster-inference-for-pytorch-models-with-openvino-integration-with-torch-ort\/","url":"https:\/\/opensource.microsoft.com\/blog\/2022\/12\/01\/faster-inference-for-pytorch-models-with-openvino-integration-with-torch-ort\/","name":"Faster inference for PyTorch models with OpenVINO Integration with Torch-ORT | Microsoft Open Source Blog","isPartOf":{"@id":"https:\/\/opensource.microsoft.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/opensource.microsoft.com\/blog\/2022\/12\/01\/faster-inference-for-pytorch-models-with-openvino-integration-with-torch-ort\/#primaryimage"},"image":{"@id":"https:\/\/opensource.microsoft.com\/blog\/2022\/12\/01\/faster-inference-for-pytorch-models-with-openvino-integration-with-torch-ort\/#primaryimage"},"thumbnailUrl":"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2024\/06\/MSC17_catapult_009.webp","datePublished":"2022-12-01T16:00:00+00:00","dateModified":"2023-03-14T20:34:21+00:00","description":"Use ONNX Runtime and Intel OpenVINO to speed up inference of PyTorch deep learning models.","breadcrumb":{"@id":"https:\/\/opensource.microsoft.com\/blog\/2022\/12\/01\/faster-inference-for-pytorch-models-with-openvino-integration-with-torch-ort\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/opensource.microsoft.com\/blog\/2022\/12\/01\/faster-inference-for-pytorch-models-with-openvino-integration-with-torch-ort\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/opensource.microsoft.com\/blog\/2022\/12\/01\/faster-inference-for-pytorch-models-with-openvino-integration-with-torch-ort\/#primaryimage","url":"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2024\/06\/MSC17_catapult_009.webp","contentUrl":"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2024\/06\/MSC17_catapult_009.webp","width":1170,"height":640},{"@type":"BreadcrumbList","@id":"https:\/\/opensource.microsoft.com\/blog\/2022\/12\/01\/faster-inference-for-pytorch-models-with-openvino-integration-with-torch-ort\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/opensource.microsoft.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Faster inference for PyTorch models with OpenVINO Integration with Torch-ORT"}]},{"@type":"WebSite","@id":"https:\/\/opensource.microsoft.com\/blog\/#website","url":"https:\/\/opensource.microsoft.com\/blog\/","name":"Microsoft Open Source Blog","description":"Open dialogue about openness at Microsoft \u2013 open source, standards, interoperability","publisher":{"@id":"https:\/\/opensource.microsoft.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/opensource.microsoft.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/opensource.microsoft.com\/blog\/#organization","name":"Microsoft Open Source Blog","url":"https:\/\/opensource.microsoft.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/opensource.microsoft.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/08\/Microsoft-Logo.png","contentUrl":"https:\/\/opensource.microsoft.com\/blog\/wp-content\/uploads\/2019\/08\/Microsoft-Logo.png","width":259,"height":194,"caption":"Microsoft Open Source Blog"},"image":{"@id":"https:\/\/opensource.microsoft.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/OpenAtMicrosoft"]}]}},"msxcm_display_generated_audio":false,"msxcm_animated_featured_image":null,"distributor_meta":false,"distributor_terms":false,"distributor_media":false,"distributor_original_site_name":"Microsoft Open Source Blog","distributor_original_site_url":"https:\/\/opensource.microsoft.com\/blog","push-errors":false,"_links":{"self":[{"href":"https:\/\/opensource.microsoft.com\/blog\/wp-json\/wp\/v2\/posts\/94112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/opensource.microsoft.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/opensource.microsoft.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/opensource.microsoft.com\/blog\/wp-json\/wp\/v2\/users\/6194"}],"replies":[{"embeddable":true,"href":"https:\/\/opensource.microsoft.com\/blog\/wp-json\/wp\/v2\/comments?post=94112"}],"version-history":[{"count":0,"href":"https:\/\/opensource.microsoft.com\/blog\/wp-json\/wp\/v2\/posts\/94112\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/opensource.microsoft.com\/blog\/wp-json\/wp\/v2\/media\/95478"}],"wp:attachment":[{"href":"https:\/\/opensource.microsoft.com\/blog\/wp-json\/wp\/v2\/media?parent=94112"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/opensource.microsoft.com\/blog\/wp-json\/wp\/v2\/post_tag?post=94112"},{"taxonomy":"content-type","embeddable":true,"href":"https:\/\/opensource.microsoft.com\/blog\/wp-json\/wp\/v2\/content-type?post=94112"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/opensource.microsoft.com\/blog\/wp-json\/wp\/v2\/topic?post=94112"},{"taxonomy":"programming-languages","embeddable":true,"href":"https:\/\/opensource.microsoft.com\/blog\/wp-json\/wp\/v2\/programming-languages?post=94112"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/opensource.microsoft.com\/blog\/wp-json\/wp\/v2\/coauthors?post=94112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}