Poplar and PopLibs
poplar::Executable Class Reference

An instance of poplar::Executable contains all of the information needed to run a program on an IPU device. More...

#include <Executable.hpp>

Public Member Functions

void serialize (std::ostream &out) const
 Serialize an executable to a stream. More...
 

Static Public Member Functions

static Executable deserialize (std::istream &in, bool checkPackageHash=true)
 Load an executable from a stream. More...
 
static Executable deserialize (std::unique_ptr< std::istream > in, bool checkPackageHash=true)
 Load an executable from a stream. More...
 

Detailed Description

An instance of poplar::Executable contains all of the information needed to run a program on an IPU device.

It can be saved to or loaded from disk.

Member Function Documentation

◆ deserialize() [1/2]

static Executable poplar::Executable::deserialize ( std::istream &  in,
bool  checkPackageHash = true 
)
static

Load an executable from a stream.

Parameters
inThe stream to read from. It must be seekable.
checkPackageHashFlag to control package hash check (true by default).

◆ deserialize() [2/2]

static Executable poplar::Executable::deserialize ( std::unique_ptr< std::istream >  in,
bool  checkPackageHash = true 
)
static

Load an executable from a stream.

Note
This overload used to be more efficient by avoiding copying the archive from the executable to a temporary file. However now the executable needs to be decompressed this interface also stores the decompressed archive in a temporary file and so is equivalent to the other overload.
Parameters
inThe stream to read from.
checkPackageHashFlag to control package hash check (true by default).

◆ serialize()

void poplar::Executable::serialize ( std::ostream &  out) const

Serialize an executable to a stream.

All of the binary files and metadata needed to run a Poplar executable will be written to the stream. Currently the format is opaque, and compatibility between different versions of Poplar is not guaranteed.

Parameters
outThe stream to write to. It must be seekable.
Exceptions
poplar_errorif the target is not an IPU - this cannot be used to serialise CPU or IPU_MODEL executables.

The documentation for this class was generated from the following file: