You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Benchmark]: Add --gpu-filter to visualizer and simplify D2 guidelines
benchmarks_visualizer.py:
- Add `--gpu-filter` CLI flag to select a specific GPU when benchmark
data contains results from multiple devices; falls back to the most
recent device with a warning when omitted or unmatched.
- Extract `gpu_name_filter()` and `extra_config_filter()` as standalone
helpers; `load_data()` now applies filters in explicit order:
kernel/metric/mode → sweep-mode → GPU → extra config.
BENCHMARK_GUIDELINES.md:
- Add guideline: import baseline kernels from the test suite instead
of duplicating reference implementations in benchmark scripts.
- Remove the continuous hidden-size sweep variant (D2.1) and
`compute_hidden_size_sweep_config()` reference; D2 now covers only
the discrete model-config sweep.
Co-authored-by: Tcc0403 <76503978+Tcc0403@users.noreply.github.com>
Sweep model-related dimensions (e.g. hidden_size, or discrete model configs from `MODEL_REGISTRY`) with a **fixed token count**. Use `--bt` to set the token count.
98
-
99
-
D2 has two variants:
100
-
101
-
### 4.1 Continuous sweep (e.g. hidden_size)
102
-
103
-
Sweep a single model parameter (like hidden_size) in a continuous range with fixed BT.
104
-
105
-
**How to implement:**
106
-
107
-
1. Probe: measure peak memory at `(BT, model.hidden_size)`.
108
-
2.`config = compute_hidden_size_sweep_config(model, kernel_peak_bytes=peak_bytes, bt=BT)`. Returns `HiddenSizeSweepConfig` with `bt` and `max_hidden_size`.
109
-
3. Build `x_values` from `config.max_hidden_size` (e.g. `[1024 * i for i in range(1, 17) if 1024 * i <= config.max_hidden_size]`).
110
-
4. Build `extra_benchmark_configs` with `BT=config.bt`, `dtype=model.dtype`, etc.
111
-
5. Call `run_benchmarks(...)`.
112
-
113
-
**Reference**: `benchmark_dyt.py` — hidden_size sweep with `compute_hidden_size_sweep_config()`.
102
+
Sweep across discrete model configs from `MODEL_REGISTRY` with a **fixed token count**. Use `--bt` to set the token count.
114
103
115
-
### 4.2 Discrete model-config sweep
104
+
### 4.1 Discrete model-config sweep
116
105
117
106
Sweep across all `MODEL_REGISTRY` entries as discrete data points. Activated by `--sweep-mode model_config`.
0 commit comments