一键导入
mojo-simd-optimize
Apply SIMD optimizations to Mojo code for parallel computation. Use when optimizing performance-critical tensor and array operations.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Apply SIMD optimizations to Mojo code for parallel computation. Use when optimizing performance-critical tensor and array operations.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Run section orchestrators to coordinate multi-component workflows. Use when starting work on a section.
Validate agent YAML frontmatter and configuration. Use before committing agent changes or in CI.
Reply to PR review comments using the correct GitHub API endpoint. Use when responding to inline code review feedback (not gh pr comment).
Run Mojo tests using mojo test command. Use when executing tests or verifying test coverage.
Track implementation progress against plan. Use to monitor component delivery and identify blockers.
Check agent configuration coverage across hierarchy levels and phases. Use to ensure complete agent system coverage.
| name | mojo-simd-optimize |
| description | Apply SIMD optimizations to Mojo code for parallel computation. Use when optimizing performance-critical tensor and array operations. |
| mcp_fallback | none |
| category | mojo |
Parallelize tensor and array operations using SIMD.
from sys.info import simdwidthof
comptime width = simdwidthof[DType.float32]()
# SIMD vector add
for i in range(0, size, width):
result.store(i, a.load[width](i) + b.load[width](i))
simdwidthof[dtype]()width elements per iterationalias for compile-time SIMD width constants| Error | Cause | Solution |
|---|---|---|
Out of bounds | Remainder not handled | Add scalar remainder loop |
No speedup | Wrong SIMD width | Use simdwidthof[dtype]() |
Compilation fails | Type mismatch | Check load/store types match |
Segfault | Misaligned access | Ensure stride is correct |
.claude/shared/mojo-guidelines.md - SIMD patterns section