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.0exists, 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:
- 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.
- 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:
- Install TensorFlow
v2.19.
pip install tensorflow==2.19 - Use one of the following two methods to install zentf:
- Using the PyPi repo. Run the
command:
pip install zentf==5.1.0For optimal environment settings, refer to Performance Tuning or use the script shipped in the release package from the AMD developer portal.
- Using the release package from the AMD developer
portal.
- Download the package from AMD developer portal.
- Run the following commands to unzip the
package:
unzip ZENTF_v5.1.0_Python_v3.10.zip cd ZENTF_v5.1.0_Python_v3.10Note: zentf is compatible with Python v3.9-3.12. We have used 3.10 here only as an example. - Install the
binary.
pip install zentf-5.1.0-cp310-cp310-manylinux_2_28_x86_64.whl - To use the recommended environment settings,
execute:
source scripts/zentf_env_setup.sh - Install
requirements:
pip install transformers==4.48.3
- Using the PyPi repo. Run the
command:
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.