Aiter 上下文验证
- 作者仓库星标 0
- 作者仓库 skills-registry
Aiter Reflection
Overview
Optimize AMD MI300 GPU kernels for correctness and performance using the aiter workflow, then record each iteration to the kernel experiment database.
Workflow
1) Locate targets and understand tests
- Use the provided context to identify target kernel files, kernels, and their op tests.
- Run the op tests once to understand output format and verify correctness expectations. (Attention: Stucked background op test processes and lock files under jit folder may cause the op tests running failed; Op tests require JIT compiling, please be prepared to wait for a long time)
2) Build a benchmark shell script
- Come up with a new name for this iteration and create a folder logs/<new name>. Put the shell script under this folder
- Reuse the existing op_test python script
- Covers common shapes: 128, 256, 512, 1024, 2048, 4096 if applies
- Repeats each op test multiple times and reports the correctness and the average time consuming.
- Use at least 100 iterations per configuration for reliable results
- Include 10-20 warmup iterations to handle JIT compilation overhead
- Add torch.cuda.synchronize() after each kernel call
- Use fixed random seed for reproducibility
- Use high-precision timing (time.perf_counter())
- Implements a robust timeout to avoid hangs.
- Outputs structured timing per shape.
3) Establish a baseline
- Before testing: Check for background GPU processes that may interfere
- Use
rocm-smiorps aux | grep pythonto identify GPU tasks - Stop any unrelated GPU workloads
- Use
- Clear JIT compilation cache to ensure clean state
- Run the benchmark script using the
.venvPython environment - Save results under logs/<new name> folder with timestamp
4) Iterate on kernel optimization (one iteration)
- Read the kernel source, identify bottlenecks, and call
rocprof-computeat least once to deepen bottleneck analysis. - Use
kernel-exp-historyto review related optimization history and extract ideas. - Modify the kernel file to improve performance for multiple shapes allowed.
- Save the changes: (git diff > logs/<new name>/iter<N>_diff.patch)
- Reinstall aiter and clear cache:
python -m pip install -e . --no-build-isolation --no-deps --force-reinstallrm -f aiter/jit/*.so && rm -rf aiter/jit/build ~/.aiter
- Re-run the benchmark to measure the new performance.
- If results seem suspicious (unexpected regressions):
- Verify no background processes are running
- Re-test baseline with same methodology
- Check if JIT compilation overhead affected measurements
5) Record the iteration
Document the results:
- Save detailed analysis in logs/<name>/iter<N>_analysis.md
- Include performance comparison table
- Document any issues encountered (false regressions, test methodology problems)
Use
kernel-exp-historyto store in databaseVerify result quality: If showing unexpected regression, investigate before recording
Restore the repo code to the
mainbranch state after finishing the iteration
6) Repeat iterations
- Repeat step 4 for ten iterations (no stop), each time measuring and recording results.
<!-- tomevault:4.0:skill_md:2026-05-23 -->Source: AMD-AGI/Apex — distributed by TomeVault.
- 流狐分类
- 数据
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 需简单配置
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- 未声明
- 底层运行要求
- Python
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 检测到的网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
作者没有在当前 SKILL.md 中定义固定输出样例。 Optimize AMD MI300 GPU kernels for correctness and performance using the aiter workflow, then record each iteration to the kernel experiment database.
Workflow
Use the provided context to identify target kernel files, kernels, and their op tests. Run the op tests once to understand output format and verify correctness expectations. (Attention: Stucked background op test processes and lock files under jit folder may…
Come up with a new name for this iteration and create a folder logs/<new name>. Put the shell script under this folder Reuse the existing optest python script Covers common shapes: 128, 256, 512, 1024, 2048, 4096 if applies
Before testing: Check for background GPU processes that may interfere Use rocm-smi or ps aux | grep python to identify GPU tasks Stop any unrelated GPU workloads
Read the kernel source, identify bottlenecks, and call rocprof-compute at least once to deepen bottleneck analysis. Use kernel-exp-history to review related optimization history and extract ideas. Modify the kernel file to improve performance for multiple…
# Aiter Reflection
## Overview
Optimize AMD MI300 GPU kernels for correctness and performance using the aiter workflow, then record each iteration to the kernel experiment database.
## Workflow
### 1) Locate targets and understand tests
- Use the provided context to identify target kernel files, kernels, and their op tests.
- Run the op tests once to understand output format and verify correctness expectations. (Attention: Stucked background op test processes and lock files under jit folder may cause the op tests running failed; Op tests require JIT compiling, please be prepared to wait for a long time)
### 2) Build a benchmark shell script
- Come up with a new name for this iteration and create a folder logs/<new name>. Put the shell script under this folder
- Reuse the existing op_test python script
- Covers common shapes: 128, 256, 512, 1024, 2048, 4096 if applies
- Repeats each op test multiple times and reports the correctness and the average time consuming.
- Use at least 100 iterations per configuration for reliable results
- Include 10-20 warmup iterations to handle JIT compilation overhead
- Add torch.cuda.synchronize() after each kernel call
- Use fixed random seed for reproducibility
- Use high-precision timing (time.perf_counter())
- Implements a robust timeout to avoid hangs.
- Outputs structured timing per shape.
### 3) Establish a baseline
- **Before testing**: Check for background GPU processes that may interfere
- Use `rocm-smi` or `ps aux | grep python` to identify GPU tasks
- Stop any unrelated GPU workloads
- Clear JIT compilation cache to ensure clean state
- Run the benchmark script using the `.venv` Python environment
- Save results under logs/<new name> folder with timestamp
… 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> Overview → Workflow → 1) Locate targets and understand tests → 2) Build a benchmark shell script → 3) Establish a baseline → 4) Iterate on kernel optimization (one iteration)
要点 -> Before testing · If results seem suspicious · Document the results · Verify result quality
文件/命令 -> rocm-smi · ps aux | grep python · .venv · rocprof-compute · kernel-exp-history · python -m pip install -e . --no-build-isolation --no-deps --force-reinstall · rm -f aiter/jit/.so && rm -rf aiter/jit/build ~/.aiter · main
内容 SHA-256 -> 854255267c04
方法与流程
适用与边界
原文中的明确线索
rocm-smi、ps aux | grep python、.venv、rocprof-compute、kernel-exp-history、python -m pip install -e . --no-build-isolation --no-deps --force-reinstall、rm -f aiter/jit/.so && rm -rf aiter/jit/build ~/.aiter、main