Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarification on ZenDNN tuning for tensorflow #9

Open
sagi-scalers-ai opened this issue Sep 20, 2023 · 2 comments
Open

Clarification on ZenDNN tuning for tensorflow #9

sagi-scalers-ai opened this issue Sep 20, 2023 · 2 comments

Comments

@sagi-scalers-ai
Copy link

sagi-scalers-ai commented Sep 20, 2023

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.

@dineshchitlangia
Copy link

@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

@ratan-prasad
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants