news 2026/5/9 21:24:32

PTO-ISA ConvTile编程模型

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
PTO-ISA ConvTile编程模型

ConvTile Programming Model

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

PTO Lib programs operate onConvTile: fixed-capacity 2-D to 6-D buffers that are the unit of computation and the unit of most data movement for PTO convolution operation.

Conceptually, a ConvTile lives inon-chip tile storage(a register-file-like or SRAM-like storage) and is moved to/from global memory (GM) viaTLOAD/TSTORE.

This document describes the C++ tile types ininclude/pto/common/pto_tile.hppand their layout/valid-region constraints.

What a ConvTile represents

A ConvTile is defined by five families of attributes:

  • Location: which logical tile storage class the tile belongs to (matrix/cube registers).
  • Element type: scalar element type (float,half,int8_t, ...).
  • Buffer size: the static space of convtile.
  • Layout: a layout (NCHW,NHWC,NC1HWC0, ...), used to guide lowering and target-specific fast paths.
  • Shape: apto::ConvTileShape<...>(up to 6 dimensions).

pto::ConvTiletype

Tiles are declared as a C++ template type:

pto::ConvTile< pto::TileType Loc_, Element_, BufferSize_, pto::Layout_ layout, pto::ConvTileShape Shape_ >;

Location (TileType)

TileTypeencodes the logical/physical storage class of the tile and participates in overload selection and compile-time checks:

  • TileType::Vec: vector tile storage (UB / vector pipeline).
  • TileType::Mat: general matrix tile storage (Matrix L1).

Instruction pages indocs/isa/specify which locations are legal for each instruction.

Capacity (BufferSize_)

BufferSize_define thestatic capacityof the tile object. Most instructions require static shapes so they can be specialized and optimized at compile time.

Layout (pto::Layout)

ConvTileincludes a layout enum (NCHW,NHWC,NC1HWC0,FRACTAL_Z,FRACTAL_Z_S16S8...).

Shape (pto::Shape)

pto::ConvTileShape<...Shapes>support 1-6 integers. it is a template parameter list, each template parameter can be a compile-time constant orpto::DYNAMIC(-1).

  • Static dimensions are carried in the type viaConvTileShape::staticShape[dim].
  • Dynamic dimensions are stored in the runtimeConvTileShape::shape[dim]and are populated by theConvTileShape(...)constructors.

The constructors enforce “number of runtime parameters equals number of dynamic dimensions” viastatic_assert, so mismatched construction fails at compile time.

Address binding (TASSIGN)

In manual placement flows,TASSIGN(tile, addr)binds a convtile object to an implementation-defined address. In auto flows,TASSIGN(tile, addr)may be a no-op depending on build configuration.

Seedocs/isa/TASSIGN.mdfor details.

Minimal example

#include <pto/pto-inst.hpp> using namespace pto; void example(__gm__ half* in, __gm__ half* out) { using TileT = ConvTile<TileType::Mat, half, 4096, Layout::NC1HWC0, pto::ConvTileShape<1, 1, 16, 16, 16>>; using GShape = Shape<1, 1, 16, 16, 16>; using GStride = Stride<1 * 16* 16* 16, 16* 16* 16, 16 * 16, 16, 1>; using GT = GlobalTensor<half, GShape, GStride, Layout::NC1HWC0>; GT gin(in); TileT tile5d; TASSIGN(tile5d, 0x0); TLOAD(tile5d, gin); }

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

昆仑芯接受上市辅导:拟科创板上市 估值已超百亿

雷递网 乐天 5月8日据中国证监会网站显示&#xff0c;昆仑芯&#xff08;北京&#xff09;科技股份有限公司 &#xff08;简称&#xff1a;“昆仑芯”&#xff09;正接受上市辅导&#xff0c;准备在科创板上市。2026年初&#xff0c;百度已宣布建议分拆目前拟通过昆仑芯股份的全…

作者头像 李华
网站建设 2026/5/9 21:22:10

Cursor-Office:AI驱动办公文档自动化处理插件深度解析

1. 项目概述与核心价值 最近在GitHub上看到一个挺有意思的项目&#xff0c;叫 Isaacpixier/cursor-office 。光看这个名字&#xff0c;你可能会有点摸不着头脑&#xff0c; cursor 是那个AI驱动的代码编辑器&#xff0c; office 是办公套件&#xff0c;这俩放一块儿能搞出…

作者头像 李华
网站建设 2026/5/9 21:19:40

FastDeploy全场景AI推理部署:从模型转换到多硬件平台实战

1. 项目概述&#xff1a;从“能用”到“好用”的AI部署桥梁 如果你在AI工程化的路上摸爬滚打过一阵子&#xff0c;大概率会和我有同样的感受&#xff1a;把一个在实验室里跑得飞快的模型&#xff0c;真正搬到生产环境里稳定、高效地跑起来&#xff0c;这中间的鸿沟&#xff0c;…

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

CANN/ops-math常数填充算子

aclnnConstantPadNd 【免费下载链接】ops-math 本项目是CANN提供的数学类基础计算算子库&#xff0c;实现网络在NPU上加速计算。 项目地址: https://gitcode.com/cann/ops-math &#x1f4c4; 查看源码 产品支持情况 产品是否支持Ascend 950PR/Ascend 950DT√Atlas A3…

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

深入解析BlueClaw:轻量级网络代理工具的设计原理与实战应用

1. 项目概述与核心价值最近在GitHub上看到一个挺有意思的项目&#xff0c;叫brandon-dacrib/blueclaw。乍一看这个仓库名&#xff0c;你可能会有点摸不着头脑&#xff0c;blueclaw&#xff08;蓝爪&#xff09;听起来像是个代号&#xff0c;而作者brandon-dacrib也并非社区里耳…

作者头像 李华