8#ifndef poputil_Broadcast_hpp
9#define poputil_Broadcast_hpp
10#include <poplar/Tensor.hpp>
A reference to a subset of tensor elements.
Definition: Tensor.hpp:38
General utility functions for building graphs.
Definition: GfloatExprUtil.hpp:23
bool canBroadcastToMatch(const poplar::Tensor &a, const poplar::Tensor &b)
Test if the given tensors can be broadcast to match one another using the rules for broadcastToMatch(...
void expandToMatchRanks(poplar::Tensor &a, poplar::Tensor &b)
Match dimensions of two tensors using numpy-style expansion rules.
void broadcastToMatch(poplar::Tensor &a, const std::vector< std::size_t > &shape)
Match dimensions of a tensor to a shape using numpy-style broadcast rules: