Skip to content

Commit 2d8b565

Browse files
Updates with Poplar SDK 3.2 release
1 parent 69f35e6 commit 2d8b565

File tree

2,361 files changed

+158092
-143105
lines changed

Some content is hidden

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

2,361 files changed

+158092
-143105
lines changed

.git-blame-ignore-revs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Reformat with black & clang-format
2+
02f34546c54ed62ded7f43c33cb203aa1dc5c88a
3+
4+
# Refactor public_examples taxonomy
5+
8db3486cd7d559517dc2e275bc3477bebd31f262
6+
7+
# Add more pre-commit hooks, add black to docs & jupyter
8+
62ffeefaf3266b01a3ad012545d0a82383398a47

.gitignore

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,46 @@
77
*.bin
88

99
**/weights
10-
**/images
10+
1111
**/checkpoints
1212

1313
**/model
1414
**/data
1515
**/logs
16+
**/*ubyte*
17+
**/exe_cache
18+
**/tf_report_*
19+
**/images
1620

1721
**/cifar-10-batches-bin
1822

1923
*.pyc
2024
__pycache__
2125
.cache
26+
.ipu_cache
27+
2228
*.csv
2329
*.json
30+
!codeowners.json
2431
*.log
2532
*.so
2633
*.lock
27-
report.txt
2834
archive.a
2935
vars.capnp
36+
debug.cbor
37+
profile.pop*
38+
report.txt
3039

3140
*.onnx
3241
*.popef
42+
*.pvti
3343

3444
.DS_Store
3545

3646
.idea
3747
.project
3848
.pydevproject
49+
.hypothesis
3950

4051
# Remove VIM temp files
4152
*.swp
@@ -56,3 +67,6 @@ nohup.*
5667

5768
utils/triton_server/backends
5869
!vision/cnns/pytorch/tests/tritonserver/models/*/*/*.json
70+
71+
# cppimport files
72+
.rendered.*

.pre-commit-config.yaml

Lines changed: 55 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,64 @@
22
# pre-commit autoupdate
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v3.3.0
5+
rev: v4.4.0
66
hooks:
7+
- id: check-json
8+
- id: check-yaml
9+
- id: check-merge-conflict
10+
- id: debug-statements
11+
- id: check-added-large-files
712
- id: no-commit-to-branch
813
args: [--branch, master, --branch, main]
9-
- repo: https://github.com/pre-commit/mirrors-autopep8
10-
rev: v1.6.0 # v1.7.0 is not compatible with python3.6
14+
- id: end-of-file-fixer
15+
- id: mixed-line-ending
16+
args: ["--fix=lf"]
17+
- id: trailing-whitespace
18+
- repo: https://github.com/psf/black
19+
rev: 22.12.0
1120
hooks:
12-
- id: autopep8
13-
args: [--in-place, --list-fixes, --ignore, 'E251,E303,E402,E501,E701,E226,E24,W50,W690']
21+
- id: black
22+
args: [--line-length, "120"]
23+
- id: black-jupyter
24+
files: '.*\.ipynb'
25+
- repo: https://github.com/asottile/blacken-docs
26+
rev: 1.13.0
27+
hooks:
28+
- id: blacken-docs
29+
additional_dependencies:
30+
- black==22.12.0
31+
- repo: https://github.com/ssciwr/clang-format-hook
32+
rev: v15.0.6
33+
hooks:
34+
- id: clang-format
35+
args: [-i]
36+
# Exclude protobuff files
37+
exclude: '^(.*pb\.h)|(.*pb\.cc)$'
1438
- repo: local
1539
hooks:
16-
- id: copyright-header-check
17-
name: Copyright header check
18-
description: Ensures that files have the proper copyright line at the top
19-
entry: python3 -m examples_utils test_copyright --amend --exclude_json utils/examples_tests/copyright_header_test_exclude.json
20-
pass_filenames: false
21-
language: python
22-
additional_dependencies:
23-
- 'git+https://github.com/graphcore/examples-utils.git@latest_stable'
40+
- id: copyright-header-check
41+
name: Copyright header check
42+
description: Ensures that files have the proper copyright line at the top
43+
entry: python3 -m examples_utils test_copyright --amend --exclude_json utils/examples_tests/copyright_header_test_exclude.json
44+
pass_filenames: false
45+
language: python
46+
additional_dependencies:
47+
- "git+https://github.com/graphcore/examples-utils@f8673d362fdc7dc77e1fee5f77cbcd81dd9e4a2e"
48+
- id: trademark-linter
49+
name: Trademark linter
50+
description: Ensures that files have the proper trademark line.
51+
entry: python3 -m utils.linters.trademark.trademark
52+
language: python
53+
- repo: https://github.com/codespell-project/codespell
54+
rev: v2.1.0
55+
hooks:
56+
- id: codespell
57+
args: [-I, utils/linters/codespell_ignore.txt]
58+
exclude: |
59+
(?x)^(
60+
nlp/gpt2/pytorch/tokenizer/gpt2-merges-50256.txt |
61+
nlp/gpt2/pytorch/tokenizer/gpt2-vocab-50256.json |
62+
speech/fastpitch/pytorch/filelists/ljs_audio_text_train_filelist.txt |
63+
speech/fastpitch/pytorch/filelists/ljs_mel_dur_pitch_text_train_filelist.txt |
64+
gnn/nbfnet/pytorch_geometric/static/fb15k-237_entitymapping.txt
65+
)$

LICENSE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
SOFTWARE.
22-

README.md

Lines changed: 49 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,26 @@ 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.1.x, and has been tested using Ubuntu 20.04 and Python 3.8
13+
> The code presented here requires using Poplar SDK 3.2.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

17+
## Developer Resources
18+
- [Documentation](https://docs.graphcore.ai/en/latest/): Explore our software documentation, user guides, and technical notes
19+
- [Tutorials](https://github.com/graphcore/tutorials/tree/master/tutorials): Hands-on code tutorials, simple application and feature examples
20+
- [How-to Videos](https://www.graphcore.ai/resources/how-to-videos): Watch practical how-to videos and demos by Graphcore engineers
21+
- [Research Papers](https://www.graphcore.ai/resources/research-papers): Read publications from Graphcore's Research team and IPU innovators
22+
23+
## Support
24+
25+
If you encounter a problem or want to suggest an improvement to our example application please raise a Github issue, contact us at
26+
[support@graphcore.ai](mailto:support@graphcore.ai?subject=Applications%20Feedback), or get in touch through the #help channel of our slack community!
27+
28+
[![Join our Slack Community](https://img.shields.io/badge/Slack-Join%20Graphcore's%20Community-blue?style=flat-square&logo=slack)](https://www.graphcore.ai/join-community)
29+
1730
If you require POD128/256 setup and configuration for our applications, please contact [our engineering support](https://www.graphcore.ai/support).
1831
<br>
19-
<br>
32+
2033

2134
## Repository contents
2235
1. [Computer Vision](#cv)
@@ -40,15 +53,13 @@ If you require POD128/256 setup and configuration for our applications, please c
4053
| Model | Domain | Type |Links |
4154
| ------- | ------- |------- | ------- |
4255
| 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)
4456
| EfficientNet | Image Classification | Training & Inference | [PyTorch](vision/cnns/pytorch/), [PyTorch Lightning](https://github.com/graphcore/pytorch-lightning-examples/tree/release/applications)|
4557
| MobileNetv3 | Image Classification | Training & Inference | [PyTorch](vision/cnns/pytorch/) |
46-
| ViT(Vision Transformer) | Image Classification | Training| [PyTorch](vision/vit/pytorch/), [Hugging Face Optimum](https://huggingface.co/Graphcore/vit-base-ipu) |
47-
| DINO | Image Classification | Training| [PyTorch](vision/dino/pytorch) |
58+
| ViT(Vision Transformer) | Image Classification | Training | [PyTorch](vision/vit/pytorch/), [Hugging Face Optimum](https://huggingface.co/Graphcore/vit-base-ipu) |
59+
| DINO | Image Classification | Training | [PyTorch](vision/dino/pytorch) |
4860
| Swin | Image Classification | Training | [PyTorch](vision/swin/pytorch) |
4961
| MAE (Masked AutoEncoder) | Image Classification | Training | [PyTorch](vision/mae/pytorch) |
5062
| Yolov4-P5 | Object Detection | Inference | [PyTorch](vision/yolo_v4/pytorch) |
51-
| Faster RCNN | Object Detection | Training & Inference | [PopART](vision/faster_rcnn/popart) |
5263
| EfficientDet | Object Detection | Inference | [TensorFlow 2](vision/efficientdet/tensorflow2) |
5364
| UNet (Medical) | Image segmentation | Training & Inference | [TensorFlow 2](vision/unet_medical/tensorflow2) |
5465
| Neural Image Fields | Neural Radiance Fields | Training | [TensorFlow 2](vision/neural_image_fields/tensorflow2) |
@@ -58,17 +69,18 @@ If you require POD128/256 setup and configuration for our applications, please c
5869

5970
| Model | Domain | Type |Links |
6071
| ------- | ------- |------- | ------- |
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)|
62-
| Packed BERT | NLP | Training |[PyTorch](nlp/bert/pytorch), [PopART](nlp/bert/popart) |
72+
| BERT | NLP | Training & Inference | [PyTorch](nlp/bert/pytorch) , [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)|
73+
| Packed BERT | NLP | Training |[PyTorch](nlp/bert/pytorch) |
6374
| GPT2 | NLP | Training |[PyTorch](nlp/gpt2/pytorch) , [Hugging Face Optimum](https://huggingface.co/Graphcore/gpt2-medium-ipu) |
6475
| GPTJ | NLP | Training |[PopXL](nlp/gpt_j/popxl)|
6576
| GPT3-2.7B | NLP | Training |[PopXL](nlp/gpt3_2.7B/popxl) |
77+
| GPT3-175B | NLP | Training |[PopXL](nlp/gpt3_175B/popxl) |
6678
| RoBERTa | NLP | Training | [Hugging Face Optimum](https://huggingface.co/Graphcore/roberta-large-ipu)|
6779
| DeBERTa | NLP | Training | [Hugging Face Optimum](https://huggingface.co/Graphcore/deberta-base-ipu)|
6880
| HuBERT | NLP | Training | [Hugging Face Optimum](https://huggingface.co/Graphcore/hubert-base-ipu)|
6981
| BART | NLP | Training | [Hugging Face Optimum](https://huggingface.co/Graphcore/bart-base-ipu)|
7082
| T5 | NLP | Training | [Hugging Face Optimum](https://huggingface.co/Graphcore/t5-small-ipu)|
71-
83+
| Bloom | NLP | Inference |[PopXL](nlp/bloom/popxl) |
7284

7385
<br>
7486

@@ -77,11 +89,8 @@ If you require POD128/256 setup and configuration for our applications, please c
7789

7890
| Model | Domain | Type |Links |
7991
| ------- | ------- |------- | ------- |
80-
| DeepVoice3 | TTS (TextToSpeech) | Training & Inference |[PopART](speech/deepvoice3/popart) |
81-
| FastSpeech2 | TTS(TextToSpeech) | Training & Inference | [TensorFlow 2](speech/fastspeech2/tensorflow2) |
8292
| Fastpitch | TTS (TextToSpeech) | Training | [PyTorch](speech/fastpitch/pytorch) |
83-
| Conformer | STT(SpeechToText) | Training & Inference | [PopART](speech/conformer/popart), [PyTorch](speech/conformer/pytorch)|
84-
| Transfomer Transducer | STT(SpeechToText) | Training & Inference | [PopART](speech/transformer_transducer/popart) |
93+
| Conformer | STT(SpeechToText) | Training & Inference | [PyTorch](speech/conformer/pytorch)|
8594
| Wav2Vec2 | STT(SpeechToText) | Training | [Hugging Face Optimum](https://huggingface.co/Graphcore/wav2vec2-base-ipu)|
8695

8796
<br>
@@ -94,78 +103,51 @@ If you require POD128/256 setup and configuration for our applications, please c
94103
| CLIP | multimodal | Training |[PyTorch](multimodal/CLIP/pytorch)|
95104
| LXMERT | multimodal | Training | [Hugging Face Optimum](https://huggingface.co/Graphcore/lxmert-base-ipu)|
96105
| Frozen in time | multimodal | Training & Inference |[PyTorch](multimodal/frozen_in_time/pytorch)|
97-
| ruDalle (Preview) | multimodal | Inference |[PopXL](preview/multimodal/rudalle)|
98106

99107
<br>
100108

101109
### <img width="25" src="https://user-images.githubusercontent.com/81682248/177357459-84ed7863-6477-4d8f-b63e-3db6c2ad405c.png"></a> Graph Neural Network <a name="gnn"></a>
102110

103111
| Model | Domain | Type |Links |
104112
| ------- | ------- |------- | ------- |
105-
| MPNN (Message Passing Neural Networks) | GNN | Training & Inference | [TensorFlow 2](gnn/message_passing/tensorflow2) |
113+
| MPNN (Message Passing Neural Networks) | GNN | Training & Inference | [PyTorch Geometric](gnn/message_passing/pytorch_geometric) , [TensorFlow 2](gnn/message_passing/tensorflow2) |
106114
| Spektral GNN library with QM9 | GNN | Training | [TensorFlow 2](gnn/spektral/tensorflow2) |
107-
| Cluster GCN | GNN | Training & Inference | [TensorFlow 2](gnn/cluster_gcn/tensorflow2) |
115+
| Cluster GCN | GNN | Training & Inference | [PyTorch Geometric](gnn/cluster_gcn/pytorch_geometric) , [TensorFlow 2](gnn/cluster_gcn/tensorflow2) |
108116
| TGN (Temporal Graph Networks) | GNN | Training | [PyTorch](gnn/tgn/pytorch) |
117+
| NBFNet | GNN | Training & Inference | [PyTorch Geometric](gnn/nbfnet/pytorch_geometric) |
118+
| SchNet | GNN | Training & Inference | [PyTorch Geometric](gnn/schnet/pytorch_geometric) |
119+
| GPS++ - OGB-LSC PCQM4Mv2 competition submission | GNN | Training & Inference | [TensorFlow 2](gnn/ogb_lsc_pcqm4mv2/tensorflow2) |
109120

110121
<br>
111122

112123
### <img width="25" src="https://user-images.githubusercontent.com/81682248/177359725-f8b1c268-ddbb-41c5-a037-16168564cacc.png"></a> AI for Simulation <a name="simulation"></a>
113124

114125
| Model | Domain | Type |Links |
115126
| ------- | ------- |------- | ------- |
116-
| DeepDriveMD | Biology (Protein folding) | Training | [TensorFlow 2](ai_for_simulation/deep_drive_md/tensorflow2) |
117127
| Approximate Bayesian Computation (ABC) COVID-19 | Medical | Inference | [TensorFlow 2](ai_for_simulation/abc_covid_19/tensorflow2) |
118128

119129

120130
<br>
121131

122-
### <img width="25" src="https://user-images.githubusercontent.com/81682248/177373761-77d40785-5390-400b-ad9f-305f4fd54a05.png"></a> Sparsity <a name="sparsity"></a>
123-
124-
| Model | Domain | Type |Links |
125-
| ------- | ------- |------- | ------- |
126-
| Block-Sparse library | Sparsity | Training & Inference | [PopART](sparsity/block_sparse/popart)
127-
128-
<br>
129-
130-
### Miscellaneous <a name="miscellaneous"></a>
131-
| Model | Domain | Type |Links |
132-
| ------- | ------- |------- | ------- |
133-
| Monte Carlo Ray Tracing | Graphics | Inference | [Poplar](miscellaneous/monte_carlo_ray_tracing/poplar) |
134-
135-
<br>
136-
137-
## Developer Resources
138-
- [Documentation](https://docs.graphcore.ai/en/latest/): Explore our software documentation, user guides, and technical notes
139-
- [Tutorials](https://github.com/graphcore/tutorials/tree/master/tutorials): Hands-on code tutorials, simple application and feature examples
140-
- [How-to Videos](https://www.graphcore.ai/resources/how-to-videos): Watch practical how-to videos and demos by Graphcore engineers
141-
- [Research Papers](https://www.graphcore.ai/resources/research-papers): Read publications from Graphcore's Research team and IPU innovators
142-
143-
<br>
144132

145133
## Benchmarking tools
146134
To easily run the examples with tested and optimised configurations and to reproduce the performance shown on our [performance results page](https://www.graphcore.ai/performance-results), you can use the examples-utils benchmarking module, which comes with every example when you install its requirements. To use this simple, shared interface for almost any of the examples provided here, locate and look through the example's `benchmarks.yml` file and run:
147135

148-
```python
136+
```bash
149137
python3 -m examples_utils benchmark --spec <path to benchmarks.yml file> --benchmark <name of benchmark>
150138
```
151139

152140
For more information on using the examples-utils benchmarking module, please refer to [the README](https://github.com/graphcore/examples-utils/blob/master/examples_utils/benchmarks/README.md).
153141

154142
<br>
155143

156-
## PopVision Tools
144+
## PopVision® Tools
157145
Visualise your code's inner workings with a user-friendly, graphical interface to optimise your machine learning models.
158146

159147
[Download](https://www.graphcore.ai/developer/popvision-tools) PopVision to analyse IPU performance and utilisation.
160148

161149
<br>
162150

163-
## Support
164-
If you encounter a problem or want to suggest an improvement to our examples please raise a Github issue or contact us at
165-
[support@graphcore.ai](mailto:support@graphcore.ai?subject=General%20Feedback).
166-
167-
<br>
168-
169151
## Utilities
170152
The [utils/](utils) folder contains utilities libraries and scripts that are used across the other code examples. This includes:
171153

@@ -181,15 +163,31 @@ Unless otherwise specified by a LICENSE file in a subdirectory, the LICENSE refe
181163

182164
## Changelog
183165

166+
<details>
167+
<summary>March 2023</summary>
168+
<br>
169+
170+
* Added this model below to reference models
171+
* GNN: NBFNet (PyTorch Geometric), SchNet (PyTorch Geometric), Cluster-GCN (PyTorch Geometric), GIN (PyTorch Geometric), GPS++ - OGB-LSC PCQM4Mv2 competition submission (TensorFlow 2)
172+
* NLP : GPT3_175B (PopXL), Bloom (PopXL)
173+
* Removed all PopART applications, as well as the following:
174+
* Miscellaneous: Monte-Carlo ray tracing
175+
* AI for simulation: DeepDriveMD
176+
* (Preview) Multimodel: ruDalle
177+
* Speech: FastSpeech2
178+
* Vision: ResNeXt inference
179+
* Moved the contents of the [Graphcore/tutorials](https://github.com/graphcore/tutorials) repository into this repository (PopART tutorials have also been removed)
180+
</details>
181+
184182
<details>
185183
<summary>Dec 2022</summary>
186184
<br>
187185

188186
* Added this model below to reference models
189187
* GNN: TGN (PyTorch)
190188
* Deprecating all PopART applications. Support will be removed in the next release.
191-
* Deprecated all TensorFlow 1 applications.
192-
* Deprecated Ubuntu 18.04 support.
189+
* Removed all TensorFlow 1 applications.
190+
* Ubuntu 18.04 no longer supported.
193191
</details>
194192

195193
<details>
@@ -250,14 +248,15 @@ Unless otherwise specified by a LICENSE file in a subdirectory, the LICENSE refe
250248
* Added those models below to reference models
251249
* Vision : miniDALL-E(PyTorch), Faster RCNN(PopART), UNet(TensorFlow 2), ResNet50(TensorFlow 2)
252250
* NLP : BERT(TensorFlow 2)
253-
* Speech : FastSpeech2(TensorFlow 2), Transfomer Transducer(PopART), Conformer-Small(PyTorch)
251+
* Speech : FastSpeech2(TensorFlow 2), Transformer Transducer(PopART), Conformer-Small(PyTorch)
254252
* GNN : TGN(TensorFlow 1), MPNN(TensorFlow 2)
255253
</details>
256254

257255
<br>
258256

259257
## Connect with us
260258
<p align="center">
259+
<a href="https://www.graphcore.ai/join-community"><img src="https://img.shields.io/badge/Slack-4A154B.svg?style=for-the-badge&logo=Slack&logoColor=white"/></a>
261260
<a href="https://twitter.com/graphcoreai"><img src="https://img.shields.io/badge/Twitter-1DA1F2.svg?style=for-the-badge&logo=Twitter&logoColor=white"/></a>
262261
<a href="https://www.linkedin.com/company/graphcore"><img src="https://img.shields.io/badge/LinkedIn-0A66C2.svg?style=for-the-badge&logo=LinkedIn&logoColor=white"/></a>
263262
<a href="http://www.facebook.com/pages/Graphcore/890447934394683"><img src="https://img.shields.io/badge/Facebook-1877F2.svg?style=for-the-badge&logo=Facebook&logoColor=white"/></a>

0 commit comments

Comments
 (0)