Package: amdinfer
The AMD Inference Server is an open-source tool to deploy your machine learning models and make them accessible to clients for inference.
Out-of-the-box, the server can support selected models that run on AMD CPUs, GPUs or FPGAs by leveraging existing libraries.
For all these models and hardware accelerators, the server presents a common user interface based on community standards so clients can make requests to any using the same API.
The server provides HTTP/REST and gRPC interfaces for clients to submit requests.
For both, there are C++ and Python bindings to simplify writing client programs.
You can also use the server backend directly using the native C++ API to write local applications.FeaturesSupports client requests usingHTTP/REST, gRPC and websocket protocolsusing an API based onKServe’s v2 specificationCustom applications can directly call the backend bypassing the other protocols using thenative C++ APIC++ library with Python bindingsto simplify making requests to the serverIncoming requests are transparentlybatchedbased on the user specificationsUsers can define how many models, and how many instances of each, torun in parallelThe AMD Inference Server is integrated with the following libraries out of the gate:TensorFlow and PyTorch models withZenDNNon CPUs (optimized for AMD CPUs)ONNX models withMIGraphXon AMD GPUsXModel models withVitis AIon AMD FPGAsA graph of computation including as pre- and post-processing can be written usingAKSon AMD FPGAs for end-to-end inferenceQuick Start Deployment and InferenceThe following example demonstrates how to deploy the server locally and run a sample inference.
This example runs on the CPU and does not require any special hardware.
You can see a more detailed version of this example in thequickstart.# Step 1: Download the example files and create a model repositorywgethttps://github.com/Xilinx/inference-server/raw/main/examples/resnet50/quickstart-setup.shchmod+x./quickstart-setup.sh./quickstart-setup.sh# Step 2: Launch the AMD Inference Serverdockerrun-d--net=host-v${PWD}/model_repository:/mnt/models:rwamdih/serve:uif1.1_zendnn_amdinfer_0.3.0amdinfer-server--enable-repository-watcher# Step 3: Install the Python client librarypipinstallamdinfer# Step 4: Send an inference requestpython3tfzendnn.py--endpointresnet50--image./dog-3619020_640.jpg--labels./imagenet_classes.txt# Inference should print the following:
#
#     Running the TF+ZenDNN example for ResNet50 in Python
#     Waiting until the server is ready...
#     Making inferences...
#     Top 5 classes for ../../tests/assets/dog-3619020_640.jpg:
#       n02112018 Pomeranian
#       n02112350 keeshond
#       n02086079 Pekinese, Pekingese, Peke
#       n02112137 chow, chow chow
#       n02113023 Pembroke, Pembroke Welsh corgiLearn moreThe documentation for the AMD Inference Server is availableonline.Check out thequickstartonline to help you get started.SupportRaise issues if you find a bug or need help.
Refer toContributingfor more information.LicenseThe AMD Inference Server is licensed under the terms of Apache 2.0 (seeLICENSE).
The LICENSE file contains additional license information for third-party files distributed with this work.
More license information can be seen in thedependencies.IMPORTANT NOTICE CONCERNING OPEN-SOURCE SOFTWAREMaterials in this release may be licensed by Xilinx or third parties and may
be subject to the GNU General Public License, the GNU Lesser General License,
or other licenses.Licenses and source files may be downloaded from:libamdinferlibbrotlicommonlibbrotlideclibbrotlienclibcareslibcom_errlibcryptolibdrogonlibefswlibgssapi_krb5libjsoncpplibk5cryptolibkeyutilslibkrb5libkrb5supportlibopencv_corelibopencv_imgcodecslibopencv_imgproclibossp-uuidlibpcrelibprometheus-cpp-corelibprotobuflibselinuxlibssllibtrantorNote:  You are solely responsible for checking the header files and other
accompanying source files (i) provided within, in support of, or that otherwise
accompanies these materials or (ii) created from the use of third party
software and tools (and associated libraries and utilities) that are supplied
with these materials, because such header and/or source files may contain
or describe various copyright notices and license terms and conditions
governing such files, which vary from case to case based on your usage
and are beyond the control of Xilinx. You are solely responsible for
complying with the terms and conditions imposed by third parties as applicable
to your software applications created from the use of third
party software and tools (and associated libraries and utilities) that are
supplied with the materials.