Exceptions

#include <poplar/exceptions.hpp>
namespace poplar

Poplar classes and functions.

Enums

enum RecoveryAction

An enumeration that specifies how to recover from a recoverable_runtime_error.

Values:

enumerator IPU_RESET

Reset the IPU and reload IPU memory.

enumerator PARTITION_RESET

Reset the IPU partition. This retrains the IPU-links between IPUs.

enumerator FULL_RESET

Power cycle the system.

Functions

std::string toString(RecoveryAction recoveryAction)

Convert the recovery action to a string.

std::ostream &operator<<(std::ostream &os, RecoveryAction recoveryAction)
struct application_runtime_error : public poplar::runtime_error
#include <exceptions.hpp>

This exception is thrown when running a program fails due to an error in the program or a misuse of an API.

Public Functions

application_runtime_error(const std::string &s)
application_runtime_error(const char *s)
struct control_program_error : public poplar::poplar_error
#include <exceptions.hpp>

This exception is thrown when the construction of a graph program is invalid.

Public Functions

control_program_error(const std::string &msg)
struct file_load_error : public poplar::poplar_error

Public Functions

file_load_error(const std::string &path)
struct graph_connection_error : public poplar::poplar_error
#include <exceptions.hpp>

This exception is thrown during construction of an Engine object if there is an error in the structure of graph, for example, if there are no edges to a vertex input or if there are multiple edges to a vertex input.

Public Functions

graph_connection_error(const std::string &s)
graph_connection_error(const char *s)
struct graph_cycle_error : public poplar::poplar_error
#include <exceptions.hpp>

This exception is thrown during the construction is an Engine object if there are any cycles in the graph that are not broken by recurrent edges.

Public Functions

graph_cycle_error(const std::string &s)
graph_cycle_error(const char *s)
struct graph_memory_allocation_error : public poplar::poplar_error
#include <exceptions.hpp>

This exception is thrown when an memory allocation fails.

Public Functions

graph_memory_allocation_error(const std::string &s)
graph_memory_allocation_error(const char *s)

Public Members

std::string profilePath

Holds the absolute path to the profile.pop file that was produced when this error occurred.

Empty if no profile.pop file was produced.

struct graph_object_creation_error : public poplar::poplar_error
#include <exceptions.hpp>

This exception is thrown in the construction of a GraphProgEnv object if there was an error in the creation of the graph program object file.

Public Functions

graph_object_creation_error(const std::string &s)
graph_object_creation_error(const char *s)
struct graph_object_load_error : public poplar::poplar_error
#include <exceptions.hpp>

This exception is thrown in the construction of a GraphProgEnv object if there was an error in loading the graph program object file.

Public Functions

graph_object_load_error(const std::string &path, const std::string &error)
struct graph_program_compilation_error : public poplar::poplar_error
#include <exceptions.hpp>

This exception is thrown in the construction of a GraphProgEnv object if there are any compilation errors in the graph program.

Public Functions

graph_program_compilation_error(const std::string &s)
graph_program_compilation_error(const char *s)
struct graph_replication_error : public poplar::poplar_error
#include <exceptions.hpp>

This exception is thrown when an invalid operation is carried out on a replicated graph.

Public Functions

graph_replication_error(const std::string &s)
graph_replication_error(const char *s)
struct index_error : public poplar::poplar_error
#include <exceptions.hpp>

This exception is thrown if the index of a subscript is out of the bounds of the field it is accessing or if a index of a tensor is invalid.

Public Functions

index_error(const std::string &s)
index_error(const char *s)
index_error(const std::string &vertexDotField, std::size_t index)
struct invalid_machine_model : public poplar::poplar_error
#include <exceptions.hpp>

This exception is thrown when an invalid model of the IPU (for performance model profiling) has been specified.

Public Functions

invalid_machine_model(const std::string &s)
invalid_machine_model(const char *s)
struct invalid_option : public poplar::poplar_error
#include <exceptions.hpp>

This exception is thrown when an unrecognised or invalid option is passed to a Poplar API.

Public Functions

invalid_option(const std::string &s)
invalid_option(const char *s)
struct invalid_tile_mapping : public poplar::poplar_error
#include <exceptions.hpp>

This exception is thrown when the tile mapping passed to the UserTilePartitioner is invalid.

Public Functions

invalid_tile_mapping(const std::string &s)
invalid_tile_mapping(const char *s)
#include <exceptions.hpp>

This exception is thrown when the linking stage for codelets fails.

output is the output from the linker command.

Public Functions

Public Members

struct memory_elem_constraints_error : public poplar::poplar_error
#include <exceptions.hpp>

This exception is thrown when an invalid memory element constraint has been provided in a codelet.

Public Functions

memory_elem_constraints_error(const std::string &s)
memory_elem_constraints_error(const char *s)
struct missing_perf_estimate : public poplar::poplar_error
#include <exceptions.hpp>

This exception is thrown when an Engine is constructed with profiling enabled but a vertex does not have a getPerfEstimate method specified.

Public Functions

missing_perf_estimate(const std::string &vertexName)
struct no_environment : public poplar::poplar_error
#include <exceptions.hpp>

This exception is thrown, in the construction of a GraphProgEnv object, in mixed-mode compilation, if there is no graph-programming environment available, in particular if the program has not been compiled with the ‘popc’ command-line tool.

Public Functions

no_environment(const std::string &s)
no_environment(const char *s)
struct no_size_specified : public poplar::poplar_error
#include <exceptions.hpp>

This exception is thrown if the size of a field is not specified in a Graph object when an EngineBuilder object is constructed.

Public Functions

no_size_specified(const std::string &s)
no_size_specified(const char *s)
no_size_specified(const std::string &fieldName, const std::string &vertexName)
struct overflow_error : public poplar::poplar_error
#include <exceptions.hpp>

This exception is thrown when an arithmetic overflow occurs within Poplar.

Public Functions

overflow_error(const std::string &s)
overflow_error(const char *s)
struct parse_error : public poplar::poplar_error
#include <exceptions.hpp>

This exception is thrown when an input file or string cannot be parsed.

Public Functions

parse_error(const std::string &s)
parse_error(const char *s)
struct poplar_error : public runtime_error
#include <exceptions.hpp>

Base class for Poplar exceptions.

Subclassed by poplar::control_program_error, poplar::file_load_error, poplar::graph_connection_error, poplar::graph_cycle_error, poplar::graph_memory_allocation_error, poplar::graph_object_creation_error, poplar::graph_object_load_error, poplar::graph_program_compilation_error, poplar::graph_replication_error, poplar::index_error, poplar::invalid_machine_model, poplar::invalid_option, poplar::invalid_tile_mapping, poplar::link_error, poplar::memory_elem_constraints_error, poplar::missing_perf_estimate, poplar::no_environment, poplar::no_size_specified, poplar::overflow_error, poplar::parse_error, poplar::profiling_disabled, poplar::runtime_error, poplar::stream_connection_error, poplar::stream_memory_allocation_error, poplar::symbol_error, poplar::tensor_creation_error, poplar::tensor_io_state_error, poplar::type_error, poplar::unknown_field, poplar::unknown_vertex_type

Public Functions

poplar_error(const std::string &s)
poplar_error(const char *s)

Public Members

std::string type
struct profiling_disabled : public poplar::poplar_error
#include <exceptions.hpp>

This exception is thrown if profiling information is requested from an Engine but that Engine has not been constructed with profiling enabled.

Public Functions

profiling_disabled()
struct recoverable_runtime_error : public poplar::system_runtime_error
#include <exceptions.hpp>

This exception is thrown when when running a program fails due to a system error that is likely to be transient.

getRecoveryAction() indicates what to do to recover from this error.

Public Functions

RecoveryAction getRecoveryAction() const

Return the action required to recover from error.

recoverable_runtime_error(RecoveryAction recoveryAction, const std::string &s)
recoverable_runtime_error(RecoveryAction recoveryAction, const char *s)

Private Members

RecoveryAction recoveryAction
struct runtime_error : public poplar::poplar_error
#include <exceptions.hpp>

This exception is thrown when running a program on a system fails.

Subclassed by poplar::application_runtime_error, poplar::system_runtime_error

Public Functions

runtime_error(const std::string &s)
runtime_error(const char *s)

Public Members

std::vector<ErrorInfo> errors

Additional information about why the exception was thrown.

Can be empty. The order of ErrorInfo objects is not necessarily deterministic.

struct ErrorInfo

Public Members

ErrorCode code

A unique number to identify the error.

ErrorLocation location

An object that uniquely specifies the location of an error in a device.

If this attribute has not been set (bool)location will be false.

bool isSimulated

True if the exception has been simulated and false otherwise.

struct stream_connection_error : public poplar::poplar_error
#include <exceptions.hpp>

This exception is thrown when an invalid attempt is made to connect a data stream.

Public Functions

stream_connection_error(const std::string &s)
stream_connection_error(const char *s)
struct stream_memory_allocation_error : public poplar::poplar_error
#include <exceptions.hpp>

This exception is thrown when allocation of stream buffers fails.

Public Functions

stream_memory_allocation_error(const std::string &s)
stream_memory_allocation_error(const char *s)
struct symbol_error : public poplar::poplar_error

Public Functions

symbol_error(const std::string &name, const unsigned tile)
struct system_runtime_error : public poplar::runtime_error
#include <exceptions.hpp>

This exception is thrown when running a program fails due to an error in the system it is running on.

Subclassed by poplar::recoverable_runtime_error, poplar::unknown_runtime_error, poplar::unrecoverable_runtime_error

Public Functions

system_runtime_error(const std::string &s)
system_runtime_error(const char *s)
struct tensor_creation_error : public poplar::poplar_error
#include <exceptions.hpp>

This exception is thrown in the construction of a tensor if invalid arguments are provided to the tensor creation function or method.

Public Functions

tensor_creation_error(const std::string &s)
tensor_creation_error(const char *s)
struct tensor_io_state_error : public poplar::poplar_error
#include <exceptions.hpp>

This exception is thrown when an attempt is made to mark a tensor as an input or output, but the argument references a view of a tensor, rather than a whole tensor.

Public Functions

tensor_io_state_error(const std::string &s)
tensor_io_state_error(const char *s)
struct type_error : public poplar::poplar_error
#include <exceptions.hpp>

This exception is thrown when there is an error related to the field types of vertices, for example, when the source of an edge contains an input, the types of inputs and source field between an edge do not match, or when a field cannot be subscripted.

Public Functions

type_error(const std::string &s)
type_error(const char *s)
struct unknown_field : public poplar::poplar_error
#include <exceptions.hpp>

This exception is thrown when a field name is specified that does not exist in the graph-programming environment.

Public Functions

unknown_field(const std::string &s)
unknown_field(const char *s)
unknown_field(const std::string &fieldName, const std::string &vertexTypeName)
struct unknown_runtime_error : public poplar::system_runtime_error
#include <exceptions.hpp>

This exception is throw when execution fails due to a system error where the cause cannot be automatically determined, for example a timeout without a specific error being raised.

Public Functions

unknown_runtime_error(const std::string &s)
unknown_runtime_error(const char *s)
struct unknown_vertex_type : public poplar::poplar_error
#include <exceptions.hpp>

This exception is thrown when a vertex type name is specified that does not exist in the graph programming environment.

Public Functions

unknown_vertex_type(const std::string &name)
struct unrecoverable_runtime_error : public poplar::system_runtime_error
#include <exceptions.hpp>

This exception is thrown when execution fails due to a system error that is likely to persist.

The system should be taken out of operation for analysis and repair.

Public Functions

unrecoverable_runtime_error(const std::string &s)
unrecoverable_runtime_error(const char *s)