复杂操作
【免费下载链接】pto-isaParallel Tile Operation (PTO) is a virtual instruction set architecture designed by Ascend CANN, focusing on tile-level operations. This repository offers high-performance, cross-platform tile operations across Ascend platforms.项目地址: https://gitcode.com/cann/pto-isa
本文档描述复杂操作,包括排序、聚集、量化和随机数生成。
操作总数:16
操作
TPRINT
该指令的详细介绍请见isa/TPRINT
AS Level 1 (SSA):
pto.tprint %src : !pto.tile<...> | !pto.partition_tensor_view<MxNxdtype> -> ()AS Level 2 (DPS):
pto.tprint ins(%src : !pto.tile_buf<...> | !pto.partition_tensor_view<MxNxdtype>)TMRGSORT
该指令的详细介绍请见isa/TMRGSORT
AS Level 1 (SSA):
%dst = pto.tmrgsort %src, %blockLen : (!pto.tile<...>, dtype) -> !pto.tile<...> %dst, %executed = pto.tmrgsort %src0, %src1, %src2, %src3 {exhausted = false} : (!pto.tile<...>, !pto.tile<...>, !pto.tile<...>, !pto.tile<...>) -> (!pto.tile<...>, vector<4xi16>)AS Level 2 (DPS):
pto.tmrgsort ins(%src, %blockLen : !pto.tile_buf<...>, dtype) outs(%dst : !pto.tile_buf<...>) pto.tmrgsort ins(%src0, %src1, %src2, %src3 {exhausted = false} : !pto.tile_buf<...>, !pto.tile_buf<...>, !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%dst, %executed : !pto.tile_buf<...>, vector<4xi16>)TSORT32
该指令的详细介绍请见isa/TSORT32
AS Level 1 (SSA):
%dst, %idx = pto.tsort32 %src : !pto.tile<...> -> (!pto.tile<...>, !pto.tile<...>)AS Level 2 (DPS):
pto.tsort32 ins(%src : !pto.tile_buf<...>) outs(%dst, %idx : !pto.tile_buf<...>, !pto.tile_buf<...>)TGATHER
该指令的详细介绍请见isa/TGATHER
AS Level 1 (SSA):
%dst = pto.tgather %src, %indices : (!pto.tile<...>, !pto.tile<...>) -> !pto.tile<...> %dst = pto.tgather %src {maskPattern = #pto.mask_pattern<P0101>}: !pto.tile<...> -> !pto.tile<...>AS Level 2 (DPS):
pto.tgather ins(%src, %indices : !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>) pto.tgather ins(%src, {maskPattern = #pto.mask_pattern<P0101>} : !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)TCI
该指令的详细介绍请见isa/TCI
AS Level 1 (SSA):
%dst = pto.tci %scalar {descending = false} : dtype -> !pto.tile<...>AS Level 2 (DPS):
pto.tci ins(%scalar {descending = false} : dtype) outs(%dst : !pto.tile_buf<...>)TTRI
该指令的详细介绍请见isa/TTRI
AS Level 1 (SSA):
%dst = pto.ttri %src0, %src1 : (!pto.tile<...>, !pto.tile<...>) -> !pto.tile<...>AS Level 2 (DPS):
pto.ttri ins(%src0, %src1 : !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)TRANDOM
该指令的详细介绍请见isa/TRANDOM
AS Level 1 (SSA):
%dst = pto.trandom %key, %counter {rounds = 10} : -> !pto.tile<...>AS Level 2 (DPS):
pto.trandom ins(%key, %counter {rounds = 10} : dtype) outs(%dst : !pto.tile_buf<...>)TPARTADD
该指令的详细介绍请见isa/TPARTADD
AS Level 1 (SSA):
%dst = pto.tpartadd %src0, %src1 : (!pto.tile<...>, !pto.tile<...>) -> !pto.tile<...>AS Level 2 (DPS):
pto.tpartadd ins(%src0, %src1 : !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)TPARTMUL
该指令的详细介绍请见isa/TPARTMUL
AS Level 1 (SSA):
%dst = pto.tpartmul %src0, %src1 : !pto.tile<...> -> !pto.tile<...>AS Level 2 (DPS):
pto.tpartmul ins(%src0, %src1 : !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)TPARTMAX
该指令的详细介绍请见isa/TPARTMAX
AS Level 1 (SSA):
%dst = pto.tpartmax %src0, %src1 : (!pto.tile<...>, !pto.tile<...>) -> !pto.tile<...>AS Level 2 (DPS):
pto.tpartmax ins(%src0, %src1 : !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)TPARTMIN
该指令的详细介绍请见isa/TPARTMIN
AS Level 1 (SSA):
%dst = pto.tpartmin %src0, %src1 : (!pto.tile<...>, !pto.tile<...>) -> !pto.tile<...>AS Level 2 (DPS):
pto.tpartmin ins(%src0, %src1 : !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)TPARTARGMAX
该指令的详细介绍请见isa/TPARTARGMAX
AS Level 1 (SSA):
%dstVal, %dstIdx = pto.tpartargmax %src0Val, %src1Val, %src0Idx, %src1Idx : (!pto.tile<...>, !pto.tile<...>, !pto.tile<...>, !pto.tile<...>) -> (!pto.tile<...>, !pto.tile<...>)AS Level 2 (DPS):
pto.tpartargmax ins(%src0Val, %src1Val, %src0Idx, %src1Idx : !pto.tile_buf<...>, !pto.tile_buf<...>, !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%dstVal, %dstIdx : !pto.tile_buf<...>, !pto.tile_buf<...>)TPARTARGMIN
该指令的详细介绍请见isa/TPARTARGMIN
AS Level 1 (SSA):
%dstVal, %dstIdx = pto.tpartargmin %src0Val, %src1Val, %src0Idx, %src1Idx : (!pto.tile<...>, !pto.tile<...>, !pto.tile<...>, !pto.tile<...>) -> (!pto.tile<...>, !pto.tile<...>)AS Level 2 (DPS):
pto.tpartargmin ins(%src0Val, %src1Val, %src0Idx, %src1Idx : !pto.tile_buf<...>, !pto.tile_buf<...>, !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%dstVal, %dstIdx : !pto.tile_buf<...>, !pto.tile_buf<...>)TGATHERB
该指令的详细介绍请见isa/TGATHERB
AS Level 1 (SSA):
%dst = pto.tgatherb %src, %offsets : (!pto.tile<...>, !pto.tile<...>) -> !pto.tile<...>AS Level 2 (DPS):
pto.tgatherb ins(%src, %offsets : !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)TSCATTER
该指令的详细介绍请见isa/TSCATTER
AS Level 1 (SSA):
%dst = pto.tscatter %src, %idx : (!pto.tile<...>, !pto.tile<...>) -> !pto.tile<...>AS Level 2 (DPS):
pto.tscatter ins(%src, %idx : !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)TQUANT
该指令的详细介绍请见isa/TQUANT
AS Level 1 (SSA):
%dst = pto.tquant %src, %qp : (!pto.tile<...>, !pto.tile<...>) -> !pto.tile<...>AS Level 2 (DPS):
pto.tquant ins(%src, %qp : !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)【免费下载链接】pto-isaParallel Tile Operation (PTO) is a virtual instruction set architecture designed by Ascend CANN, focusing on tile-level operations. This repository offers high-performance, cross-platform tile operations across Ascend platforms.项目地址: https://gitcode.com/cann/pto-isa
创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考