[CI][RFC] Replace black-jupyter with ruff-format (#37210)
Co-authored-by: Alison Shao <a.shao@wustl.edu>
This commit is contained in:
co-authored by
Alison Shao
parent
2641e427be
commit
28262c20df
@@ -470,9 +470,9 @@ def _tune_shrink(
|
||||
device: torch.device,
|
||||
) -> tuple:
|
||||
"""Tune shrink kernel for one layer type. Returns (best_configs, results)."""
|
||||
print(f"\n{'='*80}")
|
||||
print(f"\n{'=' * 80}")
|
||||
print(f"Tuning SHRINK — {label} (K={K}, N={N}, slices={num_slices})")
|
||||
print(f"{'='*80}")
|
||||
print(f"{'=' * 80}")
|
||||
|
||||
search = get_shrink_search_space()
|
||||
print(f"Search space: {len(search)} configs")
|
||||
@@ -508,7 +508,7 @@ def _tune_shrink(
|
||||
best_config = config
|
||||
if (i + 1) % 20 == 0:
|
||||
print(
|
||||
f" chunk={chunk_size}: {i+1}/{len(search)} tested, best={best_time:.3f}ms"
|
||||
f" chunk={chunk_size}: {i + 1}/{len(search)} tested, best={best_time:.3f}ms"
|
||||
)
|
||||
|
||||
best_configs[chunk_size] = sort_config(best_config)
|
||||
@@ -533,9 +533,9 @@ def _tune_expand(
|
||||
device: torch.device,
|
||||
) -> tuple:
|
||||
"""Tune expand kernel for one layer type. Returns (best_configs, results)."""
|
||||
print(f"\n{'='*80}")
|
||||
print(f"\n{'=' * 80}")
|
||||
print(f"Tuning EXPAND — {label} (output_dim={output_dim}, slices={num_slices})")
|
||||
print(f"{'='*80}")
|
||||
print(f"{'=' * 80}")
|
||||
|
||||
search = get_expand_search_space()
|
||||
print(f"Search space: {len(search)} configs")
|
||||
@@ -584,7 +584,7 @@ def _tune_expand(
|
||||
best_config = config
|
||||
if (i + 1) % 50 == 0:
|
||||
print(
|
||||
f" chunk={chunk_size}: {i+1}/{len(search)} tested, best={best_time:.3f}ms"
|
||||
f" chunk={chunk_size}: {i + 1}/{len(search)} tested, best={best_time:.3f}ms"
|
||||
)
|
||||
|
||||
best_configs[chunk_size] = sort_config(best_config)
|
||||
@@ -673,9 +673,9 @@ def main(args: argparse.Namespace):
|
||||
)
|
||||
|
||||
# --- Summary ---
|
||||
print(f"\n{'='*80}")
|
||||
print(f"\n{'=' * 80}")
|
||||
print(f"SUMMARY")
|
||||
print(f"{'='*80}")
|
||||
print(f"{'=' * 80}")
|
||||
print(
|
||||
f"\n{'layer':<10} {'kernel':<8} {'K/dim':>6} {'chunk':>6}"
|
||||
f" {'baseline':>10} {'tuned':>10} {'speedup':>8} config"
|
||||
|
||||
Reference in New Issue
Block a user