PopART Python API Reference¶
The Poplar Advanced Run Time (PopART) is part of the Poplar SDK for implementing and running algorithms on networks of Graphcore IPU processors.
This document describes the PopART Python API. Many classes are wrappers around the equivalent C++ class, for example
popart.builder.Builder wraps the C++
Builder class (renamed
BuilderCore in pybind). See the PopART C++ API for details.
For more information about PopART, please refer to the PopART User Guide.
PopART Python API¶
InferenceSession(fnModel, dataFeed, deviceInfo, losses=, inputShapeInfo=<popart_core.InputShapeInfo object>, passes=None, userOptions=<popart_core.SessionOptions object>)¶
prepareDevice(self: popart_core._InferenceSessionCore, err: popart_core.PrepareDeviceError) → None¶
TrainingSession(fnModel, dataFeed, losses, optimizer, deviceInfo, inputShapeInfo=<popart_core.InputShapeInfo object>, passes=None, userOptions=<popart_core.SessionOptions object>)¶
prepareDevice(self: popart_core._TrainingSessionCore, err: popart_core.PrepareDeviceError) → None¶
Framework independent functionality for driving popart
NetWriter(inNames, outNames, losses, optimizer, dataFeed, inputShapeInfo)¶
Base class, to be inherited once per framework
perform batchesPerStep evaluation steps. This function only needs to be implemented by frameworks which will be used to verify popart. See torchwriter.py for an example implementation.
perform batchesPerStep inference steps. This function only needs to be implemented by frameworks which will be used to verify popart. See torchwriter.py for an example implementation.
To be implemented once per framework: framework specific details of generating the ONNX model and writing it to file
perform batchesPerStep training steps. This function only needs to be implemented by frameworks which will be used to verify popart. See torchwriter.py for an example implementation.
Graphcore believes that the information hereby provided is accurate as of the date of publication. Please monitor updates to ensure you have the most up to date information.
The information disclosed to you hereunder (the “Materials”) is provided solely for the selection and use of Graphcore products. To the maximum extent permitted by applicable law:
(1) Materials are made available “AS IS” and with all faults, Graphcore hereby DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
(2) Graphcore shall not be liable (whether in contract or tort, including negligence, or under any other theory of liability) for any loss or damage of any kind or nature related to, arising under, or in connection with, the Materials (including your use of the Materials), including for any direct, indirect, special, incidental, or consequential loss or damage (including loss of data, profits, goodwill, or any type of loss or damage suffered as a result of any action brought by a third party) even if such damage or loss was reasonably foreseeable or Graphcore had been advised of the possibility of the same. Graphcore assumes no obligation to correct any errors contained in the Materials or to notify you of updates to the Materials or to product specifications. Graphcore products are not designed or intended to be fail-safe or for use in any application requiring fail-safe performance; you assume sole risk and liability for use of Graphcore products in such critical applications.
Trademarks & copyright¶
Graphcore® and Poplar® are Registered Trademarks of Graphcore Ltd. PopART™, IPU-Core™, In-Processor-Memory™, IPU-Tile™, IPU-Exchange™, IPU-Machine™, IPU-POD™, IPU-GW-Link™, IPU-Link™ and Virtual-IPU™ are trademarks of Graphcore Ltd. All other trademarks are the property of their respective owners.
© Copyright 2016-2020, Graphcore Ltd.