with one click
ascend-detectron2-install
在昇腾NPU容器中从源码安装detectron2。适用于实例分割、目标检测等模型的开发。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
在昇腾NPU容器中从源码安装detectron2。适用于实例分割、目标检测等模型的开发。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Kubernetes 集群健康检查与安全修复 — 诊断问题,用户确认后执行修复
排查并优化 Ascend C 算子性能。当用户开发、审查或优化 Ascend C kernel 算子时使用,或当用户提及 Ascend C 性能优化、算子优化、tiling、流水、搬运、 内存优化、NPU/昇腾等关键词时触发。
多语言安全代码审查 (Security Code Review)。对 Python、C++、Shell、Markdown 文件进行系统性安全漏洞检测与修复指导。覆盖 OWASP Top 10、CWE Top 25、CERT 安全编码标准。当用户提及以下内容时,务必使用此技能:安全审查、安全代码审查、security review、code review 中的安全检查、漏洞扫描、安全合规检查(CWE/CERT/OWASP)、编写安全代码、检查代码安全性、推理服务安全审计、多模态 Token 安全校验、JSON 嵌套深度攻击防护。即使用户没有明确说'安全审查',只要涉及代码安全性评估、漏洞检测、安全最佳实践,都应触发此技能。
昇腾NPU CANN Toolkit+Kernels+NNAL安装部署技能。支持从官网下载run包安装和从Docker镜像提取两种方式,覆盖驱动检查、包下载、安装、环境变量配置与验证全流程。当用户需要安装CANN全套组件或指定版本CANN到自定义路径时调用。
根据设计文档生成 AscendC 算子完整代码实现并完成框架适配。TRIGGER when: 设计文档已完成,需要生成 op_host/op_kernel 代码、注册到 PyTorch 框架、编译测试。关键词:代码生成、op_host、op_kernel、tiling、kernel、框架适配、算子注册。
完成AscendC算子设计 - 帮助用户完成算子的架构设计、接口定义和性能规划。当用户提到算子设计、算子开发、tiling策略、内存规划、AscendC kernel设计、两级tiling、核间切分、核内切分时,使用此skill。
| name | ascend-detectron2-install |
| description | 在昇腾NPU容器中从源码安装detectron2。适用于实例分割、目标检测等模型的开发。 |
| type | capability |
在昇腾NPU容器中从源码安装 detectron2(NPU兼容版本)
确保 mmcv 已安装:
python -c "import mmcv; print(mmcv.__version__)"
关键:在NPU环境下必须从源码安装,不能使用预编译的CUDA版本!
source /opt/conda/bin/activate <conda-env-name>
pip install git+https://github.com/facebookresearch/detectron2.git
python -c "import detectron2; print('detectron2 installed')"
NPU验证(关键步骤):
python -c "import site; print([p for p in site.getsitepackages() if 'cuda' in p.lower()])"
# 应输出空列表,确保没有安装CUDA版本
如果输出包含 cuda 相关路径,说明安装的是 CUDA 版本,需要卸载并重新从源码安装:
pip uninstall detectron2 -y
pip install git+https://github.com/facebookresearch/detectron2.git
向用户提问:
安装后必须验证: