Skip to content

Commit

Permalink
Update FPGA examples (#1685)
Browse files Browse the repository at this point in the history
* Update FPGA Operator usage instructions

Signed-off-by: Elias Koromilas <elias.koromilas@gmail.com>

* Update FPGA example experiments

Signed-off-by: Elias Koromilas <elias.koromilas@gmail.com>

* Add FPGA experiment reviewers

Signed-off-by: Elias Koromilas <elias.koromilas@gmail.com>

* Update examples/v1beta1/fpga/OWNERS

Co-authored-by: Andrey Velichkevich <andrey.velichkevich@gmail.com>

Co-authored-by: Andrey Velichkevich <andrey.velichkevich@gmail.com>
  • Loading branch information
eliaskoromilas and andreyvelich authored Sep 29, 2021
1 parent 6f0b2b1 commit 40a2fc8
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 28 deletions.
3 changes: 3 additions & 0 deletions examples/v1beta1/fpga/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
approvers:
- eliaskoromilas
- jstamel
42 changes: 15 additions & 27 deletions examples/v1beta1/fpga/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,55 +7,43 @@ If you want to read more about provisioning FPGA resources and deploying
accelerated applications (e.g. Kubeflow Pipelines) on any Kubernetes cluster,
visit the [InAccel](https://docs.inaccel.com) documentation.

## EKS*-optimized AMI with FPGA support
## Simplifying FPGA management in EKS* (Elastic Kubernetes Serice)

**For development and testing purposes you can still [deploy Kubeflow Katib
using Minikube](https://kubeflow.org/docs/started/workstation/minikube-linux) in
a single AMI instance. In production environments, Amazon's managed Kubernetes
service ([EKS](https://aws.amazon.com/eks)) is recommended.*

The InAccel EKS-optimized FPGA AMI is built on top of the standard [Amazon
EKS-optimized Linux AMI](https://aws.amazon.com/marketplace/pp/B07GRMYQR5), and
is configured to serve as an optional image for Amazon EKS worker nodes to
support FPGA based workloads.
The InAccel FPGA Operator allows administrators of Kubernetes clusters to manage
FPGA nodes just like CPU nodes in the cluster. Instead of provisioning a special
OS image for FPGA nodes, administrators can rely on a standard OS image for both
CPU and FPGA nodes and then rely on the FPGA Operator to provision the required
software components for FPGAs.

In addition to the standard Amazon EKS-optimized AMI configuration, the FPGA AMI
includes the following:

* Xilinx FPGA drivers
* InAccel runtime (as the default runtime)

The AMI IDs for the latest InAccel EKS-optimized FPGA AMI are shown in the
following table.

| AWS Region | Kubernetes version 1.17.7 | Kubernetes version 1.16.12 |
| ----------------------------------- | ------------------------- | -------------------------- |
| US East (N. Virginia) (`us-east-1`) | `ami-0c4e0b85781a9dde3` | `ami-0519d9b242546530a` |

> **Note**: The EKS-optimized FPGA AMI also supports non-FPGA instance types.
Note that the FPGA Operator is specifically useful for scenarios where the
Kubernetes cluster needs to scale quickly - for example provisioning additional
FPGA nodes on the cloud and managing the lifecycle of the underlying software
components.

## Enabling FPGA based workloads

The following section describes how to run a workload on an FPGA based instance
with the InAccel EKS-optimized FPGA AMI.
with the InAccel FPGA Operator.

After your FPGA worker nodes join your cluster, you must apply the [InAccel FPGA
Operator](https://hub.helm.sh/charts/inaccel/fpga-operator) for Kubernetes, as a
Helm app on your cluster, with the following command.
Operator](https://artifacthub.io/packages/helm/inaccel/fpga-operator) for
Kubernetes, as a Helm app on your cluster, with the following command.

```sh
helm repo add inaccel https://setup.inaccel.com/helm

helm install inaccel inaccel/fpga-operator --set license=...
helm install inaccel inaccel/fpga-operator
```

Get your free Community Edition [license](https://inaccel.com/license), if it's
the first time that you use InAccel toolset.

You can verify that your nodes have available FPGAs with the following command:

```sh
kubectl get nodes -o custom-columns=NAME:metadata.name,FPGAS:.status.capacity.xilinx/aws-vu9p-f1
kubectl get nodes -o custom-columns=NAME:metadata.name,FPGAS:.status.capacity.xilinx/aws-vu9p-f1,SHELL:.metadata.labels.xilinx/aws-vu9p-f1
```

## Experiment
Expand Down
7 changes: 6 additions & 1 deletion examples/v1beta1/fpga/xgboost-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ spec:
kind: Job
spec:
template:
metadata:
labels:
inaccel/fpga: enabled
annotations:
inaccel/cli: |
bitstream install --mode others https://store.inaccel.com/artifactory/bitstreams/xilinx/aws-vu9p-f1/shell-v04261818_201920.2/aws/com/inaccel/xgboost/0.1/2exact
spec:
containers:
- name: training-container
Expand All @@ -60,7 +66,6 @@ spec:
- "--name=SVHN"
- "--test-size=0.35"
- "--tree-method=fpga_exact"
- "--bitstream=https://store.inaccel.com/artifactory/bitstreams/xilinx/aws-vu9p-f1/dynamic_5.0/com/inaccel/xgboost/0.1/2exact"
- "--max-depth=10"
- "--alpha=${trialParameters.alpha}"
- "--eta=${trialParameters.eta}"
Expand Down

0 comments on commit 40a2fc8

Please sign in to comment.