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

ResNet50 inference model seemed not support FP16 #173

Open
chenming22 opened this issue Mar 6, 2024 · 4 comments
Open

ResNet50 inference model seemed not support FP16 #173

chenming22 opened this issue Mar 6, 2024 · 4 comments

Comments

@chenming22
Copy link

I want to evaluate inference performance using AMX-FP16 on new CPU while default docker or AI tool package not supported AMX-FP16 because of old version of onednn(3.2.0), so building onednn-3.3.0 and intel extensions for tensorflow-2.15.0 from source and using following model:

FP32, FP16 and BFloat32 Pretrained model:

wget https://zenodo.org/record/2535873/files/resnet50_v1.pb 

howerver, log from onednn showed precision of this model was FP32 not FP16.

@sramakintel
Copy link
Contributor

@chenming22 we will work on adding FP16 to resnet50 model. Thanks for reaching out.

@sramakintel
Copy link
Contributor

@chenming22 we will work on adding FP16 to resnet50 model. Thanks for reaching out.

@chenming22 we currently have AMP FP16 TF support based on the PR upstream here: tensorflow/tensorflow#62817. Since the script already supports FP16 input, installing tf-nighty from pip can provide FP16 support. Can you run the workload again to see if FP16 works as expected?

@chenming22
Copy link
Author

thanks @sramakintel , i will have a try.

@chenming22
Copy link
Author

chenming22 commented Jun 6, 2024

hi, @sramakintel , noticed above pr been merged to tf2.16.1, so i install tf2.16.1 from pip and then ran inference.sh in ResNet50 V1.5 inference with precision=fp16, ONEDNN_MAX_CPU_ISA=AVX512_CORE_AMX_FP16 and model: resnet50_v1.pb, but log and metric on emon showed no AMX instructions used, any other environment variables or configurations needed?

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

2 participants