tilus.ir.layout.unsqueeze

Contents

tilus.ir.layout.unsqueeze

tilus.ir.layout.unsqueeze(layout, dims)[source]

Unsqueeze the layout over the given dimensions.

The unsqueeze function will return a new layout with the dimensions specified in dims added to the layout. The new dimensions will have size 1. The dims must be in the range [0, len(layout.shape) + len(dims) - 1], representing the dimensions in the new layout.

Parameters:
  • layout (RegisterLayout) – The layout to unsqueeze.

  • dims (Sequence[int]) – The dimensions to unsqueeze.

Returns:

ret – The unsqueezed layout.

Return type:

RegisterLayout