Skip to content

Commit

Permalink
[docs] Explain how to use the IPU Model
Browse files Browse the repository at this point in the history
  • Loading branch information
giordano committed Apr 7, 2024
1 parent 3611346 commit 59cb658
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/src/poplar.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,19 @@ You can slice a tensor with the usual Julia notation `tensor[index1:index2]`, th
```@autodocs
Modules = [IPUToolkit.Poplar]
```
## Using `IPUToolkit.jl` without an IPU
While this package requires a physical IPU to use all the available features, you can still experiment with the IPU programming model even if you do not have access to a hardwre IPU.
The Poplar SDK provides a feature called IPU Model, which is a software emulation of the behaviour of the IPU hardware.
The IPU model comes with [some limitations](https://docs.graphcore.ai/projects/poplar-user-guide/en/latest/poplar_programs.html#programming-with-poplar), but it can be useful for testing or debugging.
To use the IPU model in `IPUToolkit.jl`, define the device of your IPU program with `Poplar.IPUModelCreateDevice` (which calls [`IPUModel::createDevice`](https://docs.graphcore.ai/projects/poplar-api/en/3.4.0/poplar/profiling/IPUModel.html#_CPPv4NK6poplar8IPUModel12createDeviceE11OptionFlagsbj) under the hood):
```julia
model = Poplar.IPUModel()
device = Poplar.IPUModelCreateDevice(model)
# Then the rest of the program continues as usual
target = Poplar.DeviceGetTarget(device)
graph = Poplar.Graph(target)
# ...
```

0 comments on commit 59cb658

Please sign in to comment.