RandomSeed

#include <poplar/RandomSeed.hpp>
namespace poplar

Poplar classes and functions.

Functions

Tensor getHwSeeds(Graph &graph, program::Sequence &prog, const DebugContext &debugContext = {})

Gets a snapshot of the h/w seeds for each worker in device.

Parameters
  • graph – The Poplar graph.

  • prog – The program sequence to be extended.

  • debugPrefix – The prefix prepended to debugging info.

Returns

A tensor of shape {number of tiles, number of worker contexts, 4}, containing seed values for each of the 4 PRNG_x_y registers for each worker context on each tile.

void setHwSeeds(Graph &graph, const Tensor &hwSeeds, program::Sequence &prog, const DebugContext &debugContext = {})

Sets the hw seeds for each worker in a device from a snapshot of the seeds.

Parameters
  • graph – The Poplar graph.

  • hwSeeds – A tensor of shape {number of tiles, number of worker contexts, 4} containing seed values for each of the 4 PRNG_x_y registers for each worker context on each tile.

  • prog – The program sequence to be extended.

  • debugPrefix – The prefix prepended to debugging info.