一键导入
dftracer-compute-optimization
Compute-component bottleneck-to-optimization mappings, papers, and L1/L2/L3 strategies for the dftracer optimization pipeline
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Compute-component bottleneck-to-optimization mappings, papers, and L1/L2/L3 strategies for the dftracer optimization pipeline
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Communication-component (MPI/collective/network) bottleneck-to-optimization mappings, papers, and L1/L2/L3 strategies for the dftracer optimization pipeline
Key literature, bottleneck-to-optimization mappings, and strategies for the dftracer I/O optimization pipeline
Memory-component bottleneck-to-optimization mappings, papers, and L1/L2/L3 strategies for the dftracer optimization pipeline
VPIC-Kokkos-specific knowledge: build/annotation quirks, the two-stage deck-compile pattern, deck sizing for smoke vs validation runs, and the measured MPI-communication-bound diagnosis on Tuolumne. Load this skill whenever working with vpic-kokkos (github.com/lanl/vpic-kokkos).
Install and build dftracer into the session using the MCP install tool and record tool pitfalls early.
Diagnose traces and convert symptoms into actionable bottlenecks with MCP tools.
| name | dftracer-compute-optimization |
| description | Compute-component bottleneck-to-optimization mappings, papers, and L1/L2/L3 strategies for the dftracer optimization pipeline |
Cross-references: [[dftracer-io-optimization]] [[dftracer-communication-optimization]] [[dftracer-memory-optimization]] [[dftracer-optimization-kb]]
This skill is the compute-component sibling of dftracer-io-optimization. Same rules apply
(citation-backed, never "do less", never change the app's actual computation/algorithm as a
"pattern swap" unless correctness is verified byte-for-byte) — this file adds the
compute-specific catalog: the metric key used by the MCP optimization tools is compute_time
(see _L1_STRATEGIES/_L2_STRATEGIES/_L3_STRATEGIES["compute_time"] in
mcp_tools/tools/optimizations/strategies.py).
Every row in the resulting opt_proposal_table MUST carry app_impact_pct (% of current application wall time, measured or bounded-estimate) and system_impact_pct (throughput/bandwidth/utilization effect, 0 if not measured/applicable) — columns: #, Strategy, Description of Optimization, App Impact, System Impact, Weighted Score (50/50 weighted, auto-sorted descending by the tool). Never omit these fields.
Never stop at the first compute fix that helps. Every compute-optimization pass walks this full checklist and records a verdict for EACH category (Applied & measured / Applicable, not measured / Not applicable — with reason), exactly like the I/O checklist:
-O3), LTO, target-specific ISA flags
(-march=native/-mcpu=), math-library thread count (OMP_NUM_THREADS, MKL_NUM_THREADS,
ROCBLAS_LAYER) matched to physical core/CU count (never oversubscribed).static/dynamic/guided), thread
pinning/affinity, GPU stream concurrency.Per category: run the literature search (arXiv/Semantic Scholar/rag_search/opt_kb_lookup)
before marking "not applicable" for lack of a technique. Never silently omit a category.
Do not propose swapping an algorithm for a numerically-different one, reducing solver precision/tolerance, skipping compute steps, or reducing epoch/iteration counts just because the alternative measured faster. That is doing less or changing correctness, not optimizing the system's ability to run the SAME computation faster. Kernel/library swaps and vectorization are safe ONLY when output is verified byte-identical (or within the algorithm's own documented numerical tolerance) before/after.
OMP_NUM_THREADS/MKL_NUM_THREADS set to the physical
core/CU count, not oversubscribed (see strategies.py L2 compute_time entry).
Confirmed high-value on vpic-kokkos (2026-07-14, Tuolumne): a Kokkos-OpenMP build's
run script never set OMP_NUM_THREADS/OMP_PROC_BIND/OMP_PLACES, silently running
1 thread/rank with 6 idle cores/rank (96 cores/node ÷ 16 ranks/node). Adding
-c<cores_per_task> to the launcher (flux run -c6 ...) plus
OMP_NUM_THREADS=6 OMP_PROC_BIND=spread OMP_PLACES=cores — a pure runtime env
change, no rebuild — cut job wall time 41% (210.2s → 124.0s) at 128 ranks/8 nodes.
Don't trust an app's own internal thread-count print to confirm this: VPIC prints
a legacy n_pipeline counter unrelated to the Kokkos execution space and stayed at
1 even as wall time dropped — verify via measured wall-clock time, not an
app-reported thread count. See workload-vpic-kokkos.cpupower frequency-set -g performance,
rocm-smi --setperflevel high (see strategies.py L3 compute_time entry). Sudo-gated;
check tunability before proposing.numactl --cpunodebind=<n>/hwloc-bind, shared dimension with
the memory skill.| Metric | Optimization goal |
|---|---|
compute_time | Reduce wall-clock time spent in compute kernels without changing output |
cpu_bound / gpu_util / flops | Classify as compute-category for canonical ordering (I/O -> communication -> memory -> compute) |
Compute is optimized LAST in the canonical I/O -> communication -> memory -> compute order
(see _category_sort_key in strategies.py) — a compute-bound kernel tuned before the I/O or
communication bottleneck is fixed is optimizing the wrong stage of the pipeline first.