tensorflow / serving

A flexible, high-performance serving system for machine learning models
https://www.tensorflow.org/serving
Apache License 2.0
6.17k stars 2.19k forks source link

Create special docker images for AVX2/FMA et al support, with special tags #2172

Open kokroo opened 1 year ago

kokroo commented 1 year ago

Feature Request

Describe the problem the feature is intended to solve

Tensorflow Serving should have docker images with AVX2 and FMA et al enabled, with different tags so that people who know what they are and need them can use them. A lot of users and cloud providers do have capable CPUs now, and although I understand the default build needs to be widely compatible, it is also important to provide power users with images that can speed up their performance.

Describe the solution

Include docker images in the CI/CD pipeline with these CPU extensions enabled, so that people who are aware of their CPU capabilities can intentionally use the specially-tagged docker images and use them.

Describe alternatives you've considered

An alternative solution is rolling your own fork but that is not desirable nor does every data scientist have these skills.

singhniraj08 commented 1 year ago

@kokroo,

You can try building Tensorflow Serving from source and if you are interested in optimized builds you can follow optimize build section to utilize platform-specific instruction sets for your processor. It is also possible to compile using specific instruction sets (e.g. AVX, AVX2. FMA).

Thank you!

kokroo commented 1 year ago

@singhniraj08 Hello,

I can definitely do that, but for most people, it is not convenient. A lot of people are just data scientists using a docker image, and it would be really convenient if tensorflow publishes docker images with special tags, which are already compiled to utilize those specific CPU instructions.

iquanxin commented 4 months ago

Try building Tensorflow Serving from source failed. it would be really convenient if tensorflow publishes docker images with special tags (e.g. AVX, AVX2. FMA).

dgtlmoon commented 1 month ago

great idea!