当前位置: 首页 > news >正文

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

本文档描述矩阵乘法和矩阵-向量操作。

操作总数:8


操作

TGEMV_MX

该指令的详细介绍请见isa/TGEMV_MX

AS Level 1 (SSA):

%acc = pto.tgemv.mx %a, %a_scale, %b, %b_scale : (!pto.tile<...>, !pto.tile<...>, !pto.tile<...>, !pto.tile<...>) -> !pto.tile<...>

AS Level 2 (DPS):

pto.tgemv.mx ins(%a, %a_scale, %b, %b_scale : (!pto.tile_buf<...>, !pto.tile_buf<...>, !pto.tile_buf<...>, !pto.tile_buf<...>)) outs(%acc : !pto.tile_buf<...>)

TMATMUL_MX

该指令的详细介绍请见isa/TMATMUL_MX

AS Level 1 (SSA):

%c = pto.tmatmul.mx %a, %a_scale, %b, %b_scale : (!pto.tile<...>, !pto.tile<...>, !pto.tile<...>, !pto.tile<...>) -> !pto.tile<...> %c_out = pto.tmatmul.mx.acc %c_in, %a, %a_scale, %b, %b_scale : (!pto.tile<...>, !pto.tile<...>, !pto.tile<...>, !pto.tile<...>, !pto.tile<...>) -> !pto.tile<...> %c = pto.tmatmul.mx.bias %a, %a_scale, %b, %b_scale, %bias : (!pto.tile<...>, !pto.tile<...>, !pto.tile<...>, !pto.tile<...>, !pto.tile<...>) -> !pto.tile<...>

AS Level 2 (DPS):

pto.tmatmul.mx ins(%a, %a_scale, %b, %b_scale : !pto.tile_buf<...>, !pto.tile_buf<...>, !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%c : !pto.tile_buf<...>) pto.tmatmul.mx.acc ins(%c_in, %a, %a_scale, %b, %b_scale : !pto.tile_buf<...>, !pto.tile_buf<...>, !pto.tile_buf<...>, !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%c_out : !pto.tile_buf<...>) pto.tmatmul.mx.bias ins(%a, %a_scale, %b, %b_scale, %bias : !pto.tile_buf<...>, !pto.tile_buf<...>, !pto.tile_buf<...>, !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%c : !pto.tile_buf<...>)

TMATMUL

该指令的详细介绍请见isa/TMATMUL

AS Level 1 (SSA):

%c = pto.tmatmul %a, %b : (!pto.tile<...>, !pto.tile<...>) -> !pto.tile<...>

AS Level 2 (DPS):

pto.tmatmul ins(%a, %b : !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%c : !pto.tile_buf<...>)

TMATMUL_ACC

该指令的详细介绍请见isa/TMATMUL_ACC

AS Level 1 (SSA):

%c_out = pto.tmatmul.acc %c_in, %a, %b : (!pto.tile<...>, !pto.tile<...>, !pto.tile<...>) -> !pto.tile<...>

AS Level 2 (DPS):

pto.tmatmul.acc ins(%c_in, %a, %b : !pto.tile_buf<...>, !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%c_out : !pto.tile_buf<...>)

TMATMUL_BIAS

该指令的详细介绍请见isa/TMATMUL_BIAS

AS Level 1 (SSA):

%c = pto.tmatmul.bias %a, %b, %bias : (!pto.tile<...>, !pto.tile<...>, !pto.tile<...>) -> !pto.tile<...>

AS Level 2 (DPS):

pto.tmatmul.bias ins(%a, %b, %bias : !pto.tile_buf<...>, !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%c : !pto.tile_buf<...>)

TGEMV

该指令的详细介绍请见isa/TGEMV

AS Level 1 (SSA):

%c = pto.tgemv %a, %b : (!pto.tile<...>, !pto.tile<...>) -> !pto.tile<...> %c_out = pto.tgemv.acc %c_in, %a, %b : (!pto.tile<...>, !pto.tile<...>, !pto.tile<...>) -> !pto.tile<...> %c = pto.tgemv.bias %a, %b, %bias : (!pto.tile<...>, !pto.tile<...>, !pto.tile<...>) -> !pto.tile<...>

AS Level 2 (DPS):

pto.tgemv ins(%a, %b : !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%c : !pto.tile_buf<...>) pto.tgemv.acc ins(%c_in, %a, %b : !pto.tile_buf<...>, !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%c_out : !pto.tile_buf<...>) pto.tgemv.bias ins(%a, %b, %bias : !pto.tile_buf<...>, !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%c : !pto.tile_buf<...>)

TGEMV_ACC

该指令的详细介绍请见isa/TGEMV_ACC

AS Level 1 (SSA):

%c = pto.tgemv %a, %b : (!pto.tile<...>, !pto.tile<...>) -> !pto.tile<...> %c_out = pto.tgemv.acc %c_in, %a, %b : (!pto.tile<...>, !pto.tile<...>, !pto.tile<...>) -> !pto.tile<...> %c = pto.tgemv.bias %a, %b, %bias : (!pto.tile<...>, !pto.tile<...>, !pto.tile<...>) -> !pto.tile<...>

AS Level 2 (DPS):

pto.tgemv ins(%a, %b : !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%c : !pto.tile_buf<...>) pto.tgemv.acc ins(%c_in, %a, %b : !pto.tile_buf<...>, !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%c_out : !pto.tile_buf<...>) pto.tgemv.bias ins(%a, %b, %bias : !pto.tile_buf<...>, !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%c : !pto.tile_buf<...>)

TGEMV_BIAS

该指令的详细介绍请见isa/TGEMV_BIAS

AS Level 1 (SSA):

%c = pto.tgemv %a, %b : (!pto.tile<...>, !pto.tile<...>) -> !pto.tile<...> %c_out = pto.tgemv.acc %c_in, %a, %b : (!pto.tile<...>, !pto.tile<...>, !pto.tile<...>) -> !pto.tile<...> %c = pto.tgemv.bias %a, %b, %bias : (!pto.tile<...>, !pto.tile<...>, !pto.tile<...>) -> !pto.tile<...>

AS Level 2 (DPS):

pto.tgemv ins(%a, %b : !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%c : !pto.tile_buf<...>) pto.tgemv.acc ins(%c_in, %a, %b : !pto.tile_buf<...>, !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%c_out : !pto.tile_buf<...>) pto.tgemv.bias ins(%a, %b, %bias : !pto.tile_buf<...>, !pto.tile_buf<...>, !pto.tile_buf<...>) outs(%c : !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),仅供参考

http://www.jsqmd.com/news/783429/

相关文章:

  • 2026年山东沥青加温设备与道路养护筑路设备采购完全指南 - 企业名录优选推荐
  • CANN/metadef动态算子自动映射
  • CANN Runtime API 参考
  • ComfyUI-VideoHelperSuite:掌握视频合成的5个关键技巧与实战指南
  • 顽固黑头用什么泥膜 靠谱 7 天终结黑头反复,顽固黑头一键清零 - 全网最美
  • 筑牢生命防线:2026年精选五家便捷急救AED除颤仪厂家推荐 - 品牌2026
  • AI驱动野生动物保护:计算机视觉与机器学习实战指南
  • AIAS信息模型:构建工业AI与自动化系统融合的标准化蓝图
  • FPGA-MPSoC边缘AI加速实战:从模型量化到硬件部署全解析
  • 如何免费使用KH Coder进行文本挖掘:从零开始的完整指南
  • 唐县昌缘商贸:博野县人物铜雕生产厂家 - LYL仔仔
  • 如何高效使用哔哩下载姬DownKyi:新手指南与实用技巧
  • 可解释AI评估新范式:基于用户任务表现的客观评估方法与实践
  • CANN/DeepSeek-V4配置指南
  • WatchGuard Agent多漏洞深度解析:从本地提权到SYSTEM,安全代理为何成为内网最大后门?
  • 2026年半导体超高纯与石化防爆压力变送器推荐:五家优选对比 - 科技焦点
  • 【EI会议推荐】2026 人工智能、信息物理系统和智能计算国际学术会议(ICAICI 2026) - 艾思科蓝AiScholar
  • CANN/SiP批量矩阵求逆
  • AI辅助手写试卷评分的实战:OCR与LLM技术方案对比与工程化指南
  • 基于注意力机制与多模态融合的计算机视觉辅助自闭症行为分析系统
  • CodeCortex:为AI编码助手构建项目知识图谱,提升开发效率与代码安全
  • CANN社区基础设施SIG
  • 2026 北京财税机构指南注册公司代办机构高新企业认证口碑推荐 - 品牌优企推荐
  • 从零实现扩散模型:数学原理与PyTorch实战图像生成
  • CANN/ops-nn PReLU反向传播
  • 2026江苏 上海环氧地坪源头厂家怎么选?哪家好 推荐 - 奔跑123
  • 用友财报深度解读:2025亏损13亿,即将触底反弹?
  • 基于图神经网络与可视分析的慢性肾病临床决策支持系统构建
  • CANN/pyasc昇腾SoftMax算子API文档
  • 工程教育中基于角色的AI能力框架:从认知到协同的整合路径