Skip to content

Commit d248ffb

Browse files
authored
[compiler](docs) modify docs for compile options cleanup (#1902)
1 parent 6fe4fa0 commit d248ffb

14 files changed

Lines changed: 254 additions & 90 deletions

docs/en/architecture_design_and_core_features.md

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -70,24 +70,30 @@ This project extends the support for Huawei Ascend NPU (using the CANN software
7070

7171
|No.| NPU Option | Hardware Platform | Description|
7272
| --- | --------------------------------------------- | ---------- | ----- |
73-
| 1 | multibuffer | NPU | Autotune option. It enables or disables the ping-pong pipeline. Enabled by default.|
74-
| 2 | enable_auto_bind_sub_block | NPU | Autotune option (CV-fused kernels only). It enables or disables auto-binding of sub-blocks.|
75-
| 3 | enable_hivm_auto_cv_balance | NPU | Autotune option (CV-fused kernels only). It enables or disables automatic CV balancing.|
76-
| 4 | sync_solver | NPU | Autotune option (CV-fused kernels only). It enables or disables the synchronization solver. |
77-
| 5 | unit_flag | NPU | Autotune option. It enables or disables the sync unit flag.|
78-
| 6 | inject_barrier_all | NPU | Autotune option. It enables or disables automatic injection of barriers for all operations.|
79-
| 7 | inject_block_all | NPU | Autotune option. It enables or disables automatic injection of blocks for all operations.|
80-
| 8 | limit_auto_multi_buffer_only_for_local_buffer | NPU | Autotune option. It restricts automatic multi-buffering only to local buffers.|
81-
| 9 | limit_auto_multi_buffer_of_local_buffer | NPU | Autotune option. It enables or disables automatic multi-buffering for local buffers.|
82-
| 10 | set_workspace_multibuffer | NPU | Autotune option. It enables or disables multi-buffering for the workspace.|
83-
| 11 | tile_mix_vector_loop | NPU | Autotune option (CV-fused kernels only). It enables or disables tiling for vector loops.|
84-
| 12 | tile_mix_cube_loop | NPU | Autotune option (CV-fused kernels only). It enables or disables tiling for cube loops.|
85-
| 13 | disable_auto_inject_block_sync | NPU | Autotune option (CV-fused kernels only). It enables or disables automatic injection of block synchronizations.|
86-
| 14 | stream | NPU | (Optional) Informs the compiler about the NPU stream to use.|
87-
| 15 | enable_linearize | NPU | Autotune option. It enables or disables the linearization pass.|
88-
| 16 | enable_nd2nz_on_vector | NPU | Autotune option (CV-fused kernels only). It enables or disables the ND (n-dimensional) to NZ (non-zero) layout transformation.|
89-
| 17 | auto_blockify_size | NPU | Autotune option. It enables or disables AutoBlockify pass. It is ignored when TRITON_ALL_BLOCKS_PARALLEL is not set |
90-
| 18 | compile_mode | NPU (950) | Compilation mode: `"unstructured_in_simt"` (default) / `"simd"` / `"simt_only"`. |
73+
| 1 | multibuffer | NPU | Enables or disables the ping-pong pipeline. Enabled by default.|
74+
| 2 | enable_graph_optimize | NPU | Enables or disables TTIR Graph Optimization.|
75+
| 3 | bisheng_options | NPU (950) | Forwards additional arguments to BiSheng compilation paths that support this option.|
76+
| 4 | enable_auto_bind_sub_block | NPU | Enables or disables automatic sub-block binding.|
77+
| 5 | enable_hivm_auto_cv_balance | NPU | Enables or disables automatic CV balancing.|
78+
| 6 | enable_cube_block_merge | NPU (950) | Controls Cube block merging in the DynamicCV pipeline.|
79+
| 7 | vf_fusion_mode | NPU (950) | Selects the VF fusion strategy.|
80+
| 8 | enable_vf_fusion | NPU (950) | Enables or disables VF fusion.|
81+
| 9 | hfusion_enable_multiple_consumer_fusion | NPU (950) | Enables or disables multiple-consumer HFusion.|
82+
| 10 | sync_solver | NPU | Enables or disables the synchronization solver.|
83+
| 11 | unit_flag | NPU | Enables or disables the sync unit flag.|
84+
| 12 | inject_barrier_all | NPU | Enables or disables automatic barrier injection.|
85+
| 13 | inject_block_all | NPU | Enables or disables automatic block injection.|
86+
| 14 | limit_auto_multi_buffer_only_for_local_buffer | NPU | Restricts automatic multi-buffering to local buffers.|
87+
| 15 | limit_auto_multi_buffer_of_local_buffer | NPU | Configures the local-buffer automatic multi-buffering scope.|
88+
| 16 | set_workspace_multibuffer | NPU | Configures workspace multi-buffering.|
89+
| 17 | tile_mix_vector_loop | NPU | Configures the Vector loop split count.|
90+
| 18 | tile_mix_cube_loop | NPU | Configures the Cube loop split count.|
91+
| 19 | buf_slot_num_of_veccore | NPU | Configures the number of vector-core-local buffer slots.|
92+
| 20 | buf_slot_num_of_crosscore | NPU | Configures the number of cross-core buffer slots.|
93+
| 21 | buf_slot_num_of_gm | NPU | Configures the number of GM load buffer slots.|
94+
| 22 | compile_mode | NPU | Compilation mode: `"simd_simt_template"` (default) / `"simd"` / `"simt_only"`; `"simt_only"` is supported only on Ascend 950.|
95+
96+
See {ref}`Compiler Option Cleanup and Compatibility <compiler-option-cleanup-and-compatibility>` for deprecated-option compatibility and rename mappings.
9197

9298
#### 3.2.2 SIMD Compiler
9399

@@ -216,7 +222,7 @@ Developers choose the compilation path via `compile_mode`.
216222
| `compile_mode` | Description | Compilation Path |
217223
|---|---|---|
218224
| `"simd"` | Pure SIMD: structured access via DMA; unstructured access via scalar loops | `Triton IR → Linalg IR → AscendNPU IR` |
219-
| `"unstructured_in_simt"` (**default**) | Hybrid: structured access stays on SIMD; discrete access prefers SIMT templates | `Triton IR → Linalg IR → AscendNPU IR` |
225+
| `"simd_simt_template"` (**default**) | Hybrid: structured access stays on SIMD; discrete access prefers SIMT templates | `Triton IR → Linalg IR → AscendNPU IR` |
220226
| `"simt_only"` | Pure SIMT: send Triton IR directly to AscendNPU IR | `Triton IR → AscendNPU IR` |
221227

222228
Usage examples:
@@ -226,7 +232,7 @@ Usage examples:
226232
kernel[grid](..., compile_mode="simd")
227233

228234
# Hybrid (default; discrete access on 950 prefers SIMT)
229-
kernel[grid](..., compile_mode="unstructured_in_simt")
235+
kernel[grid](..., compile_mode="simd_simt_template")
230236

231237
# Pure SIMT
232238
kernel[grid](..., compile_mode="simt_only", num_warps=32)
@@ -237,7 +243,7 @@ kernel[grid](..., compile_mode="simt_only", num_warps=32)
237243
```mermaid
238244
flowchart TD
239245
A[compile_mode] --> B["simd"]
240-
A --> C["unstructured_in_simt"]
246+
A --> C["simd_simt_template"]
241247
A --> D["simt_only"]
242248
243249
%% simt_only branch
@@ -251,7 +257,7 @@ flowchart TD
251257
B4 --> B5[TritonToLinalg]
252258
B5 --> B6[AscendNPU IR]
253259
254-
%% unstructured_in_simt full path
260+
%% simd_simt_template full path
255261
C --> C1[discrete-mask-access-conversion]
256262
C1 --> C2[Mark when conditions are met and defer to downstream SIMT handling]
257263
C2 --> C3[triton-to-unstructured]
@@ -273,7 +279,7 @@ flowchart TD
273279
class D,D1 simtOnly
274280
```
275281

276-
| Stage | `"simd"` | `"unstructured_in_simt"` | `"simt_only"` |
282+
| Stage | `"simd"` | `"simd_simt_template"` | `"simt_only"` |
277283
|------|----------|--------------------------|---------------|
278284
| Discrete mask handling | Split into contiguous/discrete bounds and handle with load + select / store | On Ascend 950 with tensor rank ≤ 5: mark and defer to downstream; otherwise same as left | Not run |
279285
| Unstructured access | Expand to scalar loops | Prefer SIMT indirect access (rank ≤ 5); fall back to scalar loops on failure | Not run |

0 commit comments

Comments
 (0)