analysis
Tune generated hls4ml designs with profiling, automatic precision inference, bit-exact propagation, resource knobs, FIFO depth, BramFactor, and optimization API guardrails.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- analysis
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Tune generated hls4ml designs with profiling, automatic precision inference, bit-exact propagation, resource knobs, FIFO depth, BramFactor, and optimization API guardrails.
- disable-model-invocation
- true
02 资源文件 6
- 参考文档references/optimization-api.md4.6 KB
- 参考文档references/precision-and-bit-exact.md5.7 KB
- 参考文档references/profiling.md4.2 KB
- 参考文档references/resource-tuning.md4.8 KB
- 参考文档references/troubleshooting.md6.5 KB
- 脚本scripts/inspect_precision_config.py6.0 KB
03 SKILL.md 正文
hls4ml analysis sub-skill
Use this sub-skill after a model has already been converted, or after a frontend sub-skill has produced an hls_config that needs tuning. It helps future agents profile numerical ranges, choose or validate precisions, reason about bit-exact conversion, tune resource/latency knobs, and avoid overclaiming hardware results.
Route by task
- Weights/activation profiling, layer-by-layer numerical comparison, or trace setup: read
references/profiling.md. Precision: auto,granularity='name', quantizer-derived precision, orbit_exact: readreferences/precision-and-bit-exact.md.ReuseFactor,Strategy, FIFO depth optimization,BramFactor, or resource/latency tradeoffs: readreferences/resource-tuning.md.- Hardware-aware pruning or weight-sharing workflows: read
references/optimization-api.mdbefore importing optimization APIs. - Unexpected accuracy/resource behavior or missing optional dependencies: read
references/troubleshooting.md. - Quick config inspection: run
scripts/inspect_precision_config.pyto print a tinygranularity='name'config and the paths where precision/reuse keys live.
Boundaries and guardrails
- Do not perform first-time model conversion work here; route conversion mechanics, frontend dependencies, serialization, and CLI conversion to the
frontendssub-skill. - Do not run or claim vendor synthesis/build results from this sub-skill. FIFO-depth optimization and resource reports require backend toolchain and co-simulation evidence; route execution and report parsing to
backends. - Do not author custom layers, parser handlers, optimizer passes, or plugins here; route extension authoring to
extensions. - Treat CPU
compile()/predict()parity as numerical evidence only. It is not synthesis evidence, resource utilization evidence, or FIFO-deadlock evidence. - The profiling extra was available during drafting; the model-optimization optional extra was not fully available because its pinned
ortoolsdependency did not resolve for Python 3.11. Seereferences/optimization-api.mdfor the safe runtime interpretation.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).