TCOLEXPAND¶
指令示意图¶
简介¶
将每个源列的第一个元素广播到目标列中。
数学语义¶
Let R = dst.GetValidRow() and C = dst.GetValidCol(). For 0 <= i < R and 0 <= j < C:
\[ \mathrm{dst}_{i,j} = \mathrm{src}_{0,j} \]
汇编语法¶
PTO-AS 形式:参见 PTO-AS Specification.
同步形式:
%dst = tcolexpand %src : !pto.tile<...> -> !pto.tile<...>
AS Level 1 (SSA)¶
%dst = pto.tcolexpand %src : !pto.tile<...> -> !pto.tile<...>
AS Level 2 (DPS)¶
pto.tcolexpand ins(%src : !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)
AS Level 1(SSA)¶
%dst = pto.tcolexpand %src : !pto.tile<...> -> !pto.tile<...>
AS Level 2(DPS)¶
pto.tcolexpand ins(%src : !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)
C++ 内建接口¶
声明于 include/pto/common/pto_instr.hpp:
template <typename TileDataDst, typename TileDataSrc, typename... WaitEvents>
PTO_INST RecordEvent TCOLEXPAND(TileDataDst &dst, TileDataSrc &src, WaitEvents &... events);
约束¶
- The op iterates over
dst.GetValidRow()/dst.GetValidCol().
示例¶
#include <pto/pto-inst.hpp>
using namespace pto;
void example() {
using TileT = Tile<TileType::Vec, float, 16, 16>;
TileT src, dst;
TCOLEXPAND(dst, src);
}