Files
openvino/docs/IE_DG/GPU_Kernels_Tuning.md
T
5e4cd1127b Integrate UAT fixes (#5517)
* Added info on DockerHub CI Framework

* Feature/azaytsev/change layout (#3295)

* Changes according to feedback comments

* Replaced @ref's with html links

* Fixed links, added a title page for installing from repos and images, fixed formatting issues

* Added links

* minor fix

* Added DL Streamer to the list of components installed by default

* Link fixes

* Link fixes

* ovms doc fix (#2988)

* added OpenVINO Model Server

* ovms doc fixes

Co-authored-by: Trawinski, Dariusz <dariusz.trawinski@intel.com>

* Updated openvino_docs.xml

* Edits to MO

Per findings spreadsheet

* macOS changes

per issue spreadsheet

* Fixes from review spreadsheet

Mostly IE_DG fixes

* Consistency changes

* Make doc fixes from last round of review

* integrate changes from baychub/master

* Update Intro.md

* Update Cutting_Model.md

* Update Cutting_Model.md

* Fixed link to Customize_Model_Optimizer.md

Co-authored-by: Trawinski, Dariusz <dariusz.trawinski@intel.com>
Co-authored-by: baychub <cbay@yahoo.com>
2021-05-06 15:37:13 +03:00

2.2 KiB

Using GPU Kernels Tuning

GPU Kernels Tuning allows you to tune models, so the heavy computational layers are configured to fit better into hardware, which the tuning was done on. It is required to achieve best performance on GPU.

Note

Currently only convolution and fully connected layers undergo tuning process. It means that the performance boost depends on the amount of that layers in the model.

OpenVINO™ releases include the <INSTALL_DIR>/inference_engine/bin/intel64/Release/cache.json file with pretuned data for current state of the art models. It is highly recommended to do the tuning for new kind of models, hardwares or drivers.

Tuned data

GPU tuning data is saved in JSON format. The file is composed of 2 types of attributes and 1 type of value:

  • Execution units number (attribute): splits the content into different EU sections
  • Hash (attribute): hashed tuned kernel data
  • Key (value): Array with kernel name and kernel's mode index

Usage


You can activate Kernels Tuning process by setting KEY_TUNING_MODE flag to TUNING_CREATE and KEY_TUNING_FILE to <"filename"> in a configuration map that is passed to the plugin while loading a network. This configuration modifies the behavior of the ExecutableNetwork object. Instead of standard network compilation, it will run the tuning process. Please keep in mind that the tuning can be very time consuming. The bigger the network, the longer it will take. File with tuned data is the result of this step.

Note

If a filename passed to KEY_TUNING_FILE points to existing tuned data and you are tuning a new model, then this file will be extended by new data. This allows you to extend existing cache.json provided in the OpenVINO™ release package.

The example below shows how to set and use the key files:

@snippet snippets/GPU_Kernels_Tuning.cpp part0


You can activate the inference with tuned data by setting KEY_TUNING_MODE flag to TUNING_USE_EXISTING and KEY_TUNING_FILE flag to <"filename">.

GPU backend will process the content of the file during network compilation to configure the OpenCL kernels for the best performance.