* Added Torchscript Backend * First commit for backend with Torch FX Decoder * Merging changes from Torch FX branch * Torch FX initial fixes (Temporary) * Fixed type/shape issues in Torch FX decoder * Added translation for built-in getitem * MaxPool update & Output shape fix (Torch FX) * Torch FX graph outputs fix * Torch FX support for sigmoid and slu_ * Torch FX graph module caching * Torch Fx partitioner cache removed * Torch FX initial getitem replacer added * Index check for torch fx getitem replacer * Debug print removed from partitioner * Added environment variables for pytorch tracing mode and openvino device * FX translation fix for getitem & getitem replacer removed * Added checks for PyTorch tracing mode environment variable * Adding compile mode for fallback * Added more ops for resnet18 * Added a check for environment variable * Generalized addmm to work with torchscript and torchfx * Added the missing batch_norm.default translation * fx_backend: include get_attr ops to the partitions * AddeTODO note t to improvget_attr algorithm * created function for adding get_attr nodes * fx_backend: added aten.mul.Tensor, re-enabled aten.empty.memory_format * fx_backend: Additional op support/improvement for Inception V3 * Added comment for fix 64-bit to 32-bit max int conversion * fx_backend: Update for avg_poolnd to support 3 inputs * Fixed erorr in decoder.py * TorchFX caching fix * Torch backend, op support for Stable Diff. & BERT * Arranged ops in order and added torch tensor mapping * Added support for more ops for super glue * TorchFX: Initial permanent fallback * TorchFX: New ops for improved TorchVision support * TorchFX backend optimizations for partitioning and tmp fallback * working operator updates for superglue * Updates to operators for superglue * Removed max.dim and stack * Cleanup * Cleanup * Fixed a couple of syntax issues * Fixed a couple of syntax issues * Added missing method to TorchFX Decoder * Added missing method to TorchFX Decoder * Removed redundant code for transpose * TorchFX: Initial StableDiffusion support * PyTorch decoder ovtype to ctype fix for int64 * Added ops for distilbert * Fixed few unnecessary include statements * Seperated TorchFX and TorchScript decoders * Modified import statements to reflect two decoders * f64 fix for TorchFX * Import fix for PyTorch backend modules * TorchFX serialize graph for debugging (Temporary) * Serialize and load back feature enabled for TorchFX * Temporary optimization to remove Broadcast * Temporary SoftmaxRehapeElimination pass is added * TorchFX custom model cache directory * PyTorch bitwise translation, conversion checks enabled * Naming fix in make_list_construct * TorchFX: Added comments to Softmax and Slice translations * translate_chunk temporarily removed for TS backend * Fixed linter issues * Addressed clang formatting issues * Fixed few more clang and linter issues * Fixed tests to use ts_decoder * Fixed naming convention issues * Added missing import * Added inlined_inputs to TorchScriptDecoder * Added tests for torch fx backend * Removed magic numbers in PyTorch decoder utils * TorchFX decoder data type fix * Added cast from size_t to int * TorchFX output handling code cleanup * TorchFX: Use detached input tensor * Added missing cast from size_t to int * Added static cast in group_norm * Fixed casting issue in split --------- Co-authored-by: ynimmaga <yamini.nimmagadda@intel.com> Co-authored-by: Cavus Mustafa <mustafa.cavus@intel.com>
OpenVINO™ Python* development tools
General
OpenVINO includes following tools:
- openvino.tools.benchmark
Please, refer to https://docs.openvino.ai for details.
Installation
Prerequisites
Install prerequisites first:
1. Python
Install Python prerequisites:
Run following command to install these prerequisites on Ubuntu*:
sudo apt-get install python3 python3-dev python3-setuptools python3-pip
Python setuptools and python package manager (pip) install packages into system directory by default. There are several options:
- work inside [virtual environment][virtualenv] (best solution).
- use
--useroption for allpipcommands. - install all dependencies with sudo permissions.
In order to use virtual environment you should install it:
python3 -m pip install virtualenv
python3 -m virtualenv -p `which python3` <directory_for_environment>
Before starting to work inside virtual environment, it should be activated:
source <directory_for_environment>/bin/activate
Virtual environment can be deactivated using command
deactivate
2. Install packages
You can install tools by specifying path to tool with setup.py in pip install command:
python3 -m pip install <tools_folder>/
For example, to install Benchmark Tool, use the following command:
python3 -m pip install benchmark_tool/
Configuration
Each subpackage has specific configuration. Please, refer to specific subpackage documentation for details.