已合并
[AscendNPU IR][CV][CVPipelining] Clarify CV lazy load tensor hint #1324
[AscendNPU IR][CV][CVPipelining] Clarify CV lazy load tensor hint #1324
已合并
huangyujun创建于 7月3日
2 个文件变更+14-0
@@ -58,6 +58,13 @@ scf.for 0 to N step 3*S {
58| Option | Default | Description |58| Option | Default | Description |
59|--------|--------|-------------|59|--------|--------|-------------|
60| `set-workspace-multibuffer` | 2 | Number of software pipeline stages and multi-buffering count |60| `set-workspace-multibuffer` | 2 | Number of software pipeline stages and multi-buffering count |
61+| `--enable-lazy-loading` | false | Enable lazy load in CV pipelining. Load ops can be cloned into multiple work items to reduce intermediate buffer expansion. |
62+ 
63+Lazy load can also be enabled for a specific tensor by adding the `cv_pipeline_lazy_load` compile hint:
64+ 
65+```python
66+extension.compile_hint(t, "cv_pipeline_lazy_load", True)
67+```
61 68 
62## Constraints69## Constraints
63 70 
@@ -59,6 +59,13 @@ scf.for 0 to N step 3*S {
59| 选项 | 默认值 | 含义 |59| 选项 | 默认值 | 含义 |
60|------|--------|------|60|------|--------|------|
61| `set-workspace-multibuffer` | 2 | 软件流水的阶段数,同时也是Multi-Buffering的数量 |61| `set-workspace-multibuffer` | 2 | 软件流水的阶段数,同时也是Multi-Buffering的数量 |
62+| `--enable-lazy-loading` | false | 开启CV Pipelining中的Lazy Load功能,允许将Load op克隆到多个`Work Item`中,以减少中间buffer扩展 |
63+ 
64+也可以在算子侧通过`cv_pipeline_lazy_load`编译提示为指定tensor开启Lazy Load功能:
65+ 
66+```python
67+extension.compile_hint(t, "cv_pipeline_lazy_load", True)
68+```
62 69 
63## 约束能力70## 约束能力
64 71