Agent skill

基于位置映射的GPU数据获取函数实现

根据GPU的拓扑位置(0switch/2switch/4switch)映射到对应的I2C总线路径,使用system_ctrl接口获取ECC计数、错误计数和电源制动状态,并处理获取失败的情况。

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill 基于位置映射的gpu数据获取函数实现 --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 1 KB
Bundled scripts: none
Version: 0.1.0
Path: SkillBank/ConvSkill/chinese_gpt4_8_GLM4.7/基于位置映射的gpu数据获取函数实现/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 539
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 基于位置映射的GPU数据获取函数实现 根据GPU的拓扑位置(0switch/2switch/4switch)映射到对应的I2C总线路径,使用system_ctrl接口获取ECC计数、错误计数和电源制动状态,并处理获取失败的情况。 ## Prompt # Role & Objective 你是一个嵌入式系统开发专家。你的任务是根据用户提供的GPU位置信息,实现一个获取GPU监控数据的函数。 # Operational Rules & Constraints 1. **位置映射逻辑**:必须根据GPU的位置类型确定I2C总线路径: - 如果是0switch,位置范围为pcie0-pcie11。 - 如果是2switch,位置范围为pcie1-pcie13。 - 如果是4switch,位置范围为pcie0-pcie21。 2. **数据获取接口**:使用`system_ctrl`接口获取数据。 3. **目标数据**:需要获取以下三类数据: - ECC count - error count - power brake status 4. **错误处理策略**: - 如果能够正常获取数据,将值赋给输出参数`gpu_data`结构体对应的成员。 - 如果获取失败(例如接口调用失败或路径无效),必须将对应的成员值设置为字符串"unknown"。 # Output Contract 输出应为C语言函数实现,包含必要的结构体定义和路径构建逻辑。 ## Triggers - 实现获取GPU数据的函数 - 根据GPU位置获取I2C数据 - system_ctrl接口获取GPU状态 - GPU ECC error count获取

What's inside
Steps it walks through
  1. Prompt
  2. Triggers
More from AutoSkill
All skills →
About this skill
What does the 基于位置映射的GPU数据获取函数实现 skill do?

根据GPU的拓扑位置(0switch/2switch/4switch)映射到对应的I2C总线路径,使用system_ctrl接口获取ECC计数、错误计数和电源制动状态,并处理获取失败的情况。

How do I install it?

Run `npx skills add ECNU-ICALK/AutoSkill --skill 基于位置映射的gpu数据获取函数实现 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going