ack508/codex-cannbot-ascendc-kernel-direct/ascendc-env-check
Claude Code and agent skill by ack508/codex-cannbot-ascendc-kernel-direct
- community
Checking that the SKILL.md file is still in the repository.
Ascend C 算子开发环境检查技能。用于:(1) 通过 npu-smi 查询 NPU 设备信息(设备列表、状态、资源使用),(2) 检查 CANN 环境配置(CANN Toolkit、Ops、自定义算子包),(3) 验证开发依赖是否完整,(4) 运行时检测当前设备 NPU 架构。触发关键词:环境检查、NPU设备、npu-smi、CANN安装、设备查询、资源监控、检查CANN环境变量、NPU架构、npu arch。
Install
npx vskill@latest install ack508/codex-cannbot-ascendc-kernel-direct/ascendc-env-checkSKILL.md
Ascend C 环境检查
快速检查开发环境配置和 NPU 设备状态。
工作流程
NPU 设备检查
快速命令
脚本工具
详细命令参数见 npu_commands.md,npu-smi 不可用时的回退方案见 asys_commands.md
CANN 环境检查
检查项
| 检查项 | 说明 | 必需 | |
|---|---|---|---|
| ASCEND_HOME_PATH | CANN Toolkit 路径 | 是 | |
| CANN 版本 | 检测版本号及运行时依赖基线 | 建议确认 | |
| ASCEND_OPP_PATH | CANN Ops 路径 | 运行时必需 | |
| 自定义算子包 | op_api 库 | 运行自定义算子必需 | |
| CANN 工具 | msprof/cannsim | 可选 |
⚠️ 注意:官方环境变量为ASCEND_HOME_PATH,不是ASCEND_HOME。部分旧文档或示例代码可能使用ASCEND_HOME,这是错误用法。
详细环境配置见 env_config_guide.md,版本配套关系见其中「CANN 版本兼容性」章节
NPU 架构检测
通过 libascend_hal.so 查询当前设备 NPU 架构:
原理:调用 halGetChipInfo 获取芯片型号 → 读取 platform_config/{SocVersion}.ini 的 NpuArch 字段 → 输出结果。
依赖:Ascend driver 和 CANN toolkit。
诊断脚本
| 脚本 | 用途 | |
|---|---|---|
scripts/npu_info.sh | NPU 设备信息综合查询 | |
scripts/check_env.sh | CANN 环境配置检查 | |
scripts/get_npu_arch.py | 运行时检测当前设备 NPU 架构 |
也可直接调用 _npu_info.py Python 脚本获取结构化数据,支持 --json(完整 JSON 输出)、--list(设备 ID 列表)、--health(健康状态)等参数。
常见问题
- NPU 不可见:先执行
npu-smi info -m检查设备映射表,再排查驱动是否安装正确 - 算子运行失败:优先运行
check_env.sh检查环境配置是否完整,并检查关键环境变量(ASCEND_HOME_PATH、ASCEND_OPP_PATH)是否已正确设置 - 确认是否有进程占用 NPU:使用
npu-smi info -t usages -i <device_id>查看运行中的进程;注意空闲设备仍会有少量 HBM 被驱动占用(正常现象),不应误判为设备被占用
详细排查见 troubleshooting.md
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingreferences/cannbot/original-skills/ascendc-env-check/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ack508/codex-cannbot-ascendc-kernel-direct/ascendc-env-check)