<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>后端优化 on FlagGems</title><link>https://flagos-ai.github.io/FlagGems/zh-cn/optimization/</link><description>Recent content in 后端优化 on FlagGems</description><generator>Hugo</generator><language>zh-cn</language><atom:link href="https://flagos-ai.github.io/FlagGems/zh-cn/optimization/index.xml" rel="self" type="application/rss+xml"/><item><title>Ascend</title><link>https://flagos-ai.github.io/FlagGems/zh-cn/optimization/ascend/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://flagos-ai.github.io/FlagGems/zh-cn/optimization/ascend/</guid><description>&lt;!--
 Copyright 2026 FlagOS Contributors

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 --&gt;
&lt;h1 id="ascend-优化"&gt;Ascend 优化&lt;a class="anchor" href="#ascend-%e4%bc%98%e5%8c%96"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="硬件架构"&gt;硬件架构&lt;a class="anchor" href="#%e7%a1%ac%e4%bb%b6%e6%9e%b6%e6%9e%84"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;昇腾的 Cube 路径执行矩阵乘，Vector 路径执行逐元素计算和归约；Scalar 路径负责地址计算、循环控制等。数据从全局内存（GM，通常为 HBM）经 MTE 搬运到片上缓冲区。Cube 使用 L1、L0A、L0B 和 L0C；Vector 使用统一缓冲区（UB）。&lt;strong&gt;UB 与 L0 是不同的存储空间，L1 是 Cube 侧片上缓冲区，不是跨核共享的 L2 缓存。&lt;/strong&gt; 包含 &lt;code&gt;tl.dot&lt;/code&gt; 和 Vector 后处理的 kernel 可能需要在两条路径间搬运中间结果并同步。&lt;/p&gt;</description></item><item><title>Hygon</title><link>https://flagos-ai.github.io/FlagGems/zh-cn/optimization/hygon/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://flagos-ai.github.io/FlagGems/zh-cn/optimization/hygon/</guid><description>&lt;!--
 Copyright 2026 FlagOS Contributors

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 --&gt;
&lt;h1 id="hygon-优化"&gt;Hygon 优化&lt;a class="anchor" href="#hygon-%e4%bc%98%e5%8c%96"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;海光 DCU 的 Triton kernel 通过 HIP 路径执行。分块大小、warp 数、流水线深度和程序块顺序决定寄存器、片上共享内存（LDS）及缓存的使用方式。下文以 Hygon BW / &lt;code&gt;gfx936&lt;/code&gt; 为例，介绍与这些资源直接相关的优化机制。&lt;/p&gt;</description></item></channel></rss>