ZenDNN in WeGO TensorFlow 2 - 3.0 English

Vitis AI User Guide (UG1414)

Document ID
Release Date
3.0 English

Enable ZenDNN in WeGO TensorFlow 2

ZenDNN is disabled by default. Set export ZENDNN_INFERENCE_ONLY=1 to enable it.

Environment Variables

You must export the following environment variables explicitly to enable ZenDNN working properly in WeGO TensorFlow 2.
Table 1. Environment Varariables
Name Description
OMP_DYNAMIC Set it to FALSE explicitly when ZenDNN is enabled.
OMP_NUM_THREADS Set it explicitly to achieve a better performance. See tuning guidelines for more details.
ZENDNN_GEMM_ALGO Default is 3. You can set [0, 1, 2, 3] to tune different GEMM ALGO path.
ZENDNN_TENSOR_POOL_LIMIT Default is 32. See tuning guidelines for more details.
  • 0: Enable reduced memory pool tensor.
  • 1: Enable increased memory pool tensor.
ZENDNN_INFERENCE_ONLY Default is 0. Set 1 to enable ZenDNN.

Tuning Guidelines

Set OMP_NUM_THREADS as per the core number of user system. Xilinx recommends setting a small number like 1 or 2.

In some cases, set ZENDNN_TENSOR_POOL_LIMIT to a small number like 1, so some layers will use default memory allocation instead of tensor pool once it hits the pool limit with ZEN_TENSOR_POOL_LIMIT.