[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M69AK8XERS6N06JB48AE1GYD":3,"skill-same:01M69AK8XERS6N06JB48AE1GYD":112},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":53,"linkOnly":54,"markdownContent":55,"markdownBody":56,"frontMatter":57,"refName":58,"commitSha":59,"skillDirectory":60,"forksCount":61,"repositoryHtmlUrl":62,"repositoryHomepageUrl":63,"ownerHtmlUrl":64,"ownerBlogUrl":65,"ownerDescription":66,"updatedAt":67,"install":68,"resources":81},"01M69AK8XERS6N06JB48AE1GYD","device-code-review","GPU 设备端代码审查","Review MSCCL++ CUDA\u002FHIP device-side changes for correctness, memory safety, races, synchronization, memory ordering, communication semantics, data types, portability, and concrete GPU performance issues. Use when reviewing pull requests or code that changes kernels, device functions, low-level GPU communication paths, or their host launch context.","审查 MSCCL++ CUDA\u002FHIP 设备端代码更改的正确性、内存安全、竞态、同步、内存排序、通信语义、数据类型、可移植性以及具体的 GPU 性能问题。在审查拉取请求，或审查修改了内核、设备函数、低级 GPU 通信路径及其主机启动上下文的代码时使用。","microsoft\u002Fmscclpp","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M69AK4C6XTBK35VKE88YP03W",572,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fmscclpp\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fdevice-code-review\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BR5V701HCN066VEP7H4812","代码仓库协作管理","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],"review","code review","device code review","code","device","when","for","kernels","correctness","types","host","hip","functions","use","synchronization","pull","issues","pull requests","launch","performance","memory safety","memory","2026-11-10 10:12:30",false,"---\nname: device-code-review\ndescription: Review MSCCL++ CUDA\u002FHIP device-side changes for correctness, memory safety, races, synchronization, memory ordering, communication semantics, data types, portability, and concrete GPU performance issues. Use when reviewing pull requests or code that changes kernels, device functions, low-level GPU communication paths, or their host launch context.\n---\n\n# Device Code Review\n\nPerform a read-only review of MSCCL++ device-side code. Review CUDA and HIP kernels, device functions, low-level communication paths, and the host launch code needed to establish their execution context. Do not modify code as part of the review.\n\n## Review Priorities\n\n1. **Correctness and memory safety**\n   - Check indexing, bounds, pointer arithmetic, alignment, aliasing, lifetime, and data layout assumptions.\n   - Trace ownership of every shared or remotely visible buffer, flag, counter, and queue entry.\n   - Identify races, deadlocks, hangs, early publication, duplicate publication, and stale-data hazards.\n\n2. **Thread and synchronization semantics**\n   - Map work across lanes, warps, warp groups, blocks, and cooperative grids.\n   - Verify that every barrier is reached convergently by the required participants.\n   - Check that warp-, block-, device-, and system-scoped operations use the appropriate scope.\n   - Verify release\u002Facquire ordering, fences, atomics, asynchronous copies, and completion waits.\n\n3. **Communication correctness**\n   - Confirm payload writes complete before readiness signals are published.\n   - Check local, IPC\u002Fpeer-mapped, and PortChannel paths independently.\n   - Verify single-writer contracts, remote offsets, source\u002Fdestination rank mapping, and epoch or buffer reuse.\n   - Inspect the relevant MSCCL++ primitive semantics before recommending lower-level replacements.\n\n4. **Performance**\n   - Look for load imbalance, poor coalescing, unnecessary serialization, excessive atomics, divergence, redundant synchronization, and avoidable global-memory traffic.\n   - Check launch geometry, occupancy constraints, register\u002Fshared-memory pressure, and warp utilization.\n   - Review asynchronous pipelines for overlap, dependency, and buffer-reuse hazards.\n   - Report performance concerns only when the mechanism and likely impact are concrete.\n\n5. **Structure and boundary design**\n   - Flag redundant structures that duplicate fields, mirror another type, or only forward state without defining a distinct abstraction.\n   - Require each structure to have one coherent responsibility, explicit ownership or borrowing semantics, and invariants that it can maintain within its own boundary.\n   - Check that host configuration, device views, transport state, synchronization state, and workspace metadata have clear, non-overlapping roles.\n   - Identify designs that require callers to coordinate hidden invariants across multiple structures.\n   - Prefer reusing, merging, or removing structures when they do not have a distinct semantic, ownership, or lifetime boundary.\n\n6. **Data types and conversions**\n   - Prefer the portable scalar types, vector types, `DataType`, `mscclpp::to`, `mscclpp::bit_cast`, and other helpers from `include\u002Fmscclpp\u002Fgpu_data_types.hpp` over raw CUDA\u002FHIP types or locally duplicated conversion code.\n   - Search `gpu_data_types.hpp` before recommending a new packed type, alias, bit representation, clipping operation, or numeric conversion.\n   - If a required reusable type or conversion helper is missing, recommend adding a documented CUDA\u002FHIP-compatible definition or function to `include\u002Fmscclpp\u002Fgpu_data_types.hpp` instead of an ad hoc helper in a kernel file.\n   - Keep unavoidable backend-native types and intrinsics isolated at hardware or ABI boundaries, and convert to MSCCL++ types at the boundary.\n\n7. **Portability and maintainability**\n   - Check CUDA\u002FHIP portability and architecture guards when the code is not intentionally backend-specific.\n   - Prefer existing MSCCL++ helpers and established patterns when they preserve the required low-level semantics.\n   - Flag confusing naming or duplication only when it increases correctness or maintenance risk.\n\n## Review Method\n\n1. Establish the kernel's purpose, launch configuration, input\u002Foutput layout, and synchronization contract.\n2. Inspect call sites, configuration code, related helpers, and producer\u002Fconsumer kernels before drawing conclusions.\n3. Trace representative execution paths, including empty work, partial warps, uneven expert\u002Ftoken distributions, local peers, remote peers, and buffer rollover.\n4. For each suspected issue, identify the exact failing interleaving, input, architecture, or configuration.\n5. Check whether existing barriers, atomics, or API guarantees already prevent the issue.\n6. Report only findings that are actionable and supported by the code.\n\n## Avoid Incorrect Review Heuristics\n\n- Do not reject raw kernels or device intrinsics merely because a higher-level API exists.\n- Do not flag a single-thread control loop when its cost is negligible or parallelization would add synchronization.\n- Do not recommend removing a barrier without proving that all dependent reads and writes remain ordered.\n- Do not assume CUDA behavior applies to HIP, or vice versa.\n- Do not enforce naming or style preferences that are not established by the repository.\n- Do not merge structures solely to reduce the type count; preserve types that enforce a meaningful invariant or boundary.\n- Do not replace a raw backend type when it is required by an intrinsic, assembly constraint, hardware format, or external ABI; isolate and document that boundary instead.\n- Do not produce speculative performance claims without explaining the bottleneck.\n\n## Output Format\n\nList findings in descending severity. For each finding provide:\n\n- `severity - file:line - concise title`\n- The concrete correctness or performance impact.\n- The execution scenario that triggers it.\n- A specific fix or safer design direction.\n\nIf there are no high-confidence findings, say so directly and note only material residual risks or validation gaps. Do not create empty category sections, repeat the code, or include style-only noise.\n\nAsk for clarification only when correctness depends on an undocumented external contract, target architecture, transport capability, or performance requirement that cannot be established from the repository.\n","# Device Code Review\n\nPerform a read-only review of MSCCL++ device-side code. Review CUDA and HIP kernels, device functions, low-level communication paths, and the host launch code needed to establish their execution context. Do not modify code as part of the review.\n\n## Review Priorities\n\n1. **Correctness and memory safety**\n   - Check indexing, bounds, pointer arithmetic, alignment, aliasing, lifetime, and data layout assumptions.\n   - Trace ownership of every shared or remotely visible buffer, flag, counter, and queue entry.\n   - Identify races, deadlocks, hangs, early publication, duplicate publication, and stale-data hazards.\n\n2. **Thread and synchronization semantics**\n   - Map work across lanes, warps, warp groups, blocks, and cooperative grids.\n   - Verify that every barrier is reached convergently by the required participants.\n   - Check that warp-, block-, device-, and system-scoped operations use the appropriate scope.\n   - Verify release\u002Facquire ordering, fences, atomics, asynchronous copies, and completion waits.\n\n3. **Communication correctness**\n   - Confirm payload writes complete before readiness signals are published.\n   - Check local, IPC\u002Fpeer-mapped, and PortChannel paths independently.\n   - Verify single-writer contracts, remote offsets, source\u002Fdestination rank mapping, and epoch or buffer reuse.\n   - Inspect the relevant MSCCL++ primitive semantics before recommending lower-level replacements.\n\n4. **Performance**\n   - Look for load imbalance, poor coalescing, unnecessary serialization, excessive atomics, divergence, redundant synchronization, and avoidable global-memory traffic.\n   - Check launch geometry, occupancy constraints, register\u002Fshared-memory pressure, and warp utilization.\n   - Review asynchronous pipelines for overlap, dependency, and buffer-reuse hazards.\n   - Report performance concerns only when the mechanism and likely impact are concrete.\n\n5. **Structure and boundary design**\n   - Flag redundant structures that duplicate fields, mirror another type, or only forward state without defining a distinct abstraction.\n   - Require each structure to have one coherent responsibility, explicit ownership or borrowing semantics, and invariants that it can maintain within its own boundary.\n   - Check that host configuration, device views, transport state, synchronization state, and workspace metadata have clear, non-overlapping roles.\n   - Identify designs that require callers to coordinate hidden invariants across multiple structures.\n   - Prefer reusing, merging, or removing structures when they do not have a distinct semantic, ownership, or lifetime boundary.\n\n6. **Data types and conversions**\n   - Prefer the portable scalar types, vector types, `DataType`, `mscclpp::to`, `mscclpp::bit_cast`, and other helpers from `include\u002Fmscclpp\u002Fgpu_data_types.hpp` over raw CUDA\u002FHIP types or locally duplicated conversion code.\n   - Search `gpu_data_types.hpp` before recommending a new packed type, alias, bit representation, clipping operation, or numeric conversion.\n   - If a required reusable type or conversion helper is missing, recommend adding a documented CUDA\u002FHIP-compatible definition or function to `include\u002Fmscclpp\u002Fgpu_data_types.hpp` instead of an ad hoc helper in a kernel file.\n   - Keep unavoidable backend-native types and intrinsics isolated at hardware or ABI boundaries, and convert to MSCCL++ types at the boundary.\n\n7. **Portability and maintainability**\n   - Check CUDA\u002FHIP portability and architecture guards when the code is not intentionally backend-specific.\n   - Prefer existing MSCCL++ helpers and established patterns when they preserve the required low-level semantics.\n   - Flag confusing naming or duplication only when it increases correctness or maintenance risk.\n\n## Review Method\n\n1. Establish the kernel's purpose, launch configuration, input\u002Foutput layout, and synchronization contract.\n2. Inspect call sites, configuration code, related helpers, and producer\u002Fconsumer kernels before drawing conclusions.\n3. Trace representative execution paths, including empty work, partial warps, uneven expert\u002Ftoken distributions, local peers, remote peers, and buffer rollover.\n4. For each suspected issue, identify the exact failing interleaving, input, architecture, or configuration.\n5. Check whether existing barriers, atomics, or API guarantees already prevent the issue.\n6. Report only findings that are actionable and supported by the code.\n\n## Avoid Incorrect Review Heuristics\n\n- Do not reject raw kernels or device intrinsics merely because a higher-level API exists.\n- Do not flag a single-thread control loop when its cost is negligible or parallelization would add synchronization.\n- Do not recommend removing a barrier without proving that all dependent reads and writes remain ordered.\n- Do not assume CUDA behavior applies to HIP, or vice versa.\n- Do not enforce naming or style preferences that are not established by the repository.\n- Do not merge structures solely to reduce the type count; preserve types that enforce a meaningful invariant or boundary.\n- Do not replace a raw backend type when it is required by an intrinsic, assembly constraint, hardware format, or external ABI; isolate and document that boundary instead.\n- Do not produce speculative performance claims without explaining the bottleneck.\n\n## Output Format\n\nList findings in descending severity. For each finding provide:\n\n- `severity - file:line - concise title`\n- The concrete correctness or performance impact.\n- The execution scenario that triggers it.\n- A specific fix or safer design direction.\n\nIf there are no high-confidence findings, say so directly and note only material residual risks or validation gaps. Do not create empty category sections, repeat the code, or include style-only noise.\n\nAsk for clarification only when correctness depends on an undocumented external contract, target architecture, transport capability, or performance requirement that cannot be established from the repository.\n",{"name":5,"description":7},"main","51068a9ca87fc7e2bcf3b701523c1112d71fd9a7",".github\u002Fskills\u002Fdevice-code-review",114,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fmscclpp","https:\u002F\u002Fmicrosoft.github.io\u002Fmscclpp\u002F","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-14 23:23:47",{"source":9,"skillName":5,"commands":69,"prompt":79,"zipAvailable":80},[70,73,76],{"tool":71,"command":72},"npx","npx skills add microsoft\u002Fmscclpp --skill device-code-review",{"tool":74,"command":75},"bunx","bunx skills add microsoft\u002Fmscclpp --skill device-code-review",{"tool":77,"command":78},"pnpm","pnpm dlx skills add microsoft\u002Fmscclpp --skill device-code-review","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fmscclpp\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fdevice-code-review\u002FSKILL.md",true,[82,88,92,98,104,108],{"path":83,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":86,"sourceHtmlUrl":87},"anthropic-best-practices.md","REFERENCE","参考文档",45825,"https:\u002F\u002Fgithub.com\u002Fshengdabai\u002FTony-Claude-Code-Skills\u002Fblob\u002Fmain\u002Fskills\u002F_collections\u002Frghamilton3-dotfiles\u002Fdot_config\u002Fopencode\u002Fsuperpowers\u002Fskills\u002Fwriting-skills\u002Fanthropic-best-practices.md",{"path":89,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":90,"sourceHtmlUrl":91},"examples\u002FCLAUDE_MD_TESTING.md",5423,"https:\u002F\u002Fgithub.com\u002Fshengdabai\u002FTony-Claude-Code-Skills\u002Fblob\u002Fmain\u002Fskills\u002F_collections\u002Frghamilton3-dotfiles\u002Fdot_config\u002Fopencode\u002Fsuperpowers\u002Fskills\u002Fwriting-skills\u002Fexamples\u002FCLAUDE_MD_TESTING.md",{"path":93,"resourceType":94,"resourceTypeDesc":95,"sizeBytes":96,"sourceHtmlUrl":97},"executable_render-graphs.js","SCRIPT","脚本",4857,"https:\u002F\u002Fgithub.com\u002Fshengdabai\u002FTony-Claude-Code-Skills\u002Fblob\u002Fmain\u002Fskills\u002F_collections\u002Frghamilton3-dotfiles\u002Fdot_config\u002Fopencode\u002Fsuperpowers\u002Fskills\u002Fwriting-skills\u002Fexecutable_render-graphs.js",{"path":99,"resourceType":100,"resourceTypeDesc":101,"sizeBytes":102,"sourceHtmlUrl":103},"graphviz-conventions.dot","OTHER","其他",5970,"https:\u002F\u002Fgithub.com\u002Fshengdabai\u002FTony-Claude-Code-Skills\u002Fblob\u002Fmain\u002Fskills\u002F_collections\u002Frghamilton3-dotfiles\u002Fdot_config\u002Fopencode\u002Fsuperpowers\u002Fskills\u002Fwriting-skills\u002Fgraphviz-conventions.dot",{"path":105,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":106,"sourceHtmlUrl":107},"persuasion-principles.md",5908,"https:\u002F\u002Fgithub.com\u002Fshengdabai\u002FTony-Claude-Code-Skills\u002Fblob\u002Fmain\u002Fskills\u002F_collections\u002Frghamilton3-dotfiles\u002Fdot_config\u002Fopencode\u002Fsuperpowers\u002Fskills\u002Fwriting-skills\u002Fpersuasion-principles.md",{"path":109,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":110,"sourceHtmlUrl":111},"testing-skills-with-subagents.md",12557,"https:\u002F\u002Fgithub.com\u002Fshengdabai\u002FTony-Claude-Code-Skills\u002Fblob\u002Fmain\u002Fskills\u002F_collections\u002Frghamilton3-dotfiles\u002Fdot_config\u002Fopencode\u002Fsuperpowers\u002Fskills\u002Fwriting-skills\u002Ftesting-skills-with-subagents.md",[]]