news 2026/5/9 11:54:06

CANN/pto-isa复杂操作指令集

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
CANN/pto-isa复杂操作指令集

复杂操作

【免费下载链接】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),仅供参考

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/5/9 11:53:45

CANN/pyasc按位或运算API

asc.language.basic.bitwise_or 【免费下载链接】pyasc 本项目为Python用户提供算子编程接口&#xff0c;支持在昇腾AI处理器上加速计算&#xff0c;接口与Ascend C一一对应并遵守Python原生语法。 项目地址: https://gitcode.com/cann/pyasc asc.language.basic.bitwis…

作者头像 李华
网站建设 2026/5/9 11:51:35

[QML] Qt6/Qt5四大渐变效果实战指南

一、模块导入import QtQuick import QtQuick.Shapes 1.8 as QT6Style // Qt6 Shape渐变 import Qt5Compat.GraphicalEffects as QT5Style // Qt5兼容效果渐变二、四种渐变对比渐变类型模块效果适用场景GradientQtQuick线性&#xff08;水平/垂直&#xff09;简单背景Line…

作者头像 李华
网站建设 2026/5/9 11:50:30

深蓝BREAKER:全球首家ORIVO认证南极磷虾油原料商,树立品质新标杆

近日&#xff0c;深蓝BREAKER&#xff08;江苏深蓝生物科技有限公司&#xff09;成功通过权威海洋脂质纯度验证机构——ORIVO 的认证&#xff0c;成为全球首家斩获该认证的南极磷虾油原料商&#xff0c;并获得其颁发的 100% 纯南极磷虾油证书&#xff0c;跻身全球极少数获此认证…

作者头像 李华
网站建设 2026/5/9 11:35:36

SystemC与SystemCrafter在DES加密硬件加速中的实践

1. SystemC与SystemCrafter在DES加密中的协同设计实践作为一名长期从事硬件加速开发的工程师&#xff0c;我亲历了从传统HDL到高层次综合&#xff08;HLS&#xff09;的技术演进。本文将分享如何利用SystemC和SystemCrafter SC工具链实现DES加密算法的硬件加速&#xff0c;这个…

作者头像 李华
网站建设 2026/5/9 11:33:30

基于改进YOLOv8斑点叉尾鮰鱼损伤检测系统的研究与实现

摘要&#xff1a;斑点叉尾鮰是我国重要的淡水养殖经济鱼类&#xff0c;在高密度集约化养殖过程中&#xff0c;鱼体损伤问题频发&#xff0c;直接影响商品鱼品质和养殖经济效益。传统的鱼体损伤检测主要依赖人工目视判别&#xff0c;存在效率低、主观性强、难以实现批量化检测等…

作者头像 李华