Reduce each column by multiplying across rows.
Let R = src.GetValidRow() and C = src.GetValidCol(). For 0 <= j < C:
Synchronous form:
%dst = tcolprod %src : !pto.tile<...> -> !pto.tile<...>
%dst = pto.tcolprod %src : !pto.tile<...> -> !pto.tile<...>
pto.tcolprod ins(%src : !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)
Declared in include/pto/common/pto_instr.hpp:
template <typename TileDataOut, typename TileDataIn, typename... WaitEvents>
PTO_INST RecordEvent TCOLPROD(TileDataOut &dst, TileDataIn &src, WaitEvents &... events);dstandsrcmust beTileType::Vec.dstandsrcmust use standard ND layout: row-major and non-fractal (BLayout::RowMajor,SLayout::NoneBox).dstandsrcmust use the same element type.- Runtime checks:
src.GetValidCol() == dst.GetValidCol()
- If
src.GetValidRow() == 0orsrc.GetValidCol() == 0, the implementation returns early.
- Supported element types:
half,float,int16_t,int32_t.
- Supported element types:
half,float,bfloat16_t,int16_t,uint16_t,int32_t,uint32_t.
#include <pto/pto-inst.hpp>
using namespace pto;
void example_auto() {
using SrcT = Tile<TileType::Vec, float, 16, 16>;
using DstT = Tile<TileType::Vec, float, 1, 16>;
SrcT src;
DstT dst;
TCOLPROD(dst, src);
}#include <pto/pto-inst.hpp>
using namespace pto;
void example_manual() {
using SrcT = Tile<TileType::Vec, float, 16, 16>;
using DstT = Tile<TileType::Vec, float, 1, 16>;
SrcT src;
DstT dst;
TASSIGN(src, 0x1000);
TASSIGN(dst, 0x2000);
TCOLPROD(dst, src);
}# Auto mode: compiler/runtime-managed placement and scheduling.
%dst = pto.tcolprod %src : !pto.tile<...> -> !pto.tile<...>
# Manual mode: resources must be bound explicitly before issuing the instruction.
# Optional for tile operands:
# pto.tassign %arg0, @tile(0x1000)
# pto.tassign %arg1, @tile(0x2000)
%dst = pto.tcolprod %src : !pto.tile<...> -> !pto.tile<...>
%dst = tcolprod %src : !pto.tile<...> -> !pto.tile<...>
# AS Level 2 (DPS)
pto.tcolprod ins(%src : !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)