news 2026/5/9 12:41:00

CANN/pto-isa轴归约与扩展操作

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
CANN/pto-isa轴归约与扩展操作

Axis Reduce / Expand

【免费下载链接】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

This document describes row/column reduction and broadcast operations.

Total Operations:25


Operations

TROWSUM

For detailed instruction documentation, see isa/TROWSUM

AS Level 1 (SSA):

%dst = pto.trowsum %src, %tmp : (!pto.tile<...>, !pto.tile<...>) -> !pto.tile<...>

AS Level 2 (DPS):

pto.trowsum ins(%src, %tmp : !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)

TCOLSUM

For detailed instruction documentation, see isa/TCOLSUM

AS Level 1 (SSA):

%dst = pto.tcolsum %src : !pto.tile<...> -> !pto.tile<...> %dst = pto.tcolsum %src, %tmp {isBinary = false} : (!pto.tile<...>, !pto.tile<...>) -> !pto.tile<...>

AS Level 2 (DPS):

pto.tcolsum ins(%src : !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>) pto.tcolsum ins(%src, %tmp {isBinary = false} : !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)

TCOLPROD

For detailed instruction documentation, see isa/TCOLPROD

AS Level 1 (SSA):

%dst = pto.tcolprod %src : !pto.tile<...> -> !pto.tile<...>

AS Level 2 (DPS):

pto.tcolprod ins(%src : !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)

TCOLMAX

For detailed instruction documentation, see isa/TCOLMAX

AS Level 1 (SSA):

%dst = pto.tcolmax %src : !pto.tile<...> -> !pto.tile<...>

AS Level 2 (DPS):

pto.tcolmax ins(%src : !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)

TROWMAX

For detailed instruction documentation, see isa/TROWMAX

AS Level 1 (SSA):

%dst = pto.trowmax %src, %tmp : (!pto.tile<...>, !pto.tile<...>) -> !pto.tile<...>

AS Level 2 (DPS):

pto.trowmax ins(%src, %tmp : !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)

TROWMIN

For detailed instruction documentation, see isa/TROWMIN

AS Level 1 (SSA):

%dst = pto.trowmin %src, %tmp : (!pto.tile<...>, !pto.tile<...>) -> !pto.tile<...>

AS Level 2 (DPS):

pto.trowmin ins(%src, %tmp : !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)

TROWEXPAND

For detailed instruction documentation, see isa/TROWEXPAND

AS Level 1 (SSA):

%dst = pto.trowexpand %src : !pto.tile<...> -> !pto.tile<...>

AS Level 2 (DPS):

pto.trowexpand ins(%src : !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)

TROWEXPANDDIV

For detailed instruction documentation, see isa/TROWEXPANDDIV

AS Level 1 (SSA):

%dst = pto.tcolexpanddiv %src0, %src1 : !pto.tile<...>, !pto.tile<...> -> !pto.tile<...>

AS Level 2 (DPS):

pto.tcolexpanddiv ins(%src0, %src1 : !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)

TROWEXPANDMUL

For detailed instruction documentation, see isa/TROWEXPANDMUL

AS Level 1 (SSA):

%dst = pto.tcolexpandmul %src0, %src1 : !pto.tile<...>, !pto.tile<...> -> !pto.tile<...>

AS Level 2 (DPS):

pto.tcolexpandmul ins(%src0, %src1 : !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)

TROWEXPANDSUB

For detailed instruction documentation, see isa/TROWEXPANDSUB

AS Level 1 (SSA):

%dst = pto.tcolexpandsub %src0, %src1 : !pto.tile<...>, !pto.tile<...> -> !pto.tile<...>

AS Level 2 (DPS):

pto.tcolexpandsub ins(%src0, %src1 : !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)

TROWEXPANDADD

For detailed instruction documentation, see isa/TROWEXPANDADD

AS Level 1 (SSA):

%dst = pto.trowexpandadd %src0, %src1 : !pto.tile<...>, !pto.tile<...> -> !pto.tile<...>

AS Level 2 (DPS):

pto.trowexpandadd ins(%src0, %src1 : !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)

TROWEXPANDMAX

For detailed instruction documentation, see isa/TROWEXPANDMAX

AS Level 1 (SSA):

%dst = pto.trowexpandmax %src0, %src1 : !pto.tile<...>, !pto.tile<...> -> !pto.tile<...>

AS Level 2 (DPS):

pto.trowexpandmax ins(%src0, %src1 : !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)

TROWEXPANDMIN

For detailed instruction documentation, see isa/TROWEXPANDMIN

AS Level 1 (SSA):

%dst = pto.trowexpandmin %src0, %src1 : !pto.tile<...>, !pto.tile<...> -> !pto.tile<...>

AS Level 2 (DPS):

pto.trowexpandmin ins(%src0, %src1 : !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)

TROWEXPANDEXPDIF

For detailed instruction documentation, see isa/TROWEXPANDEXPDIF

AS Level 1 (SSA):

%dst = pto.trowexpandexpdif %src0, %src1 : !pto.tile<...>, !pto.tile<...> -> !pto.tile<...>

AS Level 2 (DPS):

pto.trowexpandexpdif ins(%src0, %src1 : !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)

TCOLMIN

For detailed instruction documentation, see isa/TCOLMIN

AS Level 1 (SSA):

%dst = pto.tcolmin %src : !pto.tile<...> -> !pto.tile<...>

AS Level 2 (DPS):

pto.tcolmin ins(%src : !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)

TCOLEXPAND

For detailed instruction documentation, see isa/TCOLEXPAND

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<...>)

TCOLEXPANDDIV

For detailed instruction documentation, see isa/TCOLEXPANDDIV

AS Level 1 (SSA):

%dst = pto.tcolexpanddiv %src0, %src1 : !pto.tile<...>, !pto.tile<...> -> !pto.tile<...>

AS Level 2 (DPS):

pto.tcolexpanddiv ins(%src0, %src1 : !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)

TCOLEXPANDMUL

For detailed instruction documentation, see isa/TCOLEXPANDMUL

AS Level 1 (SSA):

%dst = pto.tcolexpandmul %src0, %src1 : !pto.tile<...>, !pto.tile<...> -> !pto.tile<...>

AS Level 2 (DPS):

pto.tcolexpandmul ins(%src0, %src1 : !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)

TCOLEXPANDADD

For detailed instruction documentation, see isa/TCOLEXPANDADD

AS Level 1 (SSA):

%dst = pto.tcolexpandadd %src0, %src1 : !pto.tile<...>, !pto.tile<...> -> !pto.tile<...>

AS Level 2 (DPS):

pto.tcolexpandadd ins(%src0, %src1 : !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)

TCOLEXPANDMAX

For detailed instruction documentation, see isa/TCOLEXPANDMAX

AS Level 1 (SSA):

%dst = pto.tcolexpandmax %src0, %src1 : !pto.tile<...>, !pto.tile<...> -> !pto.tile<...>

AS Level 2 (DPS):

pto.tcolexpandmax ins(%src0, %src1 : !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)

TCOLEXPANDMIN

For detailed instruction documentation, see isa/TCOLEXPANDMIN

AS Level 1 (SSA):

%dst = pto.tcolexpandmin %src0, %src1 : !pto.tile<...>, !pto.tile<...> -> !pto.tile<...>

AS Level 2 (DPS):

pto.tcolexpandmin ins(%src0, %src1 : !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)

TCOLEXPANDSUB

For detailed instruction documentation, see isa/TCOLEXPANDSUB

AS Level 1 (SSA):

%dst = pto.tcolexpandsub %src0, %src1 : !pto.tile<...>, !pto.tile<...> -> !pto.tile<...>

AS Level 2 (DPS):

pto.tcolexpandsub ins(%src0, %src1 : !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)

TCOLEXPANDEXPDIF

For detailed instruction documentation, see isa/TCOLEXPANDEXPDIF

AS Level 1 (SSA):

%dst = pto.tcolexpandexpdif %src0, %src1 : !pto.tile<...>, !pto.tile<...> -> !pto.tile<...>

AS Level 2 (DPS):

pto.tcolexpandexpdif ins(%src0, %src1 : !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%dst : !pto.tile_buf<...>)

TROWPROD

For detailed instruction documentation, see isa/TROWPROD

AS Level 1 (SSA):

%dst = pto.trowprod %src, %tmp : (!pto.tile<...>, !pto.tile<...>) -> !pto.tile<...>

AS Level 2 (DPS):

pto.trowprod ins(%src, %tmp : !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 12:39:55

利用 Taotoken 模型广场为学术研究项目筛选性价比最高的模型

&#x1f680; 告别海外账号与网络限制&#xff01;稳定直连全球优质大模型&#xff0c;限时半价接入中。 &#x1f449; 点击领取海量免费额度 利用 Taotoken 模型广场为学术研究项目筛选性价比最高的模型 为学术研究项目选择合适的大语言模型&#xff0c;常常需要在模型能力…

作者头像 李华
网站建设 2026/5/9 12:38:48

CANN/atvoss加法运算符API文档

Add 【免费下载链接】atvoss ATVOSS&#xff08;Ascend C Templates for Vector Operator Subroutines&#xff09;是一套基于Ascend C开发的Vector算子库&#xff0c;致力于为昇腾硬件上的Vector类融合算子提供极简、高效、高性能、高拓展的编程方式。 项目地址: https://gi…

作者头像 李华
网站建设 2026/5/9 12:37:54

Obsidian 同步插件推荐:Nutstore Sync 使用详解

1. 你为什么需要 Nutstore Sync&#xff1f; Obsidian 的笔记本质是“本地文件夹&#xff08;Vault&#xff09;”&#xff0c;优点是自由、可控&#xff1b;难点是&#xff1a;多设备同步。很多新手会遇到&#xff1a; 官方同步订阅成本较高自己配 WebDAV 容易出错&#xff…

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

别把 SFT 里的 `packing` 当成白捡吞吐的开关:TRL 里 `bfd`、`bfd_split`、`wrapped` 真正卖掉的不是同一种东西

别把 SFT 里的 packing 当成白捡吞吐的开关:TRL 里 bfd、bfd_split、wrapped 真正卖掉的不是同一种东西 很多人做 SFT 时,一看到 packing=True 就会把它理解成“把 padding 浪费收回来,几乎没有副作用”。但我把 TRL 现在的实现、警告和一个最小模拟实验放在一起看后,结论…

作者头像 李华
网站建设 2026/5/9 12:29:16

CANN元数据定义执行结果生成上下文API

ExeResGenerationContext 【免费下载链接】metadef Ascend Metadata Definition 项目地址: https://gitcode.com/cann/metadef 简介 GetExecuteMode IsConstInput GetInputShape GetOutputShape SetAttachedStreamInfos GetAttachedStreamInfos GetStreamId SetS…

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

完整指南:在macOS上快速解锁QQ音乐加密文件的终极解决方案

完整指南&#xff1a;在macOS上快速解锁QQ音乐加密文件的终极解决方案 【免费下载链接】QMCDecode QQ音乐QMC格式转换为普通格式(qmcflac转flac&#xff0c;qmc0,qmc3转mp3, mflac,mflac0等转flac)&#xff0c;仅支持macOS&#xff0c;可自动识别到QQ音乐下载目录&#xff0c;默…

作者头像 李华