MetadataCreation

#include <poplar/MetadataCreation.hpp>
namespace poplar

Poplar classes and functions.

Functions

poplar::Tensor createConstantMetadataTensor(poplar::Graph &graph, poplar::QuarterMetadata::Format fp8Format, int fp8Scale, const DebugContext &debugContext = {})

Create a poplar::QUARTER_METADATA tensor for use with tensors with data type = poplar::QUARTER.

Parameters
Returns

A constant tensor of type poplar::QUARTER_METADATA initialised with the format and scale provided.

poplar::Tensor createVariableMetadataTensor(poplar::Graph &graph, poplar::QuarterMetadata::Format fp8Format, int fp8Scale, const DebugContext &debugContext = {})

Create a poplar::QUARTER_METADATA tensor for use with tensors with data type = poplar::QUARTER.

Parameters
Returns

A variable tensor of type QUARTER_METADATA initialised with the format and scale provided.

poplar::Tensor createVariableMetadataTensor(poplar::Graph &graph, poplar::QuarterMetadata::Format fp8Format, const poplar::Tensor &fp8Scale, poplar::program::Sequence &prog, const DebugContext &debugContext = {})

Create a poplar::QUARTER_METADATA tensor for use with tensors with data type = poplar::QUARTER.

Parameters
Returns

A variable tensor of type QUARTER_METADATA initialised with the format and scale provided.

void setMetadataTensor(poplar::Graph &graph, poplar::QuarterMetadata::Format fp8Format, const poplar::Tensor &fp8Scale, const poplar::Tensor &metadataOut, poplar::program::Sequence &prog, const DebugContext &debugContext = {})

Write to an existing poplar::QUARTER_METADATA tensor, for use with tensors with data type = poplar::QUARTER.

Parameters