Install the Release Binary - 57300

ZenDNN User Guide (57300)

Document ID
57300
Release Date
2025-08-18
Revision
5.1 English

This section provides information required to install zentf v5.1.0 for a Python interface.

However, if you are interested in installing zentf v5.1.0 on a C++ interface, click here for the README instructions.

Create and Setup Conda Environment

Before you begin:

  • Choose a unique name for your Conda environment. Example: zentf-5.1.0
  • Make sure that you delete any older Conda environment with the same name. For example: If a Conda environment named zentf-5.1.0 exists, use the following command to remove it.
    conda remove --name zentf-5.1.0 --all
Important: zentf is compatible with Python v3.9-3.12. Make sure you create a Conda environment only with Python versions supported by zentf.

To setup the Conda environment:

  1. Refer to the Miniforge documentation available here to install Miniforge on your system. Testing has been performed with Miniforge3-24.11.3-2-Linux-x86_64.sh.
  2. Create and activate a Conda environment that houses all the zentf specific installations:
    conda create -n zentf-5.1.0 python=3.10 -y
    conda activate zentf-5.1.0

Install zentf

To install the zentf binary release:
  1. Install TensorFlow v2.19.
    pip install tensorflow==2.19
  2. Use one of the following two methods to install zentf:
    1. Using the PyPi repo. Run the command:
      pip install zentf==5.1.0

      For optimal environment settings, refer to Performance Tuning or use the script shipped in the release package from the AMD developer portal.

    2. Using the release package from the AMD developer portal.
      1. Download the package from AMD developer portal.
      2. Run the following commands to unzip the package:
        unzip ZENTF_v5.1.0_Python_v3.10.zip
        cd ZENTF_v5.1.0_Python_v3.10
        Note: zentf is compatible with Python v3.9-3.12. We have used 3.10 here only as an example.
      3. Install the binary.
        pip install  zentf-5.1.0-cp310-cp310-manylinux_2_28_x86_64.whl
      4. To use the recommended environment settings, execute:
        source scripts/zentf_env_setup.sh
      5. Install requirements:
        pip install transformers==4.48.3

Setup zentf

Set the following environment variables to enable zentf for inference:

  • TF_ENABLE_ZENDNN_OPTS=1
  • TF_ENABLE_ONEDNN_OPTS=0
Important: By default, TensorFlow is shipped with oneDNN enabled. To disable ZenDNN optimizations and revert to the default TensorFlow setting, set TF_ENABLE_ZENDNN_OPTS=0 and TF_ENABLE_ONEDNN_OPTS=1.