Merged
fix(docs): Add the index files #5184
lyz0328Add on Jul 30
fix(docs): Add the index files #5184
Merged
lyz0328Add on Jul 30
Total: 100 files changed+52-95
@@ -1,8 +1,2 @@
1*.png filter=lfs diff=lfs merge=lfs -text1*.png filter=lfs diff=lfs merge=lfs -text
2-models/glm_v4_5/images/attention.png filter=lfs diff=lfs merge=lfs -text2+*.jpg filter=lfs diff=lfs merge=lfs -text
3-models/glm_v4_5/images/ffn_router_expert_quant.png filter=lfs diff=lfs merge=lfs -text
4-models/glm_v4_5/images/ffn_share_expert_quant.png filter=lfs diff=lfs merge=lfs -text
5-models/glm_v4_5/images/matmul.png filter=lfs diff=lfs merge=lfs -text
6-models/glm_v4_5/images/rms_norm_bias.png filter=lfs diff=lfs merge=lfs -text
7-models/glm_v4_5/images/select_experts.png filter=lfs diff=lfs merge=lfs -text
8-docs/tutorials/figures/*.png filter=lfs diff=lfs merge=lfs -text
@@ -1,12 +0,0 @@
1-pypto.amax_1.png filter=lfs diff=lfs merge=lfs -text
2-pypto.amax_2.png filter=lfs diff=lfs merge=lfs -text
3-pypto.amin_2.png filter=lfs diff=lfs merge=lfs -text
4-pypto.cast-0.png filter=lfs diff=lfs merge=lfs -text
5-pypto.cast-1.png filter=lfs diff=lfs merge=lfs -text
6-pypto.cast-2.png filter=lfs diff=lfs merge=lfs -text
7-pypto.sum_1.png filter=lfs diff=lfs merge=lfs -text
8-nz-reduce.png filter=lfs diff=lfs merge=lfs -text
9-pypto.sum_2.png filter=lfs diff=lfs merge=lfs -text
10-pypto.cast.png filter=lfs diff=lfs merge=lfs -text
11-zh-cn_image_0000002524825989.png filter=lfs diff=lfs merge=lfs -text
12-pypto.amin_1.png filter=lfs diff=lfs merge=lfs -text
Rdocs/zh/api/figures/pypto.amax_1.png→docs/zh/api/figures/amax_1.png+0-0
Rdocs/zh/api/figures/pypto.amax_2.png→docs/zh/api/figures/amax_2.png+0-0
Rdocs/zh/api/figures/pypto.amin_1.png→docs/zh/api/figures/amin_1.png+0-0
Rdocs/zh/api/figures/pypto.amin_2.png→docs/zh/api/figures/amin_2.png+0-0

这个只是把 pypto. 的前缀去掉?

likedislike
Rdocs/zh/api/figures/zh-cn_image_0000002524825989.png→docs/zh/api/figures/gather_in_ub.png+0-0
@@ -1,3 +0,0 @@
1-version https://git-lfs.github.com/spec/v1
2-oid sha256:b455f5b1c8468260c2bfae882e5f6ab5b0ce66b0e21ab005de15372baaffe7b1
3-size 8011
@@ -1,3 +0,0 @@
1-version https://git-lfs.github.com/spec/v1
2-oid sha256:667daa4d93d47e9400371ee9086d0e518fc8859e9aa8cad6556ec43a5f4edcba
3-size 6742
@@ -1,3 +0,0 @@
1-version https://git-lfs.github.com/spec/v1
2-oid sha256:0fd73ef192c3b11fcdea3bc2c8b286bb0633a865e7ad0790f58d591391fa2c16
3-size 10967
@@ -1,3 +0,0 @@
1-version https://git-lfs.github.com/spec/v1
2-oid sha256:c823a3b0f31e92d3afa001562c0242b944f831bdb8acd34ac5b45bce617a5550
3-size 7104
Rdocs/zh/api/figures/pypto.sum_1.png→docs/zh/api/figures/sum_1.png+0-0
Rdocs/zh/api/figures/pypto.sum_2.png→docs/zh/api/figures/sum_2.png+0-0
@@ -147,6 +147,7 @@
147 - [pypto.index_put_](operation/pypto-index_put_.md)147 - [pypto.index_put_](operation/pypto-index_put_.md)
148 - [pypto.interleave](operation/pypto-interleave.md)148 - [pypto.interleave](operation/pypto-interleave.md)
149 - [pypto.isfinite](operation/pypto-isfinite.md)149 - [pypto.isfinite](operation/pypto-isfinite.md)
150+ - [pypto.isnan](operation/pypto-isnan.md)
150 - [pypto.le](operation/pypto-le.md)151 - [pypto.le](operation/pypto-le.md)
151 - [pypto.lrelu](operation/pypto-lrelu.md)152 - [pypto.lrelu](operation/pypto-lrelu.md)
152 - [pypto.log](operation/pypto-log.md)153 - [pypto.log](operation/pypto-log.md)
@@ -165,6 +166,7 @@
165 - [pypto.normal](operation/pypto-normal.md)166 - [pypto.normal](operation/pypto-normal.md)
166 - [pypto.ones](operation/pypto-ones.md)167 - [pypto.ones](operation/pypto-ones.md)
167 - [pypto.one_hot](operation/pypto-one_hot.md)168 - [pypto.one_hot](operation/pypto-one_hot.md)
169+ - [pypto.pack](operation/pypto-pack.md)
168 - [pypto.pad](operation/pypto-pad.md)170 - [pypto.pad](operation/pypto-pad.md)
169 - [pypto.permute](operation/pypto-permute.md)171 - [pypto.permute](operation/pypto-permute.md)
170 - [pypto.pow](operation/pypto-pow.md)172 - [pypto.pow](operation/pypto-pow.md)
@@ -199,6 +201,7 @@
199 - [pypto.tril](operation/pypto-tril.md)201 - [pypto.tril](operation/pypto-tril.md)
200 - [pypto.triu](operation/pypto-triu.md)202 - [pypto.triu](operation/pypto-triu.md)
201 - [pypto.trunc](operation/pypto-trunc.md)203 - [pypto.trunc](operation/pypto-trunc.md)
204+ - [pypto.unpack](operation/pypto-unpack.md)
202 - [pypto.unsqueeze](operation/pypto-unsqueeze.md)205 - [pypto.unsqueeze](operation/pypto-unsqueeze.md)
203 - [pypto.uniform](operation/pypto-uniform.md)206 - [pypto.uniform](operation/pypto-uniform.md)
204 - [pypto.var](operation/pypto-var.md)207 - [pypto.var](operation/pypto-var.md)
@@ -35,7 +35,6 @@ pypto-clip
35pypto-clone35pypto-clone
36pypto-concat36pypto-concat
37pypto-conv37pypto-conv
38-pypto-copysign
39pypto-cos38pypto-cos
40pypto-cosh39pypto-cosh
41pypto-cumprod40pypto-cumprod
@@ -19,10 +19,10 @@
19定义指定计算的维度(Reduce轴)为R轴,非指定维度(Normal轴)为A轴。如下图所示,对Shape为\(2, 3\)的二维矩阵进行运算,指定在第一维求最大值,输出结果为\[4, 5, 6\];指定在第二维求最大值,输出结果为\[3, 6\]。19定义指定计算的维度(Reduce轴)为R轴,非指定维度(Normal轴)为A轴。如下图所示,对Shape为\(2, 3\)的二维矩阵进行运算,指定在第一维求最大值,输出结果为\[4, 5, 6\];指定在第二维求最大值,输出结果为\[3, 6\]。
20 20 
21**图1** amax按第一个维度计算示例21**图1** amax按第一个维度计算示例
22-![](../figures/pypto.amax_1.png)22+![](../figures/amax_1.png)
23 23 
24**图2** amax按最后一个维度计算示例24**图2** amax按最后一个维度计算示例
25-![](../figures/pypto.amax_2.png)25+![](../figures/amax_2.png)
26 26 
27## 函数原型27## 函数原型
28 28 
@@ -19,10 +19,10 @@
19定义指定计算的维度(Reduce轴)为R轴,非指定维度(Normal轴)为A轴。如下图所示,对Shape为\(2, 3\)的二维矩阵进行运算,指定在第一维求最小值,输出结果为\[1, 2, 3\];指定在第二维求最小值,输出结果为\[1, 4\]。19定义指定计算的维度(Reduce轴)为R轴,非指定维度(Normal轴)为A轴。如下图所示,对Shape为\(2, 3\)的二维矩阵进行运算,指定在第一维求最小值,输出结果为\[1, 2, 3\];指定在第二维求最小值,输出结果为\[1, 4\]。
20 20 
21**图1** amin按第一个维度计算示例21**图1** amin按第一个维度计算示例
22-![](../figures/pypto.amin_1.png)22+![](../figures/amin_1.png)
23 23 
24**图2** amin按最后一个维度计算示例24**图2** amin按最后一个维度计算示例
25-![](../figures/pypto.amin_2.png)25+![](../figures/amin_2.png)
26 26 
27## 函数原型27## 函数原型
28 28 
@@ -60,7 +60,7 @@ TileShape的维度设置须与输出张量保持一致,用于控制输出Tile
60 60 
61### 接口调用示例61### 接口调用示例
62 62 
63-![](../figures/zh-cn_image_0000002524825989.png)63+![](../figures/gather_in_ub.png)
64 64 
65考虑以上场景,indices为topk结果,block\_table为Page Attention的页表,param为kv cache,block\_size为2。最终的结果是将token的kv cache收集起来。65考虑以上场景,indices为topk结果,block\_table为Page Attention的页表,param为kv cache,block\_size为2。最终的结果是将token的kv cache收集起来。
66 66 
@@ -2,9 +2,15 @@
2 2 
3## 产品支持情况3## 产品支持情况
4 4 
5-- Ascend 950PR:支持5+<!-- npu="950" id1 -->
6+- Ascend 950PR/Ascend 950DT:支持
7+<!-- end id1 -->
8+<!-- npu="A3" id2 -->
6- Atlas A3 训练系列产品/Atlas A3 推理系列产品:支持9- Atlas A3 训练系列产品/Atlas A3 推理系列产品:支持
10+<!-- end id2 -->
11+<!-- npu="910b" id3 -->
7- Atlas A2 训练系列产品/Atlas A2 推理系列产品:支持12- Atlas A2 训练系列产品/Atlas A2 推理系列产品:支持
13+<!-- end id3 -->
8 14 
9## 功能说明15## 功能说明
10 16 
@@ -2,9 +2,15 @@
2 2 
3## 产品支持情况3## 产品支持情况
4 4 
5-- Ascend 950PR:支持5+<!-- npu="950" id1 -->
6+- Ascend 950PR/Ascend 950DT:支持
7+<!-- end id1 -->
8+<!-- npu="A3" id2 -->
6- Atlas A3 训练系列产品/Atlas A3 推理系列产品:支持9- Atlas A3 训练系列产品/Atlas A3 推理系列产品:支持
10+<!-- end id2 -->
11+<!-- npu="910b" id3 -->
7- Atlas A2 训练系列产品/Atlas A2 推理系列产品:支持12- Atlas A2 训练系列产品/Atlas A2 推理系列产品:支持
13+<!-- end id3 -->
8 14 
9## 功能说明15## 功能说明
10 16 
@@ -19,10 +19,10 @@
19定义指定计算的维度(Reduce轴)为R轴,非指定维度(Normal轴)为A轴。如下图所示,对Shape为\(2, 3\)的二维矩阵进行运算,指定在第一维计算数据的累加,输出结果为\[5, 7, 9\];指定在第二维计算数据的累加,输出结果为\[6, 15\]。19定义指定计算的维度(Reduce轴)为R轴,非指定维度(Normal轴)为A轴。如下图所示,对Shape为\(2, 3\)的二维矩阵进行运算,指定在第一维计算数据的累加,输出结果为\[5, 7, 9\];指定在第二维计算数据的累加,输出结果为\[6, 15\]。
20 20 
21**图1** sum按第一个维度计算示例21**图1** sum按第一个维度计算示例
22-![](../figures/pypto.sum_1.png)22+![](../figures/sum_1.png)
23 23 
24**图2** sum按最后一个维度计算示例24**图2** sum按最后一个维度计算示例
25-![](../figures/pypto.sum_2.png)25+![](../figures/sum_2.png)
26 26 
27## 函数原型27## 函数原型
28 28 
@@ -2,9 +2,15 @@
2 2 
3## 产品支持情况3## 产品支持情况
4 4 
5-- Ascend 950PR:支持5+<!-- npu="950" id1 -->
6+- Ascend 950PR/Ascend 950DT:支持
7+<!-- end id1 -->
8+<!-- npu="A3" id2 -->
6- Atlas A3 训练系列产品/Atlas A3 推理系列产品:支持9- Atlas A3 训练系列产品/Atlas A3 推理系列产品:支持
10+<!-- end id2 -->
11+<!-- npu="910b" id3 -->
7- Atlas A2 训练系列产品/Atlas A2 推理系列产品:支持12- Atlas A2 训练系列产品/Atlas A2 推理系列产品:支持
13+<!-- end id3 -->
8 14 
9## 功能说明15## 功能说明
10 16 
@@ -49,11 +49,11 @@ libtile_fwk_interface.so(npu::tile_fwk::RecordLoopFunc::Iterator::operator!=(npu
49 49 
50这是由于数据从`a`中读取又写回`a`导致的。由于PyPTO描述的是一个图表达,在读取和写入的时候,当前认为`a`是一个整体,因此创建的连接关系会形成一个环路,即`a → b → b.exp() → a`,而PyPTO不允许构造出的图内存在环路,必须为DAG(有向无环图),所以才有这个报错。50这是由于数据从`a`中读取又写回`a`导致的。由于PyPTO描述的是一个图表达,在读取和写入的时候,当前认为`a`是一个整体,因此创建的连接关系会形成一个环路,即`a → b → b.exp() → a`,而PyPTO不允许构造出的图内存在环路,必须为DAG(有向无环图),所以才有这个报错。
51 51 
52-![](../../figures/zh-cn_image_0000002499301464.png)52+![](../../figures/view_assemble_cycle_1.png)
53 53 
54## 解决措施54## 解决措施
55 55 
56- 当前需要将读取和写入`a`的逻辑拆分成两个图去定义,避免一个图内存在环路。56- 当前需要将读取和写入`a`的逻辑拆分成两个图去定义,避免一个图内存在环路。
57- 后续等Assemble的SSA语义上线后使用该写法不会有问题。57- 后续等Assemble的SSA语义上线后使用该写法不会有问题。
58 58 
59-![](../../figures/zh-cn_image_0000002530981685.png)59+![](../../figures/view_assemble_cycle_2.png)
@@ -143,6 +143,7 @@ Ctrl AICPU控制流执行失败(devTask构建、stitch处理异常)。
143 | `rule_static_integrity` | 编译期声明的静态后继在运行时是否保留 |143 | `rule_static_integrity` | 编译期声明的静态后继在运行时是否保留 |
144 | `rule_stitch_legality` | stitch边引用的producer/consumer是否合法 |144 | `rule_stitch_legality` | stitch边引用的producer/consumer是否合法 |
145 | `rule_cell_write_conflict` | 同一cell是否存在并发写冲突 |145 | `rule_cell_write_conflict` | 同一cell是否存在并发写冲突 |
146+ 
146 无问题输出`PASS`,有问题输出分类摘要及`dep_check_report.csv`详细定位。147 无问题输出`PASS`,有问题输出分类摘要及`dep_check_report.csv`详细定位。
147 148 
148## F73008 CTRL_ALLOC_TIMEOUT149## F73008 CTRL_ALLOC_TIMEOUT
@@ -93,7 +93,7 @@
93 93 
94 右键单击Before\_004\_ExpandFunction\_TENSOR\_loop\_0\_Unroll1\_PATH0\_hiddenfunc0\_8.json文件,在弹出的菜单中选择“使用PyPTO Toolkit打开”。94 右键单击Before\_004\_ExpandFunction\_TENSOR\_loop\_0\_Unroll1\_PATH0\_hiddenfunc0\_8.json文件,在弹出的菜单中选择“使用PyPTO Toolkit打开”。
95 95 
96- ![](../figures/zh-cn_image_0000002499728650.png)96+ ![](../figures/debug_5.png)
97 97 
98 右上角可以看到计算图类型为Tensor Graph,Tensor Graph由Tensor和Operation组成,图中的Tensor Shape和代码定义一致,且没有经过Tile展开。98 右上角可以看到计算图类型为Tensor Graph,Tensor Graph由Tensor和Operation组成,图中的Tensor Shape和代码定义一致,且没有经过Tile展开。
99 99 
@@ -101,7 +101,7 @@
101 101 
102 右键单击Before\_026\_SubgraphToFunction\_TENSOR\_loop\_0\_Unroll1\_PATH0\_hiddenfunc0\_8.json文件,在弹出的菜单中选择“使用PyPTO Toolkit打开”。102 右键单击Before\_026\_SubgraphToFunction\_TENSOR\_loop\_0\_Unroll1\_PATH0\_hiddenfunc0\_8.json文件,在弹出的菜单中选择“使用PyPTO Toolkit打开”。
103 103 
104- ![](../figures/zh-cn_image_0000002499888764.png)104+ ![](../figures/debug_6.png)
105 105 
106 右上角可以看到计算图类型为Tile Graph,相比于Tile展开前,Tile Graph中增加了很多节点,这是因为原Shape为\(-1, 32, 1, 256\)的Tensor经过Tile展开,切分成Shape为\(1, 4 ,1, 64\)的Tile。同时,为Tile分配内存层级(对应图中asis-原地址,tobe-目的地址),并自动插入内存搬运节点(对应图中TILE\_COPY\_IN和TILE\_COPY\_OUT)。106 右上角可以看到计算图类型为Tile Graph,相比于Tile展开前,Tile Graph中增加了很多节点,这是因为原Shape为\(-1, 32, 1, 256\)的Tensor经过Tile展开,切分成Shape为\(1, 4 ,1, 64\)的Tile。同时,为Tile分配内存层级(对应图中asis-原地址,tobe-目的地址),并自动插入内存搬运节点(对应图中TILE\_COPY\_IN和TILE\_COPY\_OUT)。
107 107 
@@ -109,7 +109,7 @@
109 109 
110 右键单击After\_036\_CodegenPreproc\_TENSOR\_loop\_0\_Unroll1\_PATH0\_hiddenfunc0\_8\_LEAF\_program\_id\_00\_15536366383870408930.json文件,在弹出的菜单中选择“使用PyPTO Toolkit打开”。110 右键单击After\_036\_CodegenPreproc\_TENSOR\_loop\_0\_Unroll1\_PATH0\_hiddenfunc0\_8\_LEAF\_program\_id\_00\_15536366383870408930.json文件,在弹出的菜单中选择“使用PyPTO Toolkit打开”。
111 111 
112- ![](../figures/zh-cn_image_0000002531608703.png)112+ ![](../figures/debug_7.png)
113 113 
114 右上角可以看到计算图类型为Block Graph,在Block Graph阶段,Tile Graph被切成若干子图,每一个子图对应一个Block Graph,因此相比Tile Graph,Block Graph的规模大量减少。114 右上角可以看到计算图类型为Block Graph,在Block Graph阶段,Tile Graph被切成若干子图,每一个子图对应一个Block Graph,因此相比Tile Graph,Block Graph的规模大量减少。
115 115 
@@ -119,7 +119,7 @@
119 119 
120 右键单击After\_036\_CodegenPreproc\_TENSOR\_loop\_0\_Unroll1\_PATH0\_hiddenfunc0\_8\_ROOT.json文件,在弹出的菜单中选择“使用PyPTO Toolkit打开”。120 右键单击After\_036\_CodegenPreproc\_TENSOR\_loop\_0\_Unroll1\_PATH0\_hiddenfunc0\_8\_ROOT.json文件,在弹出的菜单中选择“使用PyPTO Toolkit打开”。
121 121 
122- ![](../figures/zh-cn_image_0000002499728842.png)122+ ![](../figures/debug_8.png)
123 123 
124 右上角可以看到计算图类型为Execute Graph,Execute Graph中包含Tensor节点和调用节点(带有fx标识,表示对Block Graph进行一次调用),双击调用节点,可以查看对应的Block Graph子图信息,了解具体的执行过程。124 右上角可以看到计算图类型为Execute Graph,Execute Graph中包含Tensor节点和调用节点(带有fx标识,表示对Block Graph进行一次调用),双击调用节点,可以查看对应的Block Graph子图信息,了解具体的执行过程。
125 125 
@@ -162,11 +162,11 @@
162 162 
1633. 性能仿真执行成功后,在output目录下,生成以下文件信息。1633. 性能仿真执行成功后,在output目录下,生成以下文件信息。
164 164 
165- ![](../figures/zh-cn_image_0000002527468273.png)165+ ![](../figures/debug_0.png)
166 166 
1674. 右键单击merged\_swimlane.json文件,在弹出的菜单中选择“使用PyPTO Toolkit打开”。1674. 右键单击merged\_swimlane.json文件,在弹出的菜单中选择“使用PyPTO Toolkit打开”。
168 168 
169- ![](../figures/zh-cn_image_0000002495188648.png)169+ ![](../figures/debug_1.png)
170 170 
171 泳道图展示每个核内任务调试情况,包含执行耗时、空闲间隔等,可根据具体情况对算子进行调优,如调整张量的分块形状。171 泳道图展示每个核内任务调试情况,包含执行耗时、空闲间隔等,可根据具体情况对算子进行调优,如调整张量的分块形状。
172 172 
@@ -197,11 +197,11 @@ Ascend 950PR/Ascend 950DT 支持以下两种仿真模式,均通过`cannsim rec
197 197 
1982. 性能仿真执行成功后,在output目录下,生成以下文件信息。1982. 性能仿真执行成功后,在output目录下,生成以下文件信息。
199 199 
200- ![](../figures/zh-cn_image_0000002527468273.png)200+ ![](../figures/debug_0.png)
201 201 
2023. 右键单击merged\_swimlane.json文件,在弹出的菜单中选择"使用PyPTO Toolkit打开"。2023. 右键单击merged\_swimlane.json文件,在弹出的菜单中选择"使用PyPTO Toolkit打开"。
203 203 
204- ![](../figures/zh-cn_image_0000002495188648.png)204+ ![](../figures/debug_1.png)
205 205 
206 泳道图展示每个核内任务调试情况,包含执行耗时、空闲间隔等,可根据具体情况对算子进行调优,如调整张量的分块形状。206 泳道图展示每个核内任务调试情况,包含执行耗时、空闲间隔等,可根据具体情况对算子进行调优,如调整张量的分块形状。
207 207 
@@ -229,7 +229,7 @@ Ascend 950PR/Ascend 950DT 支持以下两种仿真模式,均通过`cannsim rec
229 229 
2303. 性能仿真执行成功后,在output/cannsim_*/目录下,生成以下文件信息。2303. 性能仿真执行成功后,在output/cannsim_*/目录下,生成以下文件信息。
231 231 
232- ![](../figures/zh-cn_image_0000002527468274.png)232+ ![](../figures/debug_2.png)
233 233 
2344. 执行生成报告命令。2344. 执行生成报告命令。
235 235 
@@ -239,11 +239,11 @@ Ascend 950PR/Ascend 950DT 支持以下两种仿真模式,均通过`cannsim rec
239 239 
2405. 执行生成报告命令后,在output/cannsim_*/report目录下,生成以下文件信息。2405. 执行生成报告命令后,在output/cannsim_*/report目录下,生成以下文件信息。
241 241 
242- ![](../figures/zh-cn_image_0000002527468275.png)242+ ![](../figures/debug_3.png)
243 243 
244 把图中如trace_core0.json放入chrome://tracing/中,即可得到流水报告。244 把图中如trace_core0.json放入chrome://tracing/中,即可得到流水报告。
245 245 
246- ![](../figures/zh-cn_image_0000002527468276.png)246+ ![](../figures/debug_4.png)
247 247 
248 流水报告展示每个核内指令的执行情况,包含执行耗时、空闲间隔等,可根据具体情况对算子进行调优,如调整张量的分块形状。248 流水报告展示每个核内指令的执行情况,包含执行耗时、空闲间隔等,可根据具体情况对算子进行调优,如调整张量的分块形状。
249 249 
@@ -15,7 +15,7 @@ ffn\_shared\_expert\_quant算子对应GLM4.5网络中MoE共享专家的计算逻
151. 按照[开启调试模式](debug.md)所述步骤开启调试模式,重新运行用例后获取ffn\_shared\_expert\_quant算子计算图。151. 按照[开启调试模式](debug.md)所述步骤开启调试模式,重新运行用例后获取ffn\_shared\_expert\_quant算子计算图。
162. 按照[查看计算图](debug.md)所述,使用PyPTO Toolkit可视化工具打开Tensor Graph阶段的计算图文件,例如:Before\_004\_ExpandFunction\_TENSOR\_share\_loop\_idx\_Unroll1\_PATH0\_4.json:162. 按照[查看计算图](debug.md)所述,使用PyPTO Toolkit可视化工具打开Tensor Graph阶段的计算图文件,例如:Before\_004\_ExpandFunction\_TENSOR\_share\_loop\_idx\_Unroll1\_PATH0\_4.json:
17 17 
18- ![](../figures/zh-cn_image_0000002500534720.png)18+ ![](../figures/fnn_0.png)
19 19 
203. 实际的算子代码中调用了Matmul接口进行操作,然而通过上图可以看到,无Matmul操作节点,并且后续所有Tensor以及Operation节点都未能加载出来,有明显异常。203. 实际的算子代码中调用了Matmul接口进行操作,然而通过上图可以看到,无Matmul操作节点,并且后续所有Tensor以及Operation节点都未能加载出来,有明显异常。
21 21 
@@ -9,7 +9,7 @@
9 9 
10## 整体流程10## 整体流程
11 11 
12-![](../figures/zh-cn_image_0000002532402113.png)12+![](../figures/precision_1.png)
13 13 
14## 确认问题合法性14## 确认问题合法性
15 15 
@@ -1,31 +0,0 @@
1-graph_compilation_process.png filter=lfs diff=lfs merge=lfs -text
2-optimized_swimlane.png filter=lfs diff=lfs merge=lfs -text
3-zh-cn_image_0000002499301464.png filter=lfs diff=lfs merge=lfs -text
4-zh-cn_image_0000002499719036.png filter=lfs diff=lfs merge=lfs -text
5-zh-cn_image_0000002527468273.png filter=lfs diff=lfs merge=lfs -text
6-zh-cn_image_0000002531608703.png filter=lfs diff=lfs merge=lfs -text
7-cube_optimization.png filter=lfs diff=lfs merge=lfs -text
8-docs_models_deepseek-v3-2-exp_figures_IndexerPrologQuant.png filter=lfs diff=lfs merge=lfs -text
9-execution_state_runtime_diagram.png filter=lfs diff=lfs merge=lfs -text
10-pypto_architecture.png filter=lfs diff=lfs merge=lfs -text
11-vec_optimization_swimlane.png filter=lfs diff=lfs merge=lfs -text
12-zh-cn_image_0000002495188648.png filter=lfs diff=lfs merge=lfs -text
13-zh-cn_image_0000002499888764.png filter=lfs diff=lfs merge=lfs -text
14-computation_graph_execution_process.png filter=lfs diff=lfs merge=lfs -text
15-pre_optimization_state.png filter=lfs diff=lfs merge=lfs -text
16-transformation_process.png filter=lfs diff=lfs merge=lfs -text
17-zh-cn_image_0000002499728650.png filter=lfs diff=lfs merge=lfs -text
18-zh-cn_image_0000002531853385.png filter=lfs diff=lfs merge=lfs -text
19-zh-cn_image_0000002532402113.png filter=lfs diff=lfs merge=lfs -text
20-execution_process_flow.png filter=lfs diff=lfs merge=lfs -text
21-zh-cn_image_0000002499728842.png filter=lfs diff=lfs merge=lfs -text
22-zh-cn_image_0000002532891719.png filter=lfs diff=lfs merge=lfs -text
23-computation_graph_compilation_process.png filter=lfs diff=lfs merge=lfs -text
24-zh-cn_image_0000002531638777.png filter=lfs diff=lfs merge=lfs -text
25-swimlane_graph.png filter=lfs diff=lfs merge=lfs -text
26-zh-cn_image_0000002530981685.png filter=lfs diff=lfs merge=lfs -text
27-view_swimlane_graph.png filter=lfs diff=lfs merge=lfs -text
28-zh-cn_image_0000002499877218.png filter=lfs diff=lfs merge=lfs -text
29-zh-cn_image_0000002500534720.png filter=lfs diff=lfs merge=lfs -text
30-webide2.png filter=lfs diff=lfs merge=lfs -text
31-webide1.png filter=lfs diff=lfs merge=lfs -text
Rdocs/zh/tutorials/figures/zh-cn_image_0000002527468273.png→docs/zh/tutorials/figures/debug_0.png+0-0
Rdocs/zh/tutorials/figures/zh-cn_image_0000002495188648.png→docs/zh/tutorials/figures/debug_1.png+0-0
Rdocs/zh/tutorials/figures/zh-cn_image_0000002527468274.png→docs/zh/tutorials/figures/debug_2.png+0-0
Rdocs/zh/tutorials/figures/zh-cn_image_0000002527468275.png→docs/zh/tutorials/figures/debug_3.png+0-0
Rdocs/zh/tutorials/figures/zh-cn_image_0000002527468276.png→docs/zh/tutorials/figures/debug_4.png+0-0
Rdocs/zh/tutorials/figures/zh-cn_image_0000002499728650.png→docs/zh/tutorials/figures/debug_5.png+0-0
Rdocs/zh/tutorials/figures/zh-cn_image_0000002499888764.png→docs/zh/tutorials/figures/debug_6.png+0-0
Rdocs/zh/tutorials/figures/zh-cn_image_0000002531608703.png→docs/zh/tutorials/figures/debug_7.png+0-0
Rdocs/zh/tutorials/figures/zh-cn_image_0000002499728842.png→docs/zh/tutorials/figures/debug_8.png+0-0
Rdocs/zh/tutorials/figures/zh-cn_image_0000002500534720.png→docs/zh/tutorials/figures/fnn_0.png+0-0
Rdocs/zh/tutorials/figures/zh-cn_image_0000002499877218.png→docs/zh/tutorials/figures/graph_1.png+0-0
Rdocs/zh/tutorials/figures/zh-cn_image_0000002531853385.png→docs/zh/tutorials/figures/graph_2.png+0-0
Rdocs/zh/tutorials/figures/zh-cn_image_0000002531638777.png→docs/zh/tutorials/figures/graph_3.png+0-0
Rdocs/zh/tutorials/figures/zh-cn_image_0000002499719036.png→docs/zh/tutorials/figures/graph_4.png+0-0
Rdocs/zh/tutorials/figures/zh-cn_image_0000002532402113.png→docs/zh/tutorials/figures/precision_1.png+0-0
Rdocs/zh/tutorials/figures/zh-cn_image_0000002499301464.png→docs/zh/tutorials/figures/view_assemble_cycle_1.png+0-0
Rdocs/zh/tutorials/figures/zh-cn_image_0000002530981685.png→docs/zh/tutorials/figures/view_assemble_cycle_2.png+0-0
@@ -1,3 +0,0 @@
1-version https://git-lfs.github.com/spec/v1
2-oid sha256:110d13eb49c89a8115096b7058ae5474d86e3ae25f465a8b0f2016d9ce41e104
3-size 663699
@@ -141,21 +141,21 @@ PyPTO程序在编译过程中,会自动生成由Tensor和Operation组合而成
141 141 
142 program.json文件包含了Execute Graph和Block Graph的汇总信息,图中的关键信息为:左右两边的卡片为Tensor节点(代表输入/输出数据)、中间卡片为调用节点(带有fx标识,单击可以实现信息钻取)。142 program.json文件包含了Execute Graph和Block Graph的汇总信息,图中的关键信息为:左右两边的卡片为Tensor节点(代表输入/输出数据)、中间卡片为调用节点(带有fx标识,单击可以实现信息钻取)。
143 143 
144- ![](../figures/zh-cn_image_0000002499877218.png)144+ ![](../figures/graph_1.png)
145 145 
1462. 双击中间卡片逐层钻取到下图所示的Execute Graph。1462. 双击中间卡片逐层钻取到下图所示的Execute Graph。
147 147 
148- ![](../figures/zh-cn_image_0000002531853385.png)148+ ![](../figures/graph_2.png)
149 149 
150 图中不同的色块(CALL:TENSOR\_xx)分别代表一个调用节点,表示该计算图被划分成不同的Block Graph子图。150 图中不同的色块(CALL:TENSOR\_xx)分别代表一个调用节点,表示该计算图被划分成不同的Block Graph子图。
151 151 
1523. 双击上图的调用节点,可以看到Block Graph子图信息,标识着任务的具体执行过程。1523. 双击上图的调用节点,可以看到Block Graph子图信息,标识着任务的具体执行过程。
153 153 
154- ![](../figures/zh-cn_image_0000002531638777.png)154+ ![](../figures/graph_3.png)
155 155 
156 放大后可以看到图中具体的Tensor和Operation节点信息和连接关系:156 放大后可以看到图中具体的Tensor和Operation节点信息和连接关系:
157 157 
158- ![](../figures/zh-cn_image_0000002499719036.png)158+ ![](../figures/graph_4.png)
159 159 
160## 查看泳道图160## 查看泳道图
161 161