dse-loop
它能做什么
这个技能对计算机体系结构和芯片设计工具的设计参数进行自动搜索。适合希望为某个程序找到最佳配置的工程师。
适用场景
- ✓当你希望扫描多组参数,找到最佳硬件配置的时候。
- ✓当你需要优化设计,直到达到可衡量的目标的时候。
- ✓当你希望自动搜索在设定的时间上限后停止的时候。
技能链接
https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep/blob/main/skills/dse-loop/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我为芯片仿真找到最佳设置,并在两小时后或达到目标时停止。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体运行程序,读取结果,选择下一组参数,然后重复。当可衡量的目标达成、达到迭代上限或时间预算用完时停止。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
DSE Loop: Autonomous Design Space Exploration
🔁 Do not wrap this skill in
/loop/CronCreate. It already loops internally until its objective is met or it times out. Unlike the verdict-bearing review/audit skills, its stop gate is an objective machine-checkable metric (Type-A), so its self-termination is safe same-model — the reason not to wrap it is scheduler duplication, not the verdict fence. Seeshared-references/external-cadence.md.
Autonomously explore a design space: run → analyze → pick next parameters → repeat, until the objective is met or timeout is reached. Designed for computer architecture and EDA problems.
Context: $ARGUMENTS
Safety Rules — READ FIRST
NEVER do any of the following:
sudoanythingrm -rf,rm -r, or any recursive deletionrmany file you did not create in this session- Overwrite existing source files without reading them first
git push,git reset --hard, or any destructive git operation- Kill processes you did not start
If a step requires any of the above, STOP and report to the user.
Constants (override via $ARGUMENTS)
| Constant | Default | Description |
|---|---|---|
TIMEOUT |
2h | Total wall-clock budget. Stop exploring after this. |
MAX_ITERATIONS |
50 | Hard cap on number of design points evaluated. |
PATIENCE |
10 | Stop early if no improvement for this many consecutive iterations. |
OBJECTIVE |
minimize | minimize or maximize the target metric. |
Override inline: /dse-loop "task desc — timeout: 4h, max_iterations: 100, patience: 15"
Typical Use Cases
| Problem | Program | Parameters | Objective |
|---|---|---|---|
| Microarch DSE | gem5 simulation | cache size, assoc, pipeline width, ROB size, branch predictor | maximize IPC or minimize area×delay |
| Synthesis tuning | yosys/DC script | optimization passes, target freq, effort level | minimize area at timing closure |
| RTL parameterization | verilator sim | data width, FIFO depth, pipeline stages, buffer sizes | meet throughput target at min area |
| Compiler flags | gcc/llvm build + benchmark | -O levels, unroll factor, vectorization, scheduling | minimize runtime or code size |
| Placement/routing | openroad/innovus | utilization, aspect ratio, layer config | minimize wirelength / timing |
| Formal verification | abc/sby | bound depth, engine, timeout per property | maximize coverage in time budget |
| Memory subsystem | cacti / ramulator | bank count, row buffer policy, scheduling | optimize bandwidth/energy |
Workflow
Phase 0: Parse Task & Setup
Parse $ARGUMENTS to extract:
- Program: what to run (command, script, or Makefile target)
- Parameter space: which knobs to tune and their ranges/options (may be incomplete — see step 2)
- Objective metric: what to optimize (and how to extract it from output)
- Constraints: hard limits that must not be violated (e.g., timing must close)
- Timeout: wall-clock budget
- Success criteria: when is the result "good enough" to stop early?
Infer missing parameter ranges — If the user provides parameter names but NOT ranges/options, you MUST infer them before exploring:
a. Read the source code — search for the parameter names in the codebase:
- Look for argparse/click definitions, config files, Makefile variables, module parameters,
#define,parameter(SystemVerilog),localparam, etc. - Extract defaults, types, and any comments hinting at valid values
b. Apply domain knowledge to set reasonable ranges:
Parameter type Inference strategy Cache/memory sizes Powers of 2, typically 1KB–16MB Associativity Powers of 2: 1, 2, 4, 8, 16 Pipeline width / issue width Small integers: 1, 2, 4, 8 Buffer/queue/FIFO depth Powers of 2: 4, 8, 16, 32, 64 Clock period / frequency Based on technology node; try ±50% from default Bound depth (BMC/formal) Geometric: 5, 10, 20, 50, 100 Timeout values Geometric: 10s, 30s, 60s, 120s, 300s Boolean/enum flags Enumerate all options found in source Continuous (learning rate, threshold) Log-scale sweep: 5 points spanning 2 orders of magnitude around default Integer counts (threads, cores) Linear: from 1 - Look for argparse/click definitions, config files, Makefile variables, module parameters,
常见问题
让它在我的电脑上运行安全吗?
技能有严格的安全规则。它不会删除自己未创建的文件,不会运行 sudo,也不会进行具有破坏性的 git 操作。
它会运行多久?
默认时间预算为两小时,同时也有设计点数量的上限。
我需要提供什么?
你需要提供程序、要更改的参数,以及技能可以衡量的明确目标。
详情
作者的原始描述
Autonomous design space exploration loop for computer architecture and EDA. Runs a program, analyzes results, tunes parameters, and iterates until objective is met or timeout. Use when user says \"DSE\", \"design space exploration\", \"sweep parameters\", \"optimize\", \"find best config\", or wants iterative parameter tuning.
热度
- GitHub 星标
- 18k
- 排名
- #10529
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
ablation-planner
18k帮你的智能体为论文规划消融实验,在主要结果看起来不错之后,选出审稿人很可能会要求的测试。
alphaxiv
18k让你的智能体借助 AlphaXiv 摘要快速阅读一篇研究论文,并以完整文本或 LaTeX 源文件作为备用,只需提供 arXiv 链接或编号。
analyze-results
18k帮你的智能体分析机器学习实验结果,将各次运行与基线进行比较,并把数字整理成清晰的发现和后续步骤。
arxiv
18k让你的智能体在 arXiv 上搜索学术论文、阅读论文详情,并把 PDF 保存到你的文库中,用于某个研究主题。