TEXTRACT_FP

指令示意图

TEXTRACT_FP tile operation

简介

带 fp/缩放 Tile 的提取(向量量化参数)。

数学语义

除非另有说明, semantics are defined over the valid region and target-dependent behavior is marked as implementation-defined.

汇编语法

PTO-AS 形式:参见 PTO-AS Specification.

AS Level 1 (SSA)

%dst = pto.textract_fp %src, %idxrow, %idxcol : (!pto.tile<...>, dtype, dtype) -> !pto.tile<...>

AS Level 2 (DPS)

pto.textract_fp ins(%src, %idxrow, %idxcol : !pto.tile_buf<...>, dtype, dtype) outs(%dst : !pto.tile_buf<...>)

AS Level 1(SSA)

%dst = pto.textract_fp %src, %idxrow, %idxcol : (!pto.tile<...>, dtype, dtype) -> !pto.tile<...>

AS Level 2(DPS)

pto.textract_fp ins(%src, %idxrow, %idxcol : !pto.tile_buf<...>, dtype, dtype) outs(%dst : !pto.tile_buf<...>)

C++ 内建接口

声明于 include/pto/common/pto_instr.hpp:

template <typename DstTileData, typename SrcTileData, typename FpTileData, ReluPreMode reluMode = ReluPreMode::NoRelu,
          typename... WaitEvents>
PTO_INST RecordEvent TEXTRACT_FP(DstTileData &dst, SrcTileData &src, FpTileData &fp, uint16_t indexRow, uint16_t indexCol, WaitEvents &... events);

约束

Type/layout/location/shape legality is backend-dependent; treat implementation-specific notes as normative for that backend.

示例

See related examples in docs/isa/ and docs/coding/tutorials/.