Skip to content

Commit c0239af

Browse files
Updates with Poplar SDK 3.1 release
1 parent de5eb78 commit c0239af

File tree

822 files changed

+6497
-88366
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

822 files changed

+6497
-88366
lines changed

README.md

Lines changed: 19 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ To see what's new and easily filter applications by domain and framework, please
1010

1111
For more detailed benchmark information, please visit our [Performance Results page](https://www.graphcore.ai/performance-results).
1212

13-
> The code presented here requires using Poplar SDK 3.0.x
13+
> The code presented here requires using Poplar SDK 3.1.x, and has been tested using Ubuntu 20.04 and Python 3.8
1414
1515
Please install and enable the Poplar SDK following the instructions in the [Getting Started](https://docs.graphcore.ai/en/latest/getting-started.html#pod-system-getting-started-guides) guide for your IPU system.
1616

@@ -39,32 +39,26 @@ If you require POD128/256 setup and configuration for our applications, please c
3939

4040
| Model | Domain | Type |Links |
4141
| ------- | ------- |------- | ------- |
42-
| ResNet | Image Classification | Training & Inference | [TensorFlow 1](vision/cnns/tensorflow1/) , [TensorFlow 2](vision/cnns/tensorflow2/), [PyTorch](vision/cnns/pytorch/), [PyTorch Lightning](https://github.com/graphcore/pytorch-lightning-examples/tree/release/applications)|
43-
| ResNeXt | Image Classification | Training & Inference | [TensorFlow 1](vision/cnns/tensorflow1/) , [PopART (Inference)](vision/resnext_inference/popart), [PyTorch (Inference)](vision/cnns/pytorch/inference)
44-
| EfficientNet | Image Classification | Training & Inference | [TensorFlow 1](vision/cnns/tensorflow1/) , [PyTorch](vision/cnns/pytorch/), [PyTorch Lightning](https://github.com/graphcore/pytorch-lightning-examples/tree/release/applications)|
45-
| MobileNet | Image Classification | Inference | [TensorFlow 1](vision/cnns/tensorflow1/inference) |
46-
| MobileNetv2 | Image Classification | Inference | [TensorFlow 1](vision/cnns/tensorflow1/inference) |
42+
| ResNet | Image Classification | Training & Inference | [TensorFlow 2](vision/cnns/tensorflow2/), [PyTorch](vision/cnns/pytorch/), [PyTorch Lightning](https://github.com/graphcore/pytorch-lightning-examples/tree/release/applications)|
43+
| ResNeXt | Image Classification | Training & Inference | [PopART (Inference)](vision/resnext_inference/popart), [PyTorch (Inference)](vision/cnns/pytorch/inference)
44+
| EfficientNet | Image Classification | Training & Inference | [PyTorch](vision/cnns/pytorch/), [PyTorch Lightning](https://github.com/graphcore/pytorch-lightning-examples/tree/release/applications)|
4745
| MobileNetv3 | Image Classification | Training & Inference | [PyTorch](vision/cnns/pytorch/) |
4846
| ViT(Vision Transformer) | Image Classification | Training| [PyTorch](vision/vit/pytorch/), [Hugging Face Optimum](https://huggingface.co/Graphcore/vit-base-ipu) |
4947
| DINO | Image Classification | Training| [PyTorch](vision/dino/pytorch) |
5048
| Swin | Image Classification | Training | [PyTorch](vision/swin/pytorch) |
5149
| MAE (Masked AutoEncoder) | Image Classification | Training | [PyTorch](vision/mae/pytorch) |
52-
| Yolov3 | Object Detection | Training & Inference | [TensorFlow 1](vision/yolo_v3/tensorflow1) |
5350
| Yolov4-P5 | Object Detection | Inference | [PyTorch](vision/yolo_v4/pytorch) |
5451
| Faster RCNN | Object Detection | Training & Inference | [PopART](vision/faster_rcnn/popart) |
5552
| EfficientDet | Object Detection | Inference | [TensorFlow 2](vision/efficientdet/tensorflow2) |
56-
| SSD | Object Detection | Inference | [TensorFlow 1](vision/ssd/tensorflow1)|
5753
| UNet (Medical) | Image segmentation | Training & Inference | [TensorFlow 2](vision/unet_medical/tensorflow2) |
58-
| UNet (Industrial) | Image segmentation | Training | [TensorFlow 1](vision/unet_industrial/tensorflow1) |
5954
| Neural Image Fields | Neural Radiance Fields | Training | [TensorFlow 2](vision/neural_image_fields/tensorflow2) |
6055
<br>
6156

6257
### <img width="30" src="https://user-images.githubusercontent.com/81682248/177355208-a49a2bba-dd4d-4467-b135-9023279e8f01.png"></a> Natural Language Processing <a name="nlp"></a>
6358

6459
| Model | Domain | Type |Links |
6560
| ------- | ------- |------- | ------- |
66-
| BERT | NLP | Training & Inference |[TensorFlow 1](nlp/bert/tensorflow1) , [PyTorch](nlp/bert/pytorch) , [PopART](nlp/bert/popart), [TensorFlow 2](nlp/bert/tensorflow2/), [PopXL](nlp/bert/popxl), [PaddlePaddle](https://github.com/PaddlePaddle/PaddleNLP/tree/develop/model_zoo/bert/static_ipu), [Hugging Face Optimum](https://huggingface.co/Graphcore/bert-large-ipu)|
67-
| Group BERT | NLP | Training |[TensorFlow 1](nlp/bert/tensorflow1/README.md#GroupBERT_model) |
61+
| BERT | NLP | Training & Inference | [PyTorch](nlp/bert/pytorch) , [PopART](nlp/bert/popart), [TensorFlow 2](nlp/bert/tensorflow2/), [PopXL](nlp/bert/popxl), [PaddlePaddle](https://github.com/PaddlePaddle/PaddleNLP/tree/develop/model_zoo/bert/static_ipu), [Hugging Face Optimum](https://huggingface.co/Graphcore/bert-large-ipu)|
6862
| Packed BERT | NLP | Training |[PyTorch](nlp/bert/pytorch), [PopART](nlp/bert/popart) |
6963
| GPT2 | NLP | Training |[PyTorch](nlp/gpt2/pytorch) , [Hugging Face Optimum](https://huggingface.co/Graphcore/gpt2-medium-ipu) |
7064
| GPTJ | NLP | Training |[PopXL](nlp/gpt_j/popxl)|
@@ -86,7 +80,7 @@ If you require POD128/256 setup and configuration for our applications, please c
8680
| DeepVoice3 | TTS (TextToSpeech) | Training & Inference |[PopART](speech/deepvoice3/popart) |
8781
| FastSpeech2 | TTS(TextToSpeech) | Training & Inference | [TensorFlow 2](speech/fastspeech2/tensorflow2) |
8882
| Fastpitch | TTS (TextToSpeech) | Training | [PyTorch](speech/fastpitch/pytorch) |
89-
| Conformer | STT(SpeechToText) | Training & Inference | [PopART](speech/conformer/popart), [TensorFlow 1](speech/conformer/tensorflow1), [PyTorch](speech/conformer/pytorch)|
83+
| Conformer | STT(SpeechToText) | Training & Inference | [PopART](speech/conformer/popart), [PyTorch](speech/conformer/pytorch)|
9084
| Transfomer Transducer | STT(SpeechToText) | Training & Inference | [PopART](speech/transformer_transducer/popart) |
9185
| Wav2Vec2 | STT(SpeechToText) | Training | [Hugging Face Optimum](https://huggingface.co/Graphcore/wav2vec2-base-ipu)|
9286

@@ -108,10 +102,10 @@ If you require POD128/256 setup and configuration for our applications, please c
108102

109103
| Model | Domain | Type |Links |
110104
| ------- | ------- |------- | ------- |
111-
| TGN (Temporal Graph Network) | GNN | Training & Inference | [TensorFlow 1](gnn/tgn/tensorflow1) |
112105
| MPNN (Message Passing Neural Networks) | GNN | Training & Inference | [TensorFlow 2](gnn/message_passing/tensorflow2) |
113106
| Spektral GNN library with QM9 | GNN | Training | [TensorFlow 2](gnn/spektral/tensorflow2) |
114107
| Cluster GCN | GNN | Training & Inference | [TensorFlow 2](gnn/cluster_gcn/tensorflow2) |
108+
| TGN (Temporal Graph Networks) | GNN | Training | [PyTorch](gnn/tgn/pytorch) |
115109

116110
<br>
117111

@@ -120,64 +114,24 @@ If you require POD128/256 setup and configuration for our applications, please c
120114
| Model | Domain | Type |Links |
121115
| ------- | ------- |------- | ------- |
122116
| DeepDriveMD | Biology (Protein folding) | Training | [TensorFlow 2](ai_for_simulation/deep_drive_md/tensorflow2) |
123-
| CosmoFlow example using 3D Convolutions | Cosmology| Training & Inference | [TensorFlow 1](ai_for_simulation/cosmoflow/tensorflow1)|
124-
| et0 | Evapotransporation | Inference | [TensorFlow 1](ai_for_simulation/et0/tensorflow1) |
125117
| Approximate Bayesian Computation (ABC) COVID-19 | Medical | Inference | [TensorFlow 2](ai_for_simulation/abc_covid_19/tensorflow2) |
126118

127-
<br>
128-
129-
### <img width="25" src="https://user-images.githubusercontent.com/81682248/177360221-c599b6db-04e7-4e30-8be1-9752085df299.png"></a> Recommender Systems <a name="recommender_systems"></a>
130-
131-
| Model | Domain | Type |Links |
132-
| ------- | ------- |------- | ------- |
133-
| Deep AutoEncoders for Collaborative Filtering | Recommender Systems | Training & Inference | [TensorFlow 1](recommendation/autoencoder/tensorflow1) |
134-
| Click through rate: Deep Interest Network | Recommender Systems | Training & Inference | [TensorFlow 1](recommendation/click_through_rate/tensorflow1) |
135-
<br>
136-
137-
### <img width="30" src="https://user-images.githubusercontent.com/81682248/177372896-6699b42b-c7ff-4186-93b9-b7f46ec03999.png"></a> Reinforcement Learning <a name="rl"></a>
138-
139-
| Model | Domain | Type |Links |
140-
| ------- | ------- |------- | ------- |
141-
| RL Policy model | Reinforcement Learning | Training | [TensorFlow 1](reinforcement_learning/rl_policy_model/tensorflow1) |
142119

143120
<br>
144121

145122
### <img width="25" src="https://user-images.githubusercontent.com/81682248/177373761-77d40785-5390-400b-ad9f-305f4fd54a05.png"></a> Sparsity <a name="sparsity"></a>
146123

147124
| Model | Domain | Type |Links |
148125
| ------- | ------- |------- | ------- |
149-
| MNIST RigL | Dynamic Sparsity | Training | [TensorFlow 1](sparsity/dynamic_sparsity/tensorflow1/mnist_rigl) |
150-
| Autoregressive Language Modelling | Dynamic Sparsity | Training | [TensorFlow 1](sparsity/dynamic_sparsity/tensorflow1/language_modelling)
151-
| Block-Sparse library | Sparsity | Training & Inference | [PopART](sparsity/block_sparse/popart) , [TensorFlow 1](sparsity/block_sparse/tensorflow1)|
152-
153-
154-
<br>
155-
156-
### <img width="30" src="https://user-images.githubusercontent.com/81682248/177374313-c567fa25-c1a0-450f-855b-ce8b243d087e.png"></a> Probability <a name="probability"></a>
157-
158-
| Model | Domain | Type |Links |
159-
| ------- | ------- |------- | ------- |
160-
| Contrastive Divergence VAE using MCMC methods | Generative Model | Training | [TensorFlow 1](probability/contrastive_divergence_vae/tensorflow1) |
161-
| mcmc | Statistics | Training & Inference | [TensorFlow 1](probability/mcmc/tensorflow1/)|
126+
| Block-Sparse library | Sparsity | Training & Inference | [PopART](sparsity/block_sparse/popart)
162127

163128
<br>
164129

165130
### Miscellaneous <a name="miscellaneous"></a>
166131
| Model | Domain | Type |Links |
167132
| ------- | ------- |------- | ------- |
168-
| Sales forecasting | MLP (Multi-Layer Perceptron) | Training | [TensorFlow 1](miscellaneous/sales_forecasting/tensorflow1) |
169133
| Monte Carlo Ray Tracing | Graphics | Inference | [Poplar](miscellaneous/monte_carlo_ray_tracing/poplar) |
170134

171-
<br>
172-
173-
### Archived <a name="archived"></a>
174-
175-
The following applications have been archived. More information can be provided on request.
176-
| Model | Domain | Type | Framework|
177-
| ------- | ------- |------- | ------- |
178-
| Minigo | Reinforcement Learning | Training | TensorFlow 1|
179-
180-
181135
<br>
182136

183137
## Developer Resources
@@ -227,6 +181,17 @@ Unless otherwise specified by a LICENSE file in a subdirectory, the LICENSE refe
227181

228182
## Changelog
229183

184+
<details>
185+
<summary>Dec 2022</summary>
186+
<br>
187+
188+
* Added this model below to reference models
189+
* GNN: TGN (PyTorch)
190+
* Deprecating all PopART applications. Support will be removed in the next release.
191+
* Deprecated all TensorFlow 1 applications.
192+
* Deprecated Ubuntu 18.04 support.
193+
</details>
194+
230195
<details>
231196
<summary>Sep 2022</summary>
232197
<br>

ai_for_simulation/abc_covid_19/tensorflow2/README.md

Lines changed: 52 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,77 @@
1-
# Probabilistic COVID-19 modelling with Approximate Bayesian Computation (ABC)
1+
# Approximate Bayesian Computation (ABC)
2+
Approximate Bayesian Computation for probabilistic COVID-19 modelling, optimised for Graphcore's IPU.
23

3-
## Overview
4+
| Framework | domain | Model | Datasets | Tasks| Training| Inference | Reference |
5+
|-------------|-|------|-------|-------|-------|---|---|
6+
| TensorFlow2 | Simulation | ABC | CSSEGIS COVID-19 | Object detection ||| ['Accelerating Simulation-based Inference with Emerging AI Hardware'](https://ieeexplore.ieee.org/document/9325369) |
47

5-
This is a representative implementation
6-
of Approximate Bayesian Computation (ABC)
7-
for Simulation-based Inference (SBI).
8-
A detailed explanation is provided in the background section and in
9-
"Accelerating Simulation-based Inference with Emerging AI Hardware",
10-
S Kulkarni, A Tsyplikhin, MM Krell, and CA Moritz,
11-
IEEE International Conference on Rebooting Computing (ICRC), 2020.
12-
In its core, the algorithm determines simulation parameters that best
13-
describe the observed data from COVID-19 infections
14-
to enable statistical inference.
158

16-
## Dataset
9+
## Instructions summary
1710

18-
The data is provided in the script `covid_data.py`.
19-
It was extracted from the
20-
[JHU CSSE COVID-19 Data](https://github.com/CSSEGISandData/COVID-19).
21-
It contains the COVID-19 numbers (detected active cases,
22-
recovered cases, and detected cases that lead to death)
23-
after the first day with 100 known infections.
11+
1. Install and enable the Poplar SDK (see Poplar SDK setup)
2412

25-
See also:
26-
Dong E, Du H, Gardner L. An interactive web-based dashboard
27-
to track COVID-19 in real time. Lancet Inf Dis. 20(5):533-534.
28-
doi: 10.1016/S1473-3099(20)30120-1
13+
2. Install the system and Python requirements (see Environment setup)
2914

30-
## File Structure
15+
3. Download the CSSEGIS covid-19 dataset (See Dataset setup)
3116

32-
| File | Description |
33-
| ---------------------------- | ------------------------------------------ |
34-
| `README.md` | How to run the model |
35-
| `ABC_IPU.py` | Main algorithm script to run IPU model |
36-
| `argparser.py` | Document and read command line parameters |
37-
| `covid_data.py` | Provide already downloaded COVID-19 data |
38-
| `requirements.txt` | Required Python 3 packages |
39-
| `test_ABC.py` | Test script. Run using `python -m pytest` |
4017

41-
## Quick start guide
18+
## Poplar SDK setup
19+
To check if your Poplar SDK has already been enabled, run:
20+
```bash
21+
echo $POPLAR_SDK_ENABLED
22+
```
4223

43-
### 1) Download the Poplar SDK
24+
If no path is provided, then follow these steps:
25+
1. Navigate to your Poplar SDK root directory
4426

45-
Install the Poplar SDK following the instructions in the
46-
Getting Started guide for your IPU system
47-
which can be found here:
48-
https://docs.graphcore.ai/projects/ipu-pod-getting-started/en/latest/installation.html.
49-
Make sure to source the `enable.sh` script for Poplar as well as the drivers.
27+
2. Enable the Poplar SDK with:
28+
```bash
29+
cd poplar-<OS version>-<SDK version>-<hash>
30+
. enable.sh
31+
```
32+
33+
More detailed instructions on setting up your environment are available in the [poplar quick start guide](https://docs.graphcore.ai/projects/graphcloud-poplar-quick-start/en/latest/).
5034

51-
### 2) Package installation
5235

53-
Make sure that the virtualenv package is installed for Python 3.
36+
## Environment setup
37+
To prepare your environment, follow these steps:
38+
39+
1. Create and activate a Python3 virtual environment:
40+
```bash
41+
python3 -m venv <venv name>
42+
source <venv path>/bin/activate
43+
```
5444

55-
### 3) Prepare the TensorFlow environment
45+
2. Navigate to the Poplar SDK root directory
5646

57-
Activate a Python3 virtual environment with the `tensorflow`
58-
wheel version 2.4 included in the SDK as follows:
47+
3. Install the Tensorflow2 and IPU Tensorflow add-ons wheels:
48+
```bash
49+
cd <poplar sdk root dir>
50+
pip3 install tensorflow-2.X.X...<OS_arch>...x86_64.whl
51+
pip3 install ipu_tensorflow_addons-2.X.X...any.whl
52+
```
53+
For the CPU architecture you are running on
5954

55+
4. Build the custom ops:
56+
```bash
57+
cd static_ops && make
6058
```
61-
python3 -m venv venv
62-
source venv/bin/activate
63-
pip install <path to tensorflow_2.4.whl>
64-
pip install -r requirements.txt
59+
60+
61+
## Dataset setup
62+
Download the dataset from [the source](https://github.com/CSSEGISandData/COVID-19), or use the script provided:
63+
```bash
64+
python3 covid_data.py
6565
```
6666

67-
### 4) Execution
6867

68+
## Run the example
6969
To execute the application, you can run for example
7070

71-
```
72-
python ABC_IPU.py --enqueue-chunk-size 10000 --tolerance 5e5 --n-samples-target 100 --n-samples-per-batch 400000 --country US --samples-filepath US_5e5_100.txt --replication-factor 4
71+
```bash
72+
python3 ABC_IPU.py --enqueue-chunk-size 10000 --tolerance 5e5 --n-samples-target 100 --n-samples-per-batch 400000 --country US --samples-filepath US_5e5_100.txt --replication-factor 4
7373
```
7474

75-
All command line options and defaults are explained in `argparser.py`.
7675

7776
## Background
7877
We are looking at data from Italy in the Johns Hopkins University dataset
@@ -154,4 +153,4 @@ David J. Warne
154153

155154
- School of Mathematical Sciences, Faculty of Science, Queensland University of Technology, Brisbane, Australia
156155
- Centre for Data Science, Queensland University of Technology, Brisbane, Australia
157-
- ARC Centre of Excellence for Mathematical and Statistical Frontiers.
156+
- ARC Centre of Excellence for Mathematical and Statistical Frontiers.

0 commit comments

Comments
 (0)