Clarification on ZenDNN tuning for tensorflow
sagi-scalers-ai opened this issue · comments
We are refering the below ZenDNN tuning guide for Tensorflow models.
Tuning guide
In the section 9.2, For Resnet50 it is recommended to use below settings.
export TF_ENABLE_ZENDNN_OPTS=0
export ZENDNN_CONV_ALGO=3
export ZENDNN_TF_CONV_ADD_FUSION_SAFE=1
export ZENDNN_TENSOR_POOL_LIMIT=512
export OMP_NUM_THREADS=96
export GOMP_CPU_AFFINITY=0-95
My question is regarding TF_ENABLE_ZENDNN_OPTS=0
setting which is ment to disable ZenDNN. Can you clarify on this if it is expexted to disable ZenDNN for Tensorflow models.
@sagi-scalers-ai This is incorrect. We will get the document updated. Thanks for bringing this to our attention.
The correct setting is:
export TF_ENABLE_ZENDNN_OPTS=1
Hi, these are the recommended setting for Resnet50:
export ZENDNN_CONV_ALGO=3
export ZENDNN_TENSOR_POOL_LIMIT=512
export ZENDNN_TF_CONV_ADD_FUSION_SAFE=1
export TF_ENABLE_ZENDNN_OPTS=1
export OMP_NUM_THREADS=96
export GOMP_CPU_AFFINITY=0-95
Please note, when TF_ENABLE_ZENDNN_OPTS is set to 1, TF_ENABLE_ONEDNN_OPTS is set to 0 inside TensorFlow code.
Above setting works for ZenDNN v4.0 and ZenDNN v4.1 release.