▶ code 
▼ output
 ▶ uv-logs
 | 
Cell: combine | 4.28s
 | 
Raw
# /// script
# requires-python = ">=3.10"
# dependencies = [
#     "numpy",
#     "torch==2.8.0",
#     "kernels-benchmark-tools",
#     "matplotlib",
# ]
#
# [tool.uv.sources]
# kernels-benchmark-tools = { path = "../../../../../tools", editable = true }
# ///
from kernels_benchmark_tools.core.visuals import generate_combined_results
# Map display names to uvnote environment variables
cache_env_map = {
    "PyTorch LayerNorm": "UVNOTE_FILE_TORCH_LAYER_NORM_BENCHMARK",
    "HF Kernels LayerNorm": "UVNOTE_FILE_HF_KERNELS_LAYER_NORM_BENCHMARK",
}
# Generate combined results with visualization
generate_combined_results(
    cache_env_map=cache_env_map,
    output_filename="layer_norm.jsonl",
    svg_filename="latency.svg"
)
======================================================================
LOADING BENCHMARK DATA
======================================================================
✓ PyTorch LayerNorm             : /__w/kernels-benchmarks/kernels-benchmarks/benches/layer_norm/impls/.uvnote/cache/4403c31e9bef6e648597b4fcc9cfdc402678aaa4f90636b74325f12d334214a3
✓ HF Kernels LayerNorm          : /__w/kernels-benchmarks/kernels-benchmarks/benches/layer_norm/impls/.uvnote/cache/bd278151199f29b397d85857b87922edaa39a62623fb28e0465de47d6a3bac74
  ✓ Found PyTorch LayerNorm
     Path: /__w/kernels-benchmarks/kernels-benchmarks/benches/layer_norm/impls/.uvnote/cache/4403c31e9bef6e648597b4fcc9cfdc402678aaa4f90636b74325f12d334214a3/layer_norm.jsonl
  ✓ Found HF Kernels LayerNorm
     Path: /__w/kernels-benchmarks/kernels-benchmarks/benches/layer_norm/impls/.uvnote/cache/bd278151199f29b397d85857b87922edaa39a62623fb28e0465de47d6a3bac74/layer_norm.jsonl
======================================================================
Summary: 2 found, 0 skipped, 0 missing
======================================================================
COMBINED BENCHMARK SUMMARY
impl                     wl                  p50(ms)  ok
hf_kernels_layer_norm    LN_B16_S2048_D4096     0.84  True
hf_kernels_layer_norm    LN_B16_S2048_D8192     1.66  True
hf_kernels_layer_norm    LN_B16_S4096_D4096     1.66  True
hf_kernels_layer_norm    LN_B16_S4096_D8192     3.27  True
torch_layer_norm         LN_B16_S2048_D4096     0.82  True
torch_layer_norm         LN_B16_S2048_D8192     1.68  True
torch_layer_norm         LN_B16_S4096_D4096     1.61  True
torch_layer_norm         LN_B16_S4096_D8192     3.33  True
GENERATING COMBINED VISUALIZATION
Loaded 8 records
✓ Visualization saved as latency.svg
Saved latency.png
✓ Visualization saved as latency.svg
✓ SVG visualization ready!
ANALYSIS COMPLETE
Total implementations analyzed: 2
Implementations included:
  ✓ PyTorch LayerNorm
  ✓ HF Kernels LayerNorm
▶ UV Install Logs