[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7983FFDTB5VTRGCVRMR0CZH":3,"skill-same:01M7983FFDTB5VTRGCVRMR0CZH":91},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":28,"install":29,"resources":42},"01M7983FFDTB5VTRGCVRMR0CZH","tilelang-npu-cann-ext-api-patterns",null,"Expert-mode optimization pattern references for TileLang Ascend NPU kernels that use explicit hardware memory, manual synchronization, and CV scope separation. This skill does not define the optimize workflow; it only provides pattern material for optimize to consume.","Piagari\u002Fhelix","Piagari","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F129916910?v=4","01M7980QB9Y8WK5TSSRJDC7H1X","01M7980QCA2FWSBBSSM695Y10B",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FPiagari\u002Fhelix\u002Fblob\u002Fmain\u002Fskills\u002Ftilelang\u002Ftilelang-npu-cann-ext-api-patterns\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: tilelang-npu-cann-ext-api-patterns\ndescription: Expert-mode optimization pattern references for TileLang Ascend NPU kernels that use explicit hardware memory, manual synchronization, and CV scope separation. This skill does not define the optimize workflow; it only provides pattern material for optimize to consume.\n---\n\n# TileLang Expert-Mode Optimization Patterns\n\n## Purpose\n\nThis skill provides pattern references for optimize runs that use the Expert programming model — explicit hardware memory allocation, manual synchronization, and Cube\u002FVector scope separation.\n\n## Scope\n\n- This skill does not define optimize workflow behavior.\n- The optimize workflow contract remains owned by `tilelang-npu-optimize`.\n- This skill provides TileLang-specific Expert-mode patterns for performance-critical kernel tuning.\n- Use these patterns when the Developer-mode auto-managed approach is insufficient and the kernel needs precise hardware-level control.\n\n## Expert API Reference\n\nThis skill uses the Expert programming model. Read the Expert API docs before writing any Expert-mode kernel:\n\n- [tilelang-memory-expert.md](..\u002Ftilelang-npu-api-reference\u002Freferences\u002Ftilelang-memory-expert.md) — `T.alloc_ub`, `T.alloc_L1`, `T.alloc_L0A\u002FL0B\u002FL0C`, Expert `pass_configs`\n- [tilelang-compute-expert.md](..\u002Ftilelang-npu-api-reference\u002Freferences\u002Ftilelang-compute-expert.md) — `T.tile.*`, `T.barrier_all`, `T.set_flag`\u002F`T.wait_flag`, `T.set_cross_flag`\u002F`T.wait_cross_flag`\n\nThe Developer docs ([memory-developer](..\u002Ftilelang-npu-api-reference\u002Freferences\u002Ftilelang-memory-developer.md), [compute-developer](..\u002Ftilelang-npu-api-reference\u002Freferences\u002Ftilelang-compute-developer.md), [kernel-basics](..\u002Ftilelang-npu-api-reference\u002Freferences\u002Ftilelang-kernel-basics.md)) cover the shared infrastructure — you should already be familiar with those from convert.\n\n## How To Use This Skill\n\n1. Use this skill only when optimize explicitly stages it.\n2. Read `references\u002Fpattern_index.md` first.\n3. Pick only the most relevant detailed pattern file for the current bottleneck.\n4. Avoid bulk-loading all detailed pattern references unless the kernel genuinely shows multiple independent Expert-mode opportunities.\n\n## Lint Verification\n\nExpert-mode kernels with manual sync are error-prone. **Always run the sync linter after applying any pattern**, before attempting on-device compilation:\n\n```bash\npython3 scripts\u002Ftl_sync_lint.py --tier1 --tier2 --tier3 --tier4 \u003Ckernel>.py\n```\n\nThe linter has four tiers; map findings to on-device symptoms:\n\n| Tier | Flag | Symptom on device |\n|------|------|-------------------|\n| **0** | `FLAG_IMBALANCE`, `CROSS_DEADLOCK`, `NO_INTRA_FENCE` | **Deadlock** — AICore timeout (`507014`), ~10 min hang |\n| **1** (`--tier1`) | `DATA_RACE` | **Precision \u002F correctness errors** — output mismatches ref |\n| **2** (`--tier2`) | `LATE_RELEASE` | **Throughput-collapse deadlock** — buffer-reuse credit released too late |\n| **3** (`--tier3`) | `PRIME_UNDERFLOW` | **First-iteration deadlock** — unconditional wait_flag whose credit is only primed under a guard |\n| **4** (`--tier4`) | `SHARED_MAILBOX` | **Illegal vec config crash** — alloc_shared used as cross-lane mailbox (error `507015`) |\n\nTier 0 checks set\u002Fwait flag balance (liveness). Tier 1 checks happens-before between cross-pipe buffer accesses. Tier 2 catches deferred-credit late releases. Tier 3 catches first-iteration credit underflow. Tier 4 detects illegal cross-vid memory sharing.\n\n## Patterns\n\nAll Expert-mode patterns are documented in `references\u002Fpatterns\u002F`. Start with [pattern_index.md](references\u002Fpattern_index.md) then read the specific pattern file for your bottleneck. If patterns don't cover what you need, explore the full Expert API docs linked above — the memory-expert and compute-expert references cover the complete surface.\n\n## Reading Contract\n\n- Treat this skill as reference material only.\n- Follow optimize workflow, validation, and reporting rules from `tilelang-npu-optimize`.\n- Use the detailed pattern files only when round evidence supports the rewrite direction.\n","# TileLang Expert-Mode Optimization Patterns\n\n## Purpose\n\nThis skill provides pattern references for optimize runs that use the Expert programming model — explicit hardware memory allocation, manual synchronization, and Cube\u002FVector scope separation.\n\n## Scope\n\n- This skill does not define optimize workflow behavior.\n- The optimize workflow contract remains owned by `tilelang-npu-optimize`.\n- This skill provides TileLang-specific Expert-mode patterns for performance-critical kernel tuning.\n- Use these patterns when the Developer-mode auto-managed approach is insufficient and the kernel needs precise hardware-level control.\n\n## Expert API Reference\n\nThis skill uses the Expert programming model. Read the Expert API docs before writing any Expert-mode kernel:\n\n- [tilelang-memory-expert.md](..\u002Ftilelang-npu-api-reference\u002Freferences\u002Ftilelang-memory-expert.md) — `T.alloc_ub`, `T.alloc_L1`, `T.alloc_L0A\u002FL0B\u002FL0C`, Expert `pass_configs`\n- [tilelang-compute-expert.md](..\u002Ftilelang-npu-api-reference\u002Freferences\u002Ftilelang-compute-expert.md) — `T.tile.*`, `T.barrier_all`, `T.set_flag`\u002F`T.wait_flag`, `T.set_cross_flag`\u002F`T.wait_cross_flag`\n\nThe Developer docs ([memory-developer](..\u002Ftilelang-npu-api-reference\u002Freferences\u002Ftilelang-memory-developer.md), [compute-developer](..\u002Ftilelang-npu-api-reference\u002Freferences\u002Ftilelang-compute-developer.md), [kernel-basics](..\u002Ftilelang-npu-api-reference\u002Freferences\u002Ftilelang-kernel-basics.md)) cover the shared infrastructure — you should already be familiar with those from convert.\n\n## How To Use This Skill\n\n1. Use this skill only when optimize explicitly stages it.\n2. Read `references\u002Fpattern_index.md` first.\n3. Pick only the most relevant detailed pattern file for the current bottleneck.\n4. Avoid bulk-loading all detailed pattern references unless the kernel genuinely shows multiple independent Expert-mode opportunities.\n\n## Lint Verification\n\nExpert-mode kernels with manual sync are error-prone. **Always run the sync linter after applying any pattern**, before attempting on-device compilation:\n\n```bash\npython3 scripts\u002Ftl_sync_lint.py --tier1 --tier2 --tier3 --tier4 \u003Ckernel>.py\n```\n\nThe linter has four tiers; map findings to on-device symptoms:\n\n| Tier | Flag | Symptom on device |\n|------|------|-------------------|\n| **0** | `FLAG_IMBALANCE`, `CROSS_DEADLOCK`, `NO_INTRA_FENCE` | **Deadlock** — AICore timeout (`507014`), ~10 min hang |\n| **1** (`--tier1`) | `DATA_RACE` | **Precision \u002F correctness errors** — output mismatches ref |\n| **2** (`--tier2`) | `LATE_RELEASE` | **Throughput-collapse deadlock** — buffer-reuse credit released too late |\n| **3** (`--tier3`) | `PRIME_UNDERFLOW` | **First-iteration deadlock** — unconditional wait_flag whose credit is only primed under a guard |\n| **4** (`--tier4`) | `SHARED_MAILBOX` | **Illegal vec config crash** — alloc_shared used as cross-lane mailbox (error `507015`) |\n\nTier 0 checks set\u002Fwait flag balance (liveness). Tier 1 checks happens-before between cross-pipe buffer accesses. Tier 2 catches deferred-credit late releases. Tier 3 catches first-iteration credit underflow. Tier 4 detects illegal cross-vid memory sharing.\n\n## Patterns\n\nAll Expert-mode patterns are documented in `references\u002Fpatterns\u002F`. Start with [pattern_index.md](references\u002Fpattern_index.md) then read the specific pattern file for your bottleneck. If patterns don't cover what you need, explore the full Expert API docs linked above — the memory-expert and compute-expert references cover the complete surface.\n\n## Reading Contract\n\n- Treat this skill as reference material only.\n- Follow optimize workflow, validation, and reporting rules from `tilelang-npu-optimize`.\n- Use the detailed pattern files only when round evidence supports the rewrite direction.\n",{"name":5,"description":7},"main","5d6a3de8bf1eb43267adffc8e27a87d85fd81a4b","skills\u002Ftilelang\u002Ftilelang-npu-cann-ext-api-patterns","https:\u002F\u002Fgithub.com\u002FPiagari\u002Fhelix","https:\u002F\u002Fgithub.com\u002FPiagari","2026-07-16 20:07:51",{"source":8,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add Piagari\u002Fhelix --skill tilelang-npu-cann-ext-api-patterns",{"tool":35,"command":36},"bunx","bunx skills add Piagari\u002Fhelix --skill tilelang-npu-cann-ext-api-patterns",{"tool":38,"command":39},"pnpm","pnpm dlx skills add Piagari\u002Fhelix --skill tilelang-npu-cann-ext-api-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FPiagari\u002Fhelix\u002Fblob\u002Fmain\u002Fskills\u002Ftilelang\u002Ftilelang-npu-cann-ext-api-patterns\u002FSKILL.md",true,[43,49,53,57,61,65,69,75,79,83,87],{"path":44,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":47,"sourceHtmlUrl":48},"references\u002Fpattern_index.md","REFERENCE","参考文档",7265,"https:\u002F\u002Fgithub.com\u002FPiagari\u002Fhelix\u002Fblob\u002Fmain\u002Fskills\u002Ftilelang\u002Ftilelang-npu-cann-ext-api-patterns\u002Freferences\u002Fpattern_index.md",{"path":50,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":51,"sourceHtmlUrl":52},"references\u002Fpatterns\u002Fcv-sync.md",7063,"https:\u002F\u002Fgithub.com\u002FPiagari\u002Fhelix\u002Fblob\u002Fmain\u002Fskills\u002Ftilelang\u002Ftilelang-npu-cann-ext-api-patterns\u002Freferences\u002Fpatterns\u002Fcv-sync.md",{"path":54,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002Fpatterns\u002Fdouble-buffer.md",7330,"https:\u002F\u002Fgithub.com\u002FPiagari\u002Fhelix\u002Fblob\u002Fmain\u002Fskills\u002Ftilelang\u002Ftilelang-npu-cann-ext-api-patterns\u002Freferences\u002Fpatterns\u002Fdouble-buffer.md",{"path":58,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002Fpatterns\u002Fexplicit-memory.md",4283,"https:\u002F\u002Fgithub.com\u002FPiagari\u002Fhelix\u002Fblob\u002Fmain\u002Fskills\u002Ftilelang\u002Ftilelang-npu-cann-ext-api-patterns\u002Freferences\u002Fpatterns\u002Fexplicit-memory.md",{"path":62,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Fpatterns\u002Flayout-affinity.md",4487,"https:\u002F\u002Fgithub.com\u002FPiagari\u002Fhelix\u002Fblob\u002Fmain\u002Fskills\u002Ftilelang\u002Ftilelang-npu-cann-ext-api-patterns\u002Freferences\u002Fpatterns\u002Flayout-affinity.md",{"path":66,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fpatterns\u002Fworkspace-pipeline.md",6411,"https:\u002F\u002Fgithub.com\u002FPiagari\u002Fhelix\u002Fblob\u002Fmain\u002Fskills\u002Ftilelang\u002Ftilelang-npu-cann-ext-api-patterns\u002Freferences\u002Fpatterns\u002Fworkspace-pipeline.md",{"path":70,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":74},"scripts\u002Ftl_sync_cycle.py","SCRIPT","脚本",10115,"https:\u002F\u002Fgithub.com\u002FPiagari\u002Fhelix\u002Fblob\u002Fmain\u002Fskills\u002Ftilelang\u002Ftilelang-npu-cann-ext-api-patterns\u002Fscripts\u002Ftl_sync_cycle.py",{"path":76,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":77,"sourceHtmlUrl":78},"scripts\u002Ftl_sync_hb.py",21340,"https:\u002F\u002Fgithub.com\u002FPiagari\u002Fhelix\u002Fblob\u002Fmain\u002Fskills\u002Ftilelang\u002Ftilelang-npu-cann-ext-api-patterns\u002Fscripts\u002Ftl_sync_hb.py",{"path":80,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":81,"sourceHtmlUrl":82},"scripts\u002Ftl_sync_lint.py",29196,"https:\u002F\u002Fgithub.com\u002FPiagari\u002Fhelix\u002Fblob\u002Fmain\u002Fskills\u002Ftilelang\u002Ftilelang-npu-cann-ext-api-patterns\u002Fscripts\u002Ftl_sync_lint.py",{"path":84,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":85,"sourceHtmlUrl":86},"scripts\u002Ftl_sync_mem.py",10397,"https:\u002F\u002Fgithub.com\u002FPiagari\u002Fhelix\u002Fblob\u002Fmain\u002Fskills\u002Ftilelang\u002Ftilelang-npu-cann-ext-api-patterns\u002Fscripts\u002Ftl_sync_mem.py",{"path":88,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":89,"sourceHtmlUrl":90},"scripts\u002Ftl_sync_prime.py",13935,"https:\u002F\u002Fgithub.com\u002FPiagari\u002Fhelix\u002Fblob\u002Fmain\u002Fskills\u002Ftilelang\u002Ftilelang-npu-cann-ext-api-patterns\u002Fscripts\u002Ftl_sync_prime.py",[92,99,106,113,120,125],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":18},"01M7985HE7EHEXX41M79MSZCMJ","triton-npu-repair-guide","Heuristic fixes for Ascend Triton compile\u002FJIT\u002Fkernel errors and numerical precision mismatches when editing or converting the operator. Does not replace ascend-npu-gen-test, ascend-npu-gen-bench, or harness specs.","https:\u002F\u002Fgithub.com\u002FPiagari\u002Fhelix\u002Fblob\u002Fmain\u002Fskills\u002Ftriton\u002Ftriton-npu-repair-guide\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":18},"01M7985DFYH5RRCDFTWAFYDFGA","triton-npu-optimize","Iteratively optimize a Triton Ascend NPU operator with correctness and performance gates. Use for operator optimization tasks that need repeated correctness validation, benchmark validation, multi-round experiment tracking, reusable optimization notes, and profiler-backed performance analysis when benchmark results need deeper explanation.","https:\u002F\u002Fgithub.com\u002FPiagari\u002Fhelix\u002Fblob\u002Fmain\u002Fskills\u002Ftriton\u002Ftriton-npu-optimize\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":18},"01M79858YFWE96X7ZA1BJRVDEX","triton-npu-optimize-knowledge","Generic reference-only optimize knowledge for pattern triage and evidence-backed symptom routing. This skill does not define optimize workflow or own round artifacts.","https:\u002F\u002Fgithub.com\u002FPiagari\u002Fhelix\u002Fblob\u002Fmain\u002Fskills\u002Ftriton\u002Ftriton-npu-optimize-knowledge\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":18},"01M79854BZPJ0XY5PTPQWTCY7Q","triton-npu-optimize-knowledge-v3","Generic reference-only optimize knowledge (v3 working copy) for pattern triage and evidence-backed symptom routing. This skill does not define optimize workflow or own round artifacts; prefer this tree for ongoing knowledge updates.","https:\u002F\u002Fgithub.com\u002FPiagari\u002Fhelix\u002Fblob\u002Fmain\u002Fskills\u002Ftriton\u002Ftriton-npu-optimize-knowledge-v3\u002FSKILL.md",[],[],{"skillNo":121,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":18},"01M79850QM6QZP8VP6ZRQBQHCT","https:\u002F\u002Fgithub.com\u002FPiagari\u002Fhelix\u002Fblob\u002Fmain\u002Fskills\u002Ftriton\u002Ftriton-npu-optimize-knowledge-v2\u002FSKILL.md",[],[],{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":18},"01M7984W6SW3BZM5EXGRJ1VBXY","triton-npu-convert-pytorch-operator","Convert one PyTorch operator into a Triton NPU-backed PyTorch operator, preserve the trailing input-helper block, and validate the converted output through standalone or differential testing.","https:\u002F\u002Fgithub.com\u002FPiagari\u002Fhelix\u002Fblob\u002Fmain\u002Fskills\u002Ftriton\u002Ftriton-npu-convert-pytorch-operator\u002FSKILL.md",[],[]]