drbh HF Staff commited on
Commit
0c5e7b7
·
verified ·
1 Parent(s): 1c22380

Upload folder using huggingface_hub

Browse files
Files changed (36) hide show
  1. activation/impls/artifacts/benchmark/activation.jsonl +9 -9
  2. activation/impls/cells/benchmark.py +13 -7
  3. activation/impls/hf_kernels_swiglu.html +0 -0
  4. activation/impls/torch_swiglu.html +0 -0
  5. activation/results/artifacts/combine/latency.svg +2 -2
  6. activation/results/combined_results.html +0 -0
  7. causal_conv1d/impls/artifacts/benchmark/causal_conv1d.jsonl +24 -24
  8. causal_conv1d/impls/cells/benchmark.py +9 -18
  9. causal_conv1d/impls/hf_kernels_causal_conv1d.html +0 -0
  10. causal_conv1d/impls/torch_causal_conv1d.html +0 -0
  11. causal_conv1d/results/artifacts/combine/latency.svg +2 -2
  12. causal_conv1d/results/combined_results.html +0 -0
  13. flash_attn/impls/artifacts/benchmark/attention.jsonl +6 -6
  14. flash_attn/impls/cells/benchmark.py +10 -10
  15. flash_attn/impls/flash_attention.html +0 -0
  16. flash_attn/impls/hf_kernels_flash_attn.html +0 -0
  17. flash_attn/impls/hf_kernels_flash_attn3.html +0 -0
  18. flash_attn/impls/mem_efficient_attention.html +0 -0
  19. flash_attn/impls/sage_attention.html +1551 -1323
  20. flash_attn/impls/xformers.html +0 -0
  21. flash_attn/results/artifacts/combine/latency.svg +2 -2
  22. flash_attn/results/combined_results.html +0 -0
  23. index.html +1690 -1362
  24. layer_norm/impls/artifacts/benchmark/layer_norm.jsonl +4 -4
  25. layer_norm/impls/cells/benchmark.py +28 -5
  26. layer_norm/impls/hf_kernels_layer_norm.html +0 -0
  27. layer_norm/impls/torch_layer_norm.html +0 -0
  28. layer_norm/results/artifacts/combine/latency.svg +2 -2
  29. layer_norm/results/combined_results.html +0 -0
  30. rotary/impls/artifacts/benchmark/rotary.jsonl +24 -24
  31. rotary/impls/cells/benchmark.py +21 -12
  32. rotary/impls/hf_kernels_rotary.html +0 -0
  33. rotary/impls/torch_rotary.html +0 -0
  34. rotary/index.html +1541 -1314
  35. rotary/results/artifacts/combine/latency.svg +2 -2
  36. rotary/results/combined_results.html +0 -0
activation/impls/artifacts/benchmark/activation.jsonl CHANGED
@@ -1,9 +1,9 @@
1
- {"ts": "2025-10-29T15:50:51Z", "run": "e54f22d2514045f0929111d26589784b", "impl": "torch_eager", "tags": {"family": "hf-kernels", "backend": "eager"}, "wl": {"name": "cuda_T128_D768", "num_tokens": 128, "hidden_dim": 768, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.040432000048440386, "p50": 0.04165099994679622, "p90": 0.0417410000181917, "mean": 0.04172699999571705, "iqr": 0.0011400000516914588, "raw_times": [0.0417410000181917, 0.04420999999865671, 0.040432000048440386, 0.04165099994679622, 0.04060099996650024], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.046430999987023824, "peak_bytes": 1966080, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.02, "atol": 0.02, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "swiglu_fp32"}, "err": null}
2
- {"ts": "2025-10-29T15:50:51Z", "run": "e54f22d2514045f0929111d26589784b", "impl": "torch_eager", "tags": {"family": "hf-kernels", "backend": "eager"}, "wl": {"name": "cuda_T128_D1024", "num_tokens": 128, "hidden_dim": 1024, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.04963099996757592, "p50": 0.05265099997586731, "p90": 0.053851000018312334, "mean": 0.054568999985349365, "iqr": 0.0016500000583619112, "raw_times": [0.04963099996757592, 0.05265099997586731, 0.05220099995995042, 0.053851000018312334, 0.06451100000504084], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.05472100002634761, "peak_bytes": 2621440, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.02, "atol": 0.02, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "swiglu_fp32"}, "err": null}
3
- {"ts": "2025-10-29T15:50:51Z", "run": "e54f22d2514045f0929111d26589784b", "impl": "torch_eager", "tags": {"family": "hf-kernels", "backend": "eager"}, "wl": {"name": "cuda_T128_D2048", "num_tokens": 128, "hidden_dim": 2048, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.04966099999137441, "p50": 0.05102099999021448, "p90": 0.05103099999814731, "mean": 0.05151719999503257, "iqr": 0.0007099999947968172, "raw_times": [0.04966099999137441, 0.05555199999207616, 0.05032100000335049, 0.05102099999021448, 0.05103099999814731], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.05423200002496742, "peak_bytes": 5242880, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.02, "atol": 0.02, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "swiglu_fp32"}, "err": null}
4
- {"ts": "2025-10-29T15:50:51Z", "run": "e54f22d2514045f0929111d26589784b", "impl": "torch_eager", "tags": {"family": "hf-kernels", "backend": "eager"}, "wl": {"name": "cuda_T256_D768", "num_tokens": 256, "hidden_dim": 768, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.04886099998202553, "p50": 0.05024199998615586, "p90": 0.0503609999782384, "mean": 0.05005519998348973, "iqr": 0.0007900000014160469, "raw_times": [0.04886099998202553, 0.04957099997682235, 0.051240999994206504, 0.05024199998615586, 0.0503609999782384], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.053871000034177996, "peak_bytes": 3932160, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.02, "atol": 0.02, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "swiglu_fp32"}, "err": null}
5
- {"ts": "2025-10-29T15:50:51Z", "run": "e54f22d2514045f0929111d26589784b", "impl": "torch_eager", "tags": {"family": "hf-kernels", "backend": "eager"}, "wl": {"name": "cuda_T256_D1024", "num_tokens": 256, "hidden_dim": 1024, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.04914099997677113, "p50": 0.04985100002841136, "p90": 0.05049099996767836, "mean": 0.04988699998875745, "iqr": 0.0013399999829744047, "raw_times": [0.04915099998470396, 0.05080099998622245, 0.04985100002841136, 0.04914099997677113, 0.05049099996767836], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.053920999960155314, "peak_bytes": 5242880, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.02, "atol": 0.02, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "swiglu_fp32"}, "err": null}
6
- {"ts": "2025-10-29T15:50:51Z", "run": "e54f22d2514045f0929111d26589784b", "impl": "torch_eager", "tags": {"family": "hf-kernels", "backend": "eager"}, "wl": {"name": "cuda_T256_D2048", "num_tokens": 256, "hidden_dim": 2048, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.04656100003330721, "p50": 0.04960100000062084, "p90": 0.05333199999313365, "mean": 0.05254540001260466, "iqr": 0.0039209999727063405, "raw_times": [0.04656100003330721, 0.05333199999313365, 0.04960100000062084, 0.04941100002042731, 0.06382200001553429], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.051971000004868984, "peak_bytes": 10485760, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.02, "atol": 0.02, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "swiglu_fp32"}, "err": null}
7
- {"ts": "2025-10-29T15:50:51Z", "run": "e54f22d2514045f0929111d26589784b", "impl": "torch_eager", "tags": {"family": "hf-kernels", "backend": "eager"}, "wl": {"name": "cuda_T512_D768", "num_tokens": 512, "hidden_dim": 768, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.04889099994898061, "p50": 0.050290999979552, "p90": 0.05037099998617123, "mean": 0.05047499996635452, "iqr": 0.0002600000357233512, "raw_times": [0.04889099994898061, 0.052710999966620875, 0.050110999950447876, 0.05037099998617123, 0.050290999979552], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.05234200000359124, "peak_bytes": 7864320, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.02, "atol": 0.02, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "swiglu_fp32"}, "err": null}
8
- {"ts": "2025-10-29T15:50:51Z", "run": "e54f22d2514045f0929111d26589784b", "impl": "torch_eager", "tags": {"family": "hf-kernels", "backend": "eager"}, "wl": {"name": "cuda_T512_D1024", "num_tokens": 512, "hidden_dim": 1024, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.0489209999727791, "p50": 0.04973099999006081, "p90": 0.05078099997035679, "mean": 0.051391199974659685, "iqr": 0.0012099999935344385, "raw_times": [0.0489209999727791, 0.05078099997035679, 0.04973099999006081, 0.04957099997682235, 0.05795199996327938], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.0512020000087432, "peak_bytes": 10485760, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.02, "atol": 0.02, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "swiglu_fp32"}, "err": null}
9
- {"ts": "2025-10-29T15:50:51Z", "run": "e54f22d2514045f0929111d26589784b", "impl": "torch_eager", "tags": {"family": "hf-kernels", "backend": "eager"}, "wl": {"name": "cuda_T512_D2048", "num_tokens": 512, "hidden_dim": 2048, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.04852099999652637, "p50": 0.04917100000056962, "p90": 0.049370999988695985, "mean": 0.049055200008751854, "iqr": 0.0007299999538190605, "raw_times": [0.04852099999652637, 0.048641000034876924, 0.04917100000056962, 0.049370999988695985, 0.04957200002309037], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.05309099998385136, "peak_bytes": 20971520, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.02, "atol": 0.02, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "swiglu_fp32"}, "err": null}
 
1
+ {"ts": "2025-10-30T15:52:35Z", "run": "37230f1ce31641f2b6ebd7aba7f793c9", "impl": "hf_kernels_swiglu", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_T128_D768", "num_tokens": 128, "hidden_dim": 768, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.022969999974975508, "p50": 0.023499999997511622, "p90": 0.023961000010785938, "mean": 0.02361460000201987, "iqr": 0.0009899999895424116, "raw_times": [0.022971000021243526, 0.022969999974975508, 0.023961000010785938, 0.023499999997511622, 0.024671000005582755], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.03073999999969601, "peak_bytes": 1966080, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.02, "atol": 0.02, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "swiglu_fp32"}, "err": null}
2
+ {"ts": "2025-10-30T15:52:35Z", "run": "37230f1ce31641f2b6ebd7aba7f793c9", "impl": "hf_kernels_swiglu", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_T128_D1024", "num_tokens": 128, "hidden_dim": 1024, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.027540000019143918, "p50": 0.029130999962490023, "p90": 0.03002100004323438, "mean": 0.029014800009008468, "iqr": 0.0016900000332498166, "raw_times": [0.027540000019143918, 0.030051000010189455, 0.03002100004323438, 0.029130999962490023, 0.028331000009984564], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.03343999998151048, "peak_bytes": 2621440, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.02, "atol": 0.02, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "swiglu_fp32"}, "err": null}
3
+ {"ts": "2025-10-30T15:52:35Z", "run": "37230f1ce31641f2b6ebd7aba7f793c9", "impl": "hf_kernels_swiglu", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_T128_D2048", "num_tokens": 128, "hidden_dim": 2048, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.02829999999676147, "p50": 0.029119999965132592, "p90": 0.03051000004461457, "mean": 0.029939999990347133, "iqr": 0.0019500000689731678, "raw_times": [0.02829999999676147, 0.03051000004461457, 0.033209999969585624, 0.029119999965132592, 0.028559999975641404], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.031761000002461515, "peak_bytes": 5242880, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.02, "atol": 0.02, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "swiglu_fp32"}, "err": null}
4
+ {"ts": "2025-10-30T15:52:35Z", "run": "37230f1ce31641f2b6ebd7aba7f793c9", "impl": "hf_kernels_swiglu", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_T256_D768", "num_tokens": 256, "hidden_dim": 768, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.027531000000635686, "p50": 0.028170999996746104, "p90": 0.028501000031155854, "mean": 0.028293000002577173, "iqr": 0.0008900000239009387, "raw_times": [0.027611000007254916, 0.028170999996746104, 0.029650999977093306, 0.027531000000635686, 0.028501000031155854], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.03130000004603062, "peak_bytes": 3932160, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.02, "atol": 0.02, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "swiglu_fp32"}, "err": null}
5
+ {"ts": "2025-10-30T15:52:35Z", "run": "37230f1ce31641f2b6ebd7aba7f793c9", "impl": "hf_kernels_swiglu", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_T256_D1024", "num_tokens": 256, "hidden_dim": 1024, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.02755000002707675, "p50": 0.02861000001530556, "p90": 0.028831000008722185, "mean": 0.02867660001584227, "iqr": 0.00023000001192485797, "raw_times": [0.028600999996797327, 0.029791000031309522, 0.028831000008722185, 0.02755000002707675, 0.02861000001530556], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.03139000000373926, "peak_bytes": 5242880, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.02, "atol": 0.02, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "swiglu_fp32"}, "err": null}
6
+ {"ts": "2025-10-30T15:52:35Z", "run": "37230f1ce31641f2b6ebd7aba7f793c9", "impl": "hf_kernels_swiglu", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_T256_D2048", "num_tokens": 256, "hidden_dim": 2048, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.02618100000972845, "p50": 0.027131000024382956, "p90": 0.02731099999664366, "mean": 0.026918799994746223, "iqr": 0.0007610000238855719, "raw_times": [0.02618100000972845, 0.027131000024382956, 0.027420999970217963, 0.02731099999664366, 0.026549999972758087], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.03008099997714453, "peak_bytes": 10485760, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.02, "atol": 0.02, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "swiglu_fp32"}, "err": null}
7
+ {"ts": "2025-10-30T15:52:35Z", "run": "37230f1ce31641f2b6ebd7aba7f793c9", "impl": "hf_kernels_swiglu", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_T512_D768", "num_tokens": 512, "hidden_dim": 768, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.026950999995278835, "p50": 0.02748000002839035, "p90": 0.02804100000730614, "mean": 0.02758480000011332, "iqr": 0.0006300000450210064, "raw_times": [0.026950999995278835, 0.02804100000730614, 0.027410999962285132, 0.02804100000730614, 0.02748000002839035], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.03104999996139668, "peak_bytes": 7864320, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.02, "atol": 0.02, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "swiglu_fp32"}, "err": null}
8
+ {"ts": "2025-10-30T15:52:35Z", "run": "37230f1ce31641f2b6ebd7aba7f793c9", "impl": "hf_kernels_swiglu", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_T512_D1024", "num_tokens": 512, "hidden_dim": 1024, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.026300000001810986, "p50": 0.02733100001250932, "p90": 0.0275399999623005, "mean": 0.02720039998393986, "iqr": 0.0004789999934473599, "raw_times": [0.02706099996885314, 0.02733100001250932, 0.027769999974225357, 0.0275399999623005, 0.026300000001810986], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.03032000000757762, "peak_bytes": 10485760, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.02, "atol": 0.02, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "swiglu_fp32"}, "err": null}
9
+ {"ts": "2025-10-30T15:52:35Z", "run": "37230f1ce31641f2b6ebd7aba7f793c9", "impl": "hf_kernels_swiglu", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_T512_D2048", "num_tokens": 512, "hidden_dim": 2048, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.02642100002958614, "p50": 0.027860999978202017, "p90": 0.02790100000993334, "mean": 0.027615000010428048, "iqr": 0.00036000000136482413, "raw_times": [0.02642100002958614, 0.028351000025850226, 0.027541000008568517, 0.02790100000993334, 0.027860999978202017], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.03163999997468636, "peak_bytes": 20971520, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.02, "atol": 0.02, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "swiglu_fp32"}, "err": null}
activation/impls/cells/benchmark.py CHANGED
@@ -4,6 +4,7 @@
4
  # "numpy",
5
  # "torch==2.8.0",
6
  # "kernels-benchmark-tools",
 
7
  # ]
8
  #
9
  # [tool.uv.sources]
@@ -12,17 +13,22 @@
12
  import torch
13
  import sys
14
  from kernels_benchmark_tools import KernelTypeEnum, run_benchmark
15
- import torch, torch.nn.functional as F
16
 
 
 
17
 
18
- def swiglu_eager(x):
19
- d = x.shape[-1] // 2
20
- return F.silu(x[..., :d]) * x[..., d:]
 
 
 
21
 
22
 
23
  run_benchmark(
24
  kernel_type=KernelTypeEnum.ACTIVATION,
25
- impl_name="torch_eager",
26
- impl_tags={"family":"hf-kernels", "backend":"eager"},
27
- impl_func=swiglu_eager,
28
  )
 
4
  # "numpy",
5
  # "torch==2.8.0",
6
  # "kernels-benchmark-tools",
7
+ # "kernels",
8
  # ]
9
  #
10
  # [tool.uv.sources]
 
13
  import torch
14
  import sys
15
  from kernels_benchmark_tools import KernelTypeEnum, run_benchmark
16
+ from kernels import get_kernel
17
 
18
+ # Load the activation kernel
19
+ activation = get_kernel("kernels-community/activation")
20
 
21
+
22
+ def hf_kernels_swiglu(input_tensor):
23
+ hidden_dim = input_tensor.shape[-1] // 2
24
+ out_shape = input_tensor.shape[:-1] + (hidden_dim,)
25
+ out = torch.empty(out_shape, dtype=input_tensor.dtype, device=input_tensor.device)
26
+ return activation.silu_and_mul(out, input_tensor)
27
 
28
 
29
  run_benchmark(
30
  kernel_type=KernelTypeEnum.ACTIVATION,
31
+ impl_name="hf_kernels_swiglu",
32
+ impl_tags={"family": "hf-kernels", "backend": "cuda"},
33
+ impl_func=hf_kernels_swiglu,
34
  )
activation/impls/hf_kernels_swiglu.html CHANGED
The diff for this file is too large to render. See raw diff
 
activation/impls/torch_swiglu.html CHANGED
The diff for this file is too large to render. See raw diff
 
activation/results/artifacts/combine/latency.svg CHANGED

Git LFS Details

  • SHA256: 29b9e8bb5a372481457939e6eee0f747e53209886137e7247a5b8d98423c5492
  • Pointer size: 130 Bytes
  • Size of remote file: 20.6 kB

Git LFS Details

  • SHA256: 49127439c8b28e18efed1525d57e9bb48bdb632034f2f84a60940f7d447aff24
  • Pointer size: 130 Bytes
  • Size of remote file: 20.6 kB
activation/results/combined_results.html CHANGED
The diff for this file is too large to render. See raw diff
 
causal_conv1d/impls/artifacts/benchmark/causal_conv1d.jsonl CHANGED
@@ -1,24 +1,24 @@
1
- {"ts": "2025-10-29T15:50:27Z", "run": "73b51cf0e9b74d0eaee1c67a266218ef", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B2_D64_S128_W2", "batch": 2, "dim": 64, "seqlen": 128, "width": 2, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.07023200004141472, "p50": 0.07095199998730095, "p90": 0.07123199998204655, "mean": 0.07353400000056354, "iqr": 0.0008999999749903509, "raw_times": [0.07095199998730095, 0.08492199998499927, 0.0703320000070562, 0.07123199998204655, 0.07023200004141472], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.07603100004871521, "peak_bytes": 295936, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
2
- {"ts": "2025-10-29T15:50:27Z", "run": "73b51cf0e9b74d0eaee1c67a266218ef", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B2_D64_S128_W4", "batch": 2, "dim": 64, "seqlen": 128, "width": 4, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.08460200001536577, "p50": 0.08611200001951147, "p90": 0.08698200002754675, "mean": 0.08602200001632809, "iqr": 0.001740000016070553, "raw_times": [0.08460200001536577, 0.08611200001951147, 0.08698200002754675, 0.08717200000774028, 0.0852420000114762], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.08820200002901402, "peak_bytes": 296448, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
3
- {"ts": "2025-10-29T15:50:27Z", "run": "73b51cf0e9b74d0eaee1c67a266218ef", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B2_D64_S512_W2", "batch": 2, "dim": 64, "seqlen": 512, "width": 2, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.08334199998216718, "p50": 0.08516200000485696, "p90": 0.08565199999566175, "mean": 0.08509399999638845, "iqr": 0.0015599999869664316, "raw_times": [0.08334199998216718, 0.08722199999056102, 0.08565199999566175, 0.08516200000485696, 0.08409200000869532], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.0867219999918234, "peak_bytes": 1180672, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
4
- {"ts": "2025-10-29T15:50:27Z", "run": "73b51cf0e9b74d0eaee1c67a266218ef", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B2_D64_S512_W4", "batch": 2, "dim": 64, "seqlen": 512, "width": 4, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.08196199996746145, "p50": 0.08375099997692814, "p90": 0.08384200003774822, "mean": 0.08337179999671207, "iqr": 0.0010800000609378912, "raw_times": [0.08276199997681033, 0.08454200002461221, 0.08384200003774822, 0.08375099997692814, 0.08196199996746145], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.08716199999980745, "peak_bytes": 1181184, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
5
- {"ts": "2025-10-29T15:50:27Z", "run": "73b51cf0e9b74d0eaee1c67a266218ef", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B2_D64_S2048_W2", "batch": 2, "dim": 64, "seqlen": 2048, "width": 2, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.08276199997681033, "p50": 0.08335200004694343, "p90": 0.08474200001273857, "mean": 0.08374400000548121, "iqr": 0.0019199999883312557, "raw_times": [0.08335200004694343, 0.08474200001273857, 0.08504199996650641, 0.08276199997681033, 0.08282200002440732], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.08652200000369703, "peak_bytes": 4719616, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
6
- {"ts": "2025-10-29T15:50:27Z", "run": "73b51cf0e9b74d0eaee1c67a266218ef", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B2_D64_S2048_W4", "batch": 2, "dim": 64, "seqlen": 2048, "width": 4, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.08203199996614785, "p50": 0.08333200003107777, "p90": 0.08342199998878641, "mean": 0.08316619998822716, "iqr": 0.0006700000199089118, "raw_times": [0.08203199996614785, 0.08333200003107777, 0.08342199998878641, 0.0827519999688775, 0.08429299998624629], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.08916199999475793, "peak_bytes": 4720128, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
7
- {"ts": "2025-10-29T15:50:27Z", "run": "73b51cf0e9b74d0eaee1c67a266218ef", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B2_D2048_S128_W2", "batch": 2, "dim": 2048, "seqlen": 128, "width": 2, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.08283200003234015, "p50": 0.08409299999811992, "p90": 0.08469200002991784, "mean": 0.08781020001151774, "iqr": 0.001050000037139398, "raw_times": [0.08469200002991784, 0.08409299999811992, 0.10379200000443234, 0.08364199999277844, 0.08283200003234015], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.08838200000127472, "peak_bytes": 9461760, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
8
- {"ts": "2025-10-29T15:50:27Z", "run": "73b51cf0e9b74d0eaee1c67a266218ef", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B2_D2048_S128_W4", "batch": 2, "dim": 2048, "seqlen": 128, "width": 4, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.08139199997003743, "p50": 0.08336199999803284, "p90": 0.08399199998621043, "mean": 0.0832759999980226, "iqr": 0.0010599999313853914, "raw_times": [0.08139199997003743, 0.08470199998100725, 0.08293200005482504, 0.08336199999803284, 0.08399199998621043], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.08715199999187462, "peak_bytes": 9478144, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
9
- {"ts": "2025-10-29T15:50:27Z", "run": "73b51cf0e9b74d0eaee1c67a266218ef", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B2_D2048_S512_W2", "batch": 2, "dim": 2048, "seqlen": 512, "width": 2, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.08235199999262477, "p50": 0.08327199998348078, "p90": 0.0835210000218467, "mean": 0.08336580000332106, "iqr": 0.00033899999607456266, "raw_times": [0.08235199999262477, 0.0835210000218467, 0.08450199999288088, 0.08327199998348078, 0.08318200002577214], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.08735199998000098, "peak_bytes": 37773312, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
10
- {"ts": "2025-10-29T15:50:27Z", "run": "73b51cf0e9b74d0eaee1c67a266218ef", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B2_D2048_S512_W4", "batch": 2, "dim": 2048, "seqlen": 512, "width": 4, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.08233200003360253, "p50": 0.08335199999010001, "p90": 0.08342199998878641, "mean": 0.08314600000858263, "iqr": 0.0004799999828719592, "raw_times": [0.08342199998878641, 0.08233200003360253, 0.08335199999010001, 0.08294200000591445, 0.08368200002450976], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.08666200000106983, "peak_bytes": 37789696, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
11
- {"ts": "2025-10-29T15:50:27Z", "run": "73b51cf0e9b74d0eaee1c67a266218ef", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B2_D2048_S2048_W2", "batch": 2, "dim": 2048, "seqlen": 2048, "width": 2, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.1449639999577812, "p50": 0.14544300000807198, "p90": 0.14571399998430934, "mean": 0.14548759999115646, "iqr": 0.00032100001590151805, "raw_times": [0.14544300000807198, 0.1449639999577812, 0.14539299996840782, 0.14571399998430934, 0.14592400003721195], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.14803300001631214, "peak_bytes": 151019520, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
12
- {"ts": "2025-10-29T15:50:27Z", "run": "73b51cf0e9b74d0eaee1c67a266218ef", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B2_D2048_S2048_W4", "batch": 2, "dim": 2048, "seqlen": 2048, "width": 4, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.16181400002324153, "p50": 0.1630739999995967, "p90": 0.16360400002213282, "mean": 0.16567200000281446, "iqr": 0.0017800000478018774, "raw_times": [0.16181400002324153, 0.17804399999477027, 0.1630739999995967, 0.16182399997433095, 0.16360400002213282], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.16251400001010552, "peak_bytes": 151035904, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
13
- {"ts": "2025-10-29T15:50:27Z", "run": "73b51cf0e9b74d0eaee1c67a266218ef", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B4_D64_S128_W2", "batch": 4, "dim": 64, "seqlen": 128, "width": 2, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.08132199997135103, "p50": 0.08263099999794576, "p90": 0.08295200001384728, "mean": 0.0824317999899904, "iqr": 0.0009100000397666008, "raw_times": [0.08132199997135103, 0.08321199999272721, 0.08204199997408068, 0.08295200001384728, 0.08263099999794576], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.08486200005108913, "peak_bytes": 33727488, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
14
- {"ts": "2025-10-29T15:50:27Z", "run": "73b51cf0e9b74d0eaee1c67a266218ef", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B4_D64_S128_W4", "batch": 4, "dim": 64, "seqlen": 128, "width": 4, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.08171299998593895, "p50": 0.08253199996488547, "p90": 0.08321199999272721, "mean": 0.08254819997546292, "iqr": 0.001280000049064256, "raw_times": [0.08193199994366296, 0.08335199999010001, 0.08321199999272721, 0.08171299998593895, 0.08253199996488547], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.08592199998247452, "peak_bytes": 591360, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
15
- {"ts": "2025-10-29T15:50:27Z", "run": "73b51cf0e9b74d0eaee1c67a266218ef", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B4_D64_S512_W2", "batch": 4, "dim": 64, "seqlen": 512, "width": 2, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.08148200004143291, "p50": 0.08176199997933509, "p90": 0.08353199996236071, "mean": 0.08242180000479493, "iqr": 0.002030999951330159, "raw_times": [0.08150100001103056, 0.08148200004143291, 0.08383200002981539, 0.08176199997933509, 0.08353199996236071], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.08680199999844262, "peak_bytes": 2360320, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
16
- {"ts": "2025-10-29T15:50:27Z", "run": "73b51cf0e9b74d0eaee1c67a266218ef", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B4_D64_S512_W4", "batch": 4, "dim": 64, "seqlen": 512, "width": 4, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.08221299998467657, "p50": 0.08294200000591445, "p90": 0.08321200004957063, "mean": 0.08299800000486357, "iqr": 0.0007910000476840651, "raw_times": [0.08242100000188657, 0.08420199998226963, 0.08321200004957063, 0.08221299998467657, 0.08294200000591445], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.08663200003411475, "peak_bytes": 2360832, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
17
- {"ts": "2025-10-29T15:50:27Z", "run": "73b51cf0e9b74d0eaee1c67a266218ef", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B4_D64_S2048_W2", "batch": 4, "dim": 64, "seqlen": 2048, "width": 2, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.08301200000460085, "p50": 0.08371199999146484, "p90": 0.08385299997826223, "mean": 0.08369219999622146, "iqr": 0.0001610000026630587, "raw_times": [0.08301200000460085, 0.08371199999146484, 0.08419200003118021, 0.08385299997826223, 0.08369199997559917], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.086651999993137, "peak_bytes": 9438208, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
18
- {"ts": "2025-10-29T15:50:27Z", "run": "73b51cf0e9b74d0eaee1c67a266218ef", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B4_D64_S2048_W4", "batch": 4, "dim": 64, "seqlen": 2048, "width": 4, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.08138200001894802, "p50": 0.08318200002577214, "p90": 0.08328199999141361, "mean": 0.08309020000751843, "iqr": 0.0010899999551838846, "raw_times": [0.08219200003622973, 0.08541299996522866, 0.08318200002577214, 0.08138200001894802, 0.08328199999141361], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.08645299999443523, "peak_bytes": 9438720, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
19
- {"ts": "2025-10-29T15:50:27Z", "run": "73b51cf0e9b74d0eaee1c67a266218ef", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B4_D2048_S128_W2", "batch": 4, "dim": 2048, "seqlen": 128, "width": 2, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.0822520000269833, "p50": 0.08321100000330262, "p90": 0.08357199999409204, "mean": 0.08451599999261816, "iqr": 0.0009600000225873373, "raw_times": [0.09093299996720816, 0.0822520000269833, 0.08321100000330262, 0.0826119999715047, 0.08357199999409204], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.08730200005402367, "peak_bytes": 18931712, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
20
- {"ts": "2025-10-29T15:50:27Z", "run": "73b51cf0e9b74d0eaee1c67a266218ef", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B4_D2048_S128_W4", "batch": 4, "dim": 2048, "seqlen": 128, "width": 4, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.08279200000060882, "p50": 0.08370200004037542, "p90": 0.08400199999414326, "mean": 0.08373800000072151, "iqr": 0.0006500000040432496, "raw_times": [0.08335199999010001, 0.08400199999414326, 0.08484199997838004, 0.08279200000060882, 0.08370200004037542], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.08856199997353542, "peak_bytes": 18948096, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
21
- {"ts": "2025-10-29T15:50:27Z", "run": "73b51cf0e9b74d0eaee1c67a266218ef", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B4_D2048_S512_W2", "batch": 4, "dim": 2048, "seqlen": 512, "width": 2, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.09200200003078862, "p50": 0.09372200003099351, "p90": 0.09380200003761274, "mean": 0.09347200001457168, "iqr": 0.00012000003835055395, "raw_times": [0.09200200003078862, 0.09415199997420132, 0.09380200003761274, 0.09372200003099351, 0.09368199999926219], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.09485200001790872, "peak_bytes": 75522048, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
22
- {"ts": "2025-10-29T15:50:27Z", "run": "73b51cf0e9b74d0eaee1c67a266218ef", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B4_D2048_S512_W4", "batch": 4, "dim": 2048, "seqlen": 512, "width": 4, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.098961999981384, "p50": 0.10011200004100829, "p90": 0.10014200000796336, "mean": 0.10138220001181253, "iqr": 0.0004400000079840538, "raw_times": [0.09970199999997931, 0.098961999981384, 0.10011200004100829, 0.10014200000796336, 0.10799300002872769], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.11010200000782788, "peak_bytes": 75538432, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
23
- {"ts": "2025-10-29T15:50:27Z", "run": "73b51cf0e9b74d0eaee1c67a266218ef", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B4_D2048_S2048_W2", "batch": 4, "dim": 2048, "seqlen": 2048, "width": 2, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.48627099999976053, "p50": 0.48646099997995407, "p90": 0.4873609999549444, "mean": 0.48691319999534244, "iqr": 0.00103899992609513, "raw_times": [0.48627099999976053, 0.4873609999549444, 0.4881510000132039, 0.4863220000288493, 0.48646099997995407], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.48353100004305816, "peak_bytes": 302014464, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
24
- {"ts": "2025-10-29T15:50:27Z", "run": "73b51cf0e9b74d0eaee1c67a266218ef", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B4_D2048_S2048_W4", "batch": 4, "dim": 2048, "seqlen": 2048, "width": 4, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.491851000049337, "p50": 0.49710199999708493, "p90": 0.49729199997727846, "mean": 0.49653980000812226, "iqr": 0.0012099999935344385, "raw_times": [0.496081999983744, 0.5003720000331668, 0.49729199997727846, 0.49710199999708493, 0.491851000049337], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.5018319999976484, "peak_bytes": 302030848, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
 
1
+ {"ts": "2025-10-30T15:53:36Z", "run": "a6ca6031a2be44b8852eef7e2bbddc9e", "impl": "hf_kernels_causal_conv1d", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B2_D64_S128_W2", "batch": 2, "dim": 64, "seqlen": 128, "width": 2, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.04394999996293336, "p50": 0.04566100000147344, "p90": 0.046750000024076144, "mean": 0.04579239999884521, "iqr": 0.0020500000346146408, "raw_times": [0.0446999999894615, 0.047901000016281614, 0.046750000024076144, 0.04566100000147344, 0.04394999996293336], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.05609099997627709, "peak_bytes": 295936, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
2
+ {"ts": "2025-10-30T15:53:36Z", "run": "a6ca6031a2be44b8852eef7e2bbddc9e", "impl": "hf_kernels_causal_conv1d", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B2_D64_S128_W4", "batch": 2, "dim": 64, "seqlen": 128, "width": 4, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.05193099997313766, "p50": 0.05449100001442275, "p90": 0.054510999973444996, "mean": 0.05559319998837964, "iqr": 0.0010200000133409048, "raw_times": [0.05349099996010409, 0.05449100001442275, 0.06354200002078869, 0.05193099997313766, 0.054510999973444996], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.060221000012461445, "peak_bytes": 296448, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
3
+ {"ts": "2025-10-30T15:53:36Z", "run": "a6ca6031a2be44b8852eef7e2bbddc9e", "impl": "hf_kernels_causal_conv1d", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B2_D64_S512_W2", "batch": 2, "dim": 64, "seqlen": 512, "width": 2, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.051560999963840004, "p50": 0.05184100001542902, "p90": 0.05310099999178419, "mean": 0.05230499999697713, "iqr": 0.0014099999816608033, "raw_times": [0.05184100001542902, 0.05333100000370905, 0.05310099999178419, 0.05169100001012339, 0.051560999963840004], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.058330999991085264, "peak_bytes": 1180672, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
4
+ {"ts": "2025-10-30T15:53:36Z", "run": "a6ca6031a2be44b8852eef7e2bbddc9e", "impl": "hf_kernels_causal_conv1d", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B2_D64_S512_W4", "batch": 2, "dim": 64, "seqlen": 512, "width": 4, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.05121099997040801, "p50": 0.051831000007496186, "p90": 0.052310999990368146, "mean": 0.05185479999454401, "iqr": 0.0008799999591246888, "raw_times": [0.05121099997040801, 0.051831000007496186, 0.052310999990368146, 0.05248999997320425, 0.05143100003124346], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.05627100000538121, "peak_bytes": 1181184, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
5
+ {"ts": "2025-10-30T15:53:36Z", "run": "a6ca6031a2be44b8852eef7e2bbddc9e", "impl": "hf_kernels_causal_conv1d", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B2_D64_S2048_W2", "batch": 2, "dim": 64, "seqlen": 2048, "width": 2, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.050751000003401714, "p50": 0.051640999970459234, "p90": 0.05217000000357075, "mean": 0.05161080000561924, "iqr": 0.0008689999617672584, "raw_times": [0.05219100000886101, 0.05217000000357075, 0.050751000003401714, 0.05130100004180349, 0.051640999970459234], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.055421000013211597, "peak_bytes": 4719616, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
6
+ {"ts": "2025-10-30T15:53:36Z", "run": "a6ca6031a2be44b8852eef7e2bbddc9e", "impl": "hf_kernels_causal_conv1d", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B2_D64_S2048_W4", "batch": 2, "dim": 64, "seqlen": 2048, "width": 4, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.04883100001507046, "p50": 0.049950999994052836, "p90": 0.05039000001261229, "mean": 0.04992260001017712, "iqr": 0.0006600000119760807, "raw_times": [0.04883100001507046, 0.05071100002851381, 0.04973000000063621, 0.05039000001261229, 0.049950999994052836], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.05684100000280523, "peak_bytes": 4720128, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
7
+ {"ts": "2025-10-30T15:53:36Z", "run": "a6ca6031a2be44b8852eef7e2bbddc9e", "impl": "hf_kernels_causal_conv1d", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B2_D2048_S128_W2", "batch": 2, "dim": 2048, "seqlen": 128, "width": 2, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.04895099999657759, "p50": 0.050181000005977694, "p90": 0.05176100000880979, "mean": 0.05066500000339147, "iqr": 0.0021600000081889448, "raw_times": [0.04960100000062084, 0.05176100000880979, 0.050181000005977694, 0.05283100000497143, 0.04895099999657759], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.05629100002124687, "peak_bytes": 9461760, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
8
+ {"ts": "2025-10-30T15:53:36Z", "run": "a6ca6031a2be44b8852eef7e2bbddc9e", "impl": "hf_kernels_causal_conv1d", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B2_D2048_S128_W4", "batch": 2, "dim": 2048, "seqlen": 128, "width": 4, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.048800999991271965, "p50": 0.051240999994206504, "p90": 0.0513809999915793, "mean": 0.05085500000632237, "iqr": 0.00043999995114063495, "raw_times": [0.051240999994206504, 0.048800999991271965, 0.051911000014115416, 0.050941000040438666, 0.0513809999915793], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.056131000008008414, "peak_bytes": 9478144, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
9
+ {"ts": "2025-10-30T15:53:36Z", "run": "a6ca6031a2be44b8852eef7e2bbddc9e", "impl": "hf_kernels_causal_conv1d", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B2_D2048_S512_W2", "batch": 2, "dim": 2048, "seqlen": 512, "width": 2, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.04940100001249448, "p50": 0.05085099996904319, "p90": 0.05221100002472667, "mean": 0.05112659999895186, "iqr": 0.0015410000742122065, "raw_times": [0.050669999950514466, 0.05221100002472667, 0.04940100001249448, 0.0525000000379805, 0.05085099996904319], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.053861000026245165, "peak_bytes": 37773312, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
10
+ {"ts": "2025-10-30T15:53:36Z", "run": "a6ca6031a2be44b8852eef7e2bbddc9e", "impl": "hf_kernels_causal_conv1d", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B2_D2048_S512_W4", "batch": 2, "dim": 2048, "seqlen": 512, "width": 4, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.04947999997284569, "p50": 0.05073100004437947, "p90": 0.05098100001532657, "mean": 0.05063280001422754, "iqr": 0.0010900000120273035, "raw_times": [0.04947999997284569, 0.05098100001532657, 0.04989100000329927, 0.05073100004437947, 0.052081000035286706], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.054841000007854745, "peak_bytes": 37789696, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
11
+ {"ts": "2025-10-30T15:53:36Z", "run": "a6ca6031a2be44b8852eef7e2bbddc9e", "impl": "hf_kernels_causal_conv1d", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B2_D2048_S2048_W2", "batch": 2, "dim": 2048, "seqlen": 2048, "width": 2, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.05039100000203689, "p50": 0.051160999987587275, "p90": 0.05154000001539316, "mean": 0.051364599994485616, "iqr": 0.00038000001723048626, "raw_times": [0.051160999987587275, 0.05257099996924808, 0.05039100000203689, 0.05154000001539316, 0.051159999998162675], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.05513099995368975, "peak_bytes": 151019520, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
12
+ {"ts": "2025-10-30T15:53:36Z", "run": "a6ca6031a2be44b8852eef7e2bbddc9e", "impl": "hf_kernels_causal_conv1d", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B2_D2048_S2048_W4", "batch": 2, "dim": 2048, "seqlen": 2048, "width": 4, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.048071000037452905, "p50": 0.05178100002467545, "p90": 0.0526809999996658, "mean": 0.05150900001353875, "iqr": 0.0032599999713056604, "raw_times": [0.04942100002836014, 0.0526809999996658, 0.05178100002467545, 0.05559099997753947, 0.048071000037452905], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.05527100000790597, "peak_bytes": 151035904, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
13
+ {"ts": "2025-10-30T15:53:36Z", "run": "a6ca6031a2be44b8852eef7e2bbddc9e", "impl": "hf_kernels_causal_conv1d", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B4_D64_S128_W2", "batch": 4, "dim": 64, "seqlen": 128, "width": 2, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.04963099996757592, "p50": 0.05203099999562255, "p90": 0.052549999963957816, "mean": 0.05276679999042244, "iqr": 0.0005189999683352653, "raw_times": [0.05759100002933337, 0.05203099999562255, 0.052549999963957816, 0.04963099996757592, 0.05203099999562255], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.07661199998665325, "peak_bytes": 33727488, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
14
+ {"ts": "2025-10-30T15:53:36Z", "run": "a6ca6031a2be44b8852eef7e2bbddc9e", "impl": "hf_kernels_causal_conv1d", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B4_D64_S128_W4", "batch": 4, "dim": 64, "seqlen": 128, "width": 4, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.049701000023105735, "p50": 0.051581000036549085, "p90": 0.05290100000365783, "mean": 0.05255880001868718, "iqr": 0.002381000001605571, "raw_times": [0.05290100000365783, 0.058091000028070994, 0.051581000036549085, 0.05052000000205226, 0.049701000023105735], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.054920000025049376, "peak_bytes": 591360, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
15
+ {"ts": "2025-10-30T15:53:36Z", "run": "a6ca6031a2be44b8852eef7e2bbddc9e", "impl": "hf_kernels_causal_conv1d", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B4_D64_S512_W2", "batch": 4, "dim": 64, "seqlen": 512, "width": 2, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.0517009999612128, "p50": 0.05219999997052582, "p90": 0.05233100000623381, "mean": 0.05215079999061345, "iqr": 0.0001500000053056283, "raw_times": [0.05233100000623381, 0.05234100001416664, 0.05219999997052582, 0.0517009999612128, 0.05218100000092818], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.055141000018466, "peak_bytes": 2360320, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
16
+ {"ts": "2025-10-30T15:53:36Z", "run": "a6ca6031a2be44b8852eef7e2bbddc9e", "impl": "hf_kernels_causal_conv1d", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B4_D64_S512_W4", "batch": 4, "dim": 64, "seqlen": 512, "width": 4, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.05047100000865612, "p50": 0.05349100001694751, "p90": 0.05691100000149163, "mean": 0.057148999997025385, "iqr": 0.004350000040176383, "raw_times": [0.05047100000865612, 0.05349100001694751, 0.07231099999671642, 0.05256099996131525, 0.05691100000149163], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.05554099999471873, "peak_bytes": 2360832, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
17
+ {"ts": "2025-10-30T15:53:36Z", "run": "a6ca6031a2be44b8852eef7e2bbddc9e", "impl": "hf_kernels_causal_conv1d", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B4_D64_S2048_W2", "batch": 4, "dim": 64, "seqlen": 2048, "width": 2, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.049690000025748304, "p50": 0.050921000024573004, "p90": 0.051730999985011294, "mean": 0.051232800001344, "iqr": 0.0010800000040944724, "raw_times": [0.05065099998091682, 0.051730999985011294, 0.05317099999047059, 0.049690000025748304, 0.050921000024573004], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.05373099997996178, "peak_bytes": 9438208, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
18
+ {"ts": "2025-10-30T15:53:36Z", "run": "a6ca6031a2be44b8852eef7e2bbddc9e", "impl": "hf_kernels_causal_conv1d", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B4_D64_S2048_W4", "batch": 4, "dim": 64, "seqlen": 2048, "width": 4, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.05013100002315696, "p50": 0.05073099998753605, "p90": 0.052470999946763186, "mean": 0.051448999988679134, "iqr": 0.001829999973779195, "raw_times": [0.05013100002315696, 0.05073099998753605, 0.05327100001295548, 0.052470999946763186, 0.05064099997298399], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.05419999996547631, "peak_bytes": 9438720, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
19
+ {"ts": "2025-10-30T15:53:36Z", "run": "a6ca6031a2be44b8852eef7e2bbddc9e", "impl": "hf_kernels_causal_conv1d", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B4_D2048_S128_W2", "batch": 4, "dim": 2048, "seqlen": 128, "width": 2, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.04918100000850245, "p50": 0.050670999996782484, "p90": 0.05192099996520483, "mean": 0.050938799995492445, "iqr": 0.0013709999393540784, "raw_times": [0.04918100000850245, 0.05192099996520483, 0.05237099998112171, 0.05055000002585075, 0.050670999996782484], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.05559099997753947, "peak_bytes": 18931712, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
20
+ {"ts": "2025-10-30T15:53:36Z", "run": "a6ca6031a2be44b8852eef7e2bbddc9e", "impl": "hf_kernels_causal_conv1d", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B4_D2048_S128_W4", "batch": 4, "dim": 2048, "seqlen": 128, "width": 4, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.049871000044277025, "p50": 0.05047100000865612, "p90": 0.05118100000345294, "mean": 0.050820800015571876, "iqr": 0.0007699999855503847, "raw_times": [0.049871000044277025, 0.05041100001790255, 0.05217000000357075, 0.05047100000865612, 0.05118100000345294], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.05564100001720362, "peak_bytes": 18948096, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
21
+ {"ts": "2025-10-30T15:53:36Z", "run": "a6ca6031a2be44b8852eef7e2bbddc9e", "impl": "hf_kernels_causal_conv1d", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B4_D2048_S512_W2", "batch": 4, "dim": 2048, "seqlen": 512, "width": 2, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.05115100003649786, "p50": 0.052071000027353875, "p90": 0.05212100001017461, "mean": 0.05199700001412566, "iqr": 0.0006100000291553442, "raw_times": [0.05115100003649786, 0.052071000027353875, 0.053131000015582686, 0.05212100001017461, 0.05151099998101927], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.05440099999987069, "peak_bytes": 75522048, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
22
+ {"ts": "2025-10-30T15:53:36Z", "run": "a6ca6031a2be44b8852eef7e2bbddc9e", "impl": "hf_kernels_causal_conv1d", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B4_D2048_S512_W4", "batch": 4, "dim": 2048, "seqlen": 512, "width": 4, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.04927099996621109, "p50": 0.051500999973086437, "p90": 0.05194099998107049, "mean": 0.05114499998626343, "iqr": 0.000919999990856013, "raw_times": [0.051500999973086437, 0.04927099996621109, 0.051991000020734646, 0.05194099998107049, 0.05102099999021448], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.054591000036907644, "peak_bytes": 75538432, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
23
+ {"ts": "2025-10-30T15:53:36Z", "run": "a6ca6031a2be44b8852eef7e2bbddc9e", "impl": "hf_kernels_causal_conv1d", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B4_D2048_S2048_W2", "batch": 4, "dim": 2048, "seqlen": 2048, "width": 2, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.049930999978187174, "p50": 0.050361000035081815, "p90": 0.05102099999021448, "mean": 0.05066480000550655, "iqr": 0.0008009999987734773, "raw_times": [0.050219999991441, 0.050361000035081815, 0.05179100003260828, 0.049930999978187174, 0.05102099999021448], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.05545099998016667, "peak_bytes": 302014464, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
24
+ {"ts": "2025-10-30T15:53:36Z", "run": "a6ca6031a2be44b8852eef7e2bbddc9e", "impl": "hf_kernels_causal_conv1d", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B4_D2048_S2048_W4", "batch": 4, "dim": 2048, "seqlen": 2048, "width": 4, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.0500799999940682, "p50": 0.05195099998900332, "p90": 0.051991000020734646, "mean": 0.05318280000210507, "iqr": 0.0014600000213249587, "raw_times": [0.0500799999940682, 0.05195099998900332, 0.051991000020734646, 0.05053099999940969, 0.061361000007309485], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.05489099999067548, "peak_bytes": 302030848, "ok": true, "absmax": 0.0, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax": 0.0, "mae": 0.0, "mse": 0.0, "ref": "causal_conv1d_fp32"}, "err": null}
causal_conv1d/impls/cells/benchmark.py CHANGED
@@ -4,37 +4,28 @@
4
  # "numpy",
5
  # "torch==2.8.0",
6
  # "kernels-benchmark-tools",
 
7
  # ]
8
  #
9
  # [tool.uv.sources]
10
  # kernels-benchmark-tools = { path = "../../../../../tools", editable = true }
11
  # ///
12
  import torch
13
- import torch.nn.functional as F
14
  import sys
15
  from kernels_benchmark_tools import KernelTypeEnum, run_benchmark
 
16
 
 
 
17
 
18
- def torch_causal_conv1d(input_tensor, weight, bias):
19
- # Convert to weight dtype for computation
20
- x = input_tensor.to(weight.dtype)
21
- dim = weight.shape[0]
22
- width = weight.shape[1]
23
- seqlen = input_tensor.shape[-1]
24
 
25
- # Depthwise causal conv1d using PyTorch
26
- out = F.conv1d(x, weight.unsqueeze(1), bias, padding=width - 1, groups=dim)
27
-
28
- # Truncate to original sequence length
29
- out = out[..., :seqlen]
30
-
31
- # Convert back to original dtype
32
- return out.to(input_tensor.dtype)
33
 
34
 
35
  run_benchmark(
36
  kernel_type=KernelTypeEnum.CAUSAL_CONV1D,
37
- impl_name="torch_eager",
38
- impl_tags={"family": "pytorch", "backend": "eager"},
39
- impl_func=torch_causal_conv1d,
40
  )
 
4
  # "numpy",
5
  # "torch==2.8.0",
6
  # "kernels-benchmark-tools",
7
+ # "kernels",
8
  # ]
9
  #
10
  # [tool.uv.sources]
11
  # kernels-benchmark-tools = { path = "../../../../../tools", editable = true }
12
  # ///
13
  import torch
 
14
  import sys
15
  from kernels_benchmark_tools import KernelTypeEnum, run_benchmark
16
+ from kernels import get_kernel
17
 
18
+ # Load the causal conv1d kernel
19
+ causal_conv1d = get_kernel("kernels-community/causal-conv1d")
20
 
 
 
 
 
 
 
21
 
22
+ def hf_kernels_causal_conv1d(input_tensor, weight, bias):
23
+ return causal_conv1d.causal_conv1d_fn(input_tensor, weight, bias)
 
 
 
 
 
 
24
 
25
 
26
  run_benchmark(
27
  kernel_type=KernelTypeEnum.CAUSAL_CONV1D,
28
+ impl_name="hf_kernels_causal_conv1d",
29
+ impl_tags={"family": "hf-kernels", "backend": "cuda"},
30
+ impl_func=hf_kernels_causal_conv1d,
31
  )
causal_conv1d/impls/hf_kernels_causal_conv1d.html CHANGED
The diff for this file is too large to render. See raw diff
 
causal_conv1d/impls/torch_causal_conv1d.html CHANGED
The diff for this file is too large to render. See raw diff
 
causal_conv1d/results/artifacts/combine/latency.svg CHANGED

Git LFS Details

  • SHA256: 1d242a099b34afd09f08c43f438a0f0428d98a0ebd51a9a36d0be25ca9da89df
  • Pointer size: 130 Bytes
  • Size of remote file: 35.4 kB

Git LFS Details

  • SHA256: cf8858bb054bd7e8f82af77fd05a6475b7ee3a9a335ba4a6506cd1c694804777
  • Pointer size: 130 Bytes
  • Size of remote file: 35.4 kB
causal_conv1d/results/combined_results.html CHANGED
The diff for this file is too large to render. See raw diff
 
flash_attn/impls/artifacts/benchmark/attention.jsonl CHANGED
@@ -1,6 +1,6 @@
1
- {"ts": "2025-10-29T15:50:47Z", "run": "cdb0295471e5453fb4c555529da92783", "impl": "torch_mem_eff", "tags": {"family": "torch-sdpa", "backend": "EFFICIENT", "compile": "none"}, "wl": {"name": "cuda_attn_L128_bfloat16", "batch": 1, "seq_len": 4224, "heads": 24, "head_dim": 128, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 1.8233430000123008, "p50": 1.8343830000162598, "p90": 1.8450139999686144, "mean": 1.8363673999942876, "iqr": 0.021300000014434772, "raw_times": [1.8450139999686144, 1.8233430000123008, 1.8237139999541796, 1.8343830000162598, 1.8553830000200833], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 1.8232439999792405, "peak_bytes": 295567360, "ok": true, "absmax": 0.0625, "corr": {"ok": true, "rtol": 0.02, "atol": 0.02, "absmax": 0.0625, "mae": 0.0003604888916015625, "mse": 2.7865171432495117e-06, "ref": "sdpa_math_fp32"}, "err": null}
2
- {"ts": "2025-10-29T15:50:47Z", "run": "cdb0295471e5453fb4c555529da92783", "impl": "torch_mem_eff", "tags": {"family": "torch-sdpa", "backend": "EFFICIENT", "compile": "none"}, "wl": {"name": "cuda_attn_L256_bfloat16", "batch": 1, "seq_len": 4352, "heads": 24, "head_dim": 128, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 1.8942840000022443, "p50": 1.9424449999974058, "p90": 1.9434060000094178, "mean": 1.9367254000030698, "iqr": 0.0023400000372930663, "raw_times": [1.8942840000022443, 1.9424449999974058, 1.9410659999721247, 1.9434060000094178, 1.9624260000341565], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 1.9008649999818772, "peak_bytes": 304742400, "ok": true, "absmax": 0.0625, "corr": {"ok": true, "rtol": 0.02, "atol": 0.02, "absmax": 0.0625, "mae": 0.00035858154296875, "mse": 2.7567148208618164e-06, "ref": "sdpa_math_fp32"}, "err": null}
3
- {"ts": "2025-10-29T15:50:48Z", "run": "cdb0295471e5453fb4c555529da92783", "impl": "torch_mem_eff", "tags": {"family": "torch-sdpa", "backend": "EFFICIENT", "compile": "none"}, "wl": {"name": "cuda_attn_L320_bfloat16", "batch": 1, "seq_len": 4416, "heads": 24, "head_dim": 128, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 1.942595999992136, "p50": 1.9503360000499015, "p90": 2.019877999998698, "mean": 1.9758666000029734, "iqr": 0.0764520000302582, "raw_times": [1.9503360000499015, 1.94342599996844, 1.942595999992136, 2.019877999998698, 2.0230970000056914], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 1.9501660000287302, "peak_bytes": 307494912, "ok": true, "absmax": 0.0625, "corr": {"ok": true, "rtol": 0.02, "atol": 0.02, "absmax": 0.0625, "mae": 0.0003566741943359375, "mse": 2.771615982055664e-06, "ref": "sdpa_math_fp32"}, "err": null}
4
- {"ts": "2025-10-29T15:50:48Z", "run": "cdb0295471e5453fb4c555529da92783", "impl": "torch_mem_eff", "tags": {"family": "torch-sdpa", "backend": "EFFICIENT", "compile": "none"}, "wl": {"name": "cuda_attn_L384_bfloat16", "batch": 1, "seq_len": 4480, "heads": 24, "head_dim": 128, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 1.9654459999856044, "p50": 2.0491880000008678, "p90": 2.050657999973282, "mean": 2.0347600000036437, "iqr": 0.0033989999224104395, "raw_times": [1.9654459999856044, 2.0491880000008678, 2.0472590000508717, 2.050657999973282, 2.0612490000075923], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 2.0352980000097887, "peak_bytes": 311296000, "ok": true, "absmax": 0.0625, "corr": {"ok": true, "rtol": 0.02, "atol": 0.02, "absmax": 0.0625, "mae": 0.00035858154296875, "mse": 2.771615982055664e-06, "ref": "sdpa_math_fp32"}, "err": null}
5
- {"ts": "2025-10-29T15:50:48Z", "run": "cdb0295471e5453fb4c555529da92783", "impl": "torch_mem_eff", "tags": {"family": "torch-sdpa", "backend": "EFFICIENT", "compile": "none"}, "wl": {"name": "cuda_attn_L448_bfloat16", "batch": 1, "seq_len": 4544, "heads": 24, "head_dim": 128, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 2.0188670000038655, "p50": 2.067507999981899, "p90": 2.1027900000376576, "mean": 2.0633722000184207, "iqr": 0.07837300000801406, "raw_times": [2.0188670000038655, 2.0244170000296435, 2.067507999981899, 2.1027900000376576, 2.103279000039038], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 2.0235979999938536, "peak_bytes": 315621376, "ok": true, "absmax": 0.0625, "corr": {"ok": true, "rtol": 0.02, "atol": 0.02, "absmax": 0.0625, "mae": 0.00035858154296875, "mse": 2.771615982055664e-06, "ref": "sdpa_math_fp32"}, "err": null}
6
- {"ts": "2025-10-29T15:50:48Z", "run": "cdb0295471e5453fb4c555529da92783", "impl": "torch_mem_eff", "tags": {"family": "torch-sdpa", "backend": "EFFICIENT", "compile": "none"}, "wl": {"name": "cuda_attn_L512_bfloat16", "batch": 1, "seq_len": 4608, "heads": 24, "head_dim": 128, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 2.1849919999681333, "p50": 2.1887119999632887, "p90": 2.2487329999876238, "mean": 2.212510399988332, "iqr": 0.06324099996390942, "raw_times": [2.1849919999681333, 2.1887119999632887, 2.1854920000237144, 2.2487329999876238, 2.254622999998901], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 2.1668410000188487, "peak_bytes": 319946752, "ok": true, "absmax": 0.0625, "corr": {"ok": true, "rtol": 0.02, "atol": 0.02, "absmax": 0.0625, "mae": 0.0003604888916015625, "mse": 2.771615982055664e-06, "ref": "sdpa_math_fp32"}, "err": null}
 
1
+ {"ts": "2025-10-30T15:53:30Z", "run": "30999c763e9c4aa995d0df5078964128", "impl": "hf_kernels_flash_attn3", "tags": {"family": "hf-kernels", "backend": "flash-attn3", "compile": "none"}, "wl": {"name": "cuda_attn_L128_bfloat16", "batch": 1, "seq_len": 4224, "heads": 24, "head_dim": 128, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.9094910000158052, "p50": 0.9113720000186731, "p90": 0.9181919999718957, "mean": 0.9141214000010223, "iqr": 0.007780999965234514, "raw_times": [0.9104110000066612, 0.9094910000158052, 0.9113720000186731, 0.9181919999718957, 0.9211409999920761], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.9259819999556385, "peak_bytes": 295567360, "ok": true, "absmax": 0.0625, "corr": {"ok": true, "rtol": 0.02, "atol": 0.02, "absmax": 0.0625, "mae": 0.0003604888916015625, "mse": 2.8014183044433594e-06, "ref": "sdpa_math_fp32"}, "err": null}
2
+ {"ts": "2025-10-30T15:53:30Z", "run": "30999c763e9c4aa995d0df5078964128", "impl": "hf_kernels_flash_attn3", "tags": {"family": "hf-kernels", "backend": "flash-attn3", "compile": "none"}, "wl": {"name": "cuda_attn_L256_bfloat16", "batch": 1, "seq_len": 4352, "heads": 24, "head_dim": 128, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.9480720000283327, "p50": 0.9496129999888581, "p90": 0.9558429999856344, "mean": 0.952826599996115, "iqr": 0.00735100002202671, "raw_times": [0.9480720000283327, 0.9484919999636077, 0.9496129999888581, 0.9558429999856344, 0.962113000014142], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.9554529999604711, "peak_bytes": 304742400, "ok": true, "absmax": 0.0625, "corr": {"ok": true, "rtol": 0.02, "atol": 0.02, "absmax": 0.0625, "mae": 0.00035858154296875, "mse": 2.7865171432495117e-06, "ref": "sdpa_math_fp32"}, "err": null}
3
+ {"ts": "2025-10-30T15:53:30Z", "run": "30999c763e9c4aa995d0df5078964128", "impl": "hf_kernels_flash_attn3", "tags": {"family": "hf-kernels", "backend": "flash-attn3", "compile": "none"}, "wl": {"name": "cuda_attn_L320_bfloat16", "batch": 1, "seq_len": 4416, "heads": 24, "head_dim": 128, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 1.0061439999731192, "p50": 1.0189639999680367, "p90": 1.0215840000000753, "mean": 1.017895999996199, "iqr": 0.0038299999687296804, "raw_times": [1.0189639999680367, 1.025034000008418, 1.0177540000313456, 1.0061439999731192, 1.0215840000000753], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 1.0171540000101231, "peak_bytes": 307494912, "ok": true, "absmax": 0.0625, "corr": {"ok": true, "rtol": 0.02, "atol": 0.02, "absmax": 0.0625, "mae": 0.00035858154296875, "mse": 2.7865171432495117e-06, "ref": "sdpa_math_fp32"}, "err": null}
4
+ {"ts": "2025-10-30T15:53:30Z", "run": "30999c763e9c4aa995d0df5078964128", "impl": "hf_kernels_flash_attn3", "tags": {"family": "hf-kernels", "backend": "flash-attn3", "compile": "none"}, "wl": {"name": "cuda_attn_L384_bfloat16", "batch": 1, "seq_len": 4480, "heads": 24, "head_dim": 128, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 1.0146539999595916, "p50": 1.019383999960155, "p90": 1.0202839999919888, "mean": 1.018159799980367, "iqr": 0.004200999967451935, "raw_times": [1.0202839999919888, 1.0146539999595916, 1.0160830000245369, 1.0203939999655631, 1.019383999960155], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 1.0248149999938505, "peak_bytes": 311296000, "ok": true, "absmax": 0.0625, "corr": {"ok": true, "rtol": 0.02, "atol": 0.02, "absmax": 0.0625, "mae": 0.00035858154296875, "mse": 2.7865171432495117e-06, "ref": "sdpa_math_fp32"}, "err": null}
5
+ {"ts": "2025-10-30T15:53:30Z", "run": "30999c763e9c4aa995d0df5078964128", "impl": "hf_kernels_flash_attn3", "tags": {"family": "hf-kernels", "backend": "flash-attn3", "compile": "none"}, "wl": {"name": "cuda_attn_L448_bfloat16", "batch": 1, "seq_len": 4544, "heads": 24, "head_dim": 128, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 1.1737179999613545, "p50": 1.184327000032681, "p90": 1.1859380000487363, "mean": 1.186479800003326, "iqr": 0.010300000042207103, "raw_times": [1.1756380000065292, 1.1737179999613545, 1.1859380000487363, 1.184327000032681, 1.2127779999673294], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 1.1959679999904438, "peak_bytes": 315621376, "ok": true, "absmax": 0.0625, "corr": {"ok": true, "rtol": 0.02, "atol": 0.02, "absmax": 0.0625, "mae": 0.00035858154296875, "mse": 2.7865171432495117e-06, "ref": "sdpa_math_fp32"}, "err": null}
6
+ {"ts": "2025-10-30T15:53:30Z", "run": "30999c763e9c4aa995d0df5078964128", "impl": "hf_kernels_flash_attn3", "tags": {"family": "hf-kernels", "backend": "flash-attn3", "compile": "none"}, "wl": {"name": "cuda_attn_L512_bfloat16", "batch": 1, "seq_len": 4608, "heads": 24, "head_dim": 128, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 1.1702179999701912, "p50": 1.1838479999823903, "p90": 1.1906280000175684, "mean": 1.1843698000006952, "iqr": 0.016700999992735888, "raw_times": [1.1739270000248325, 1.1702179999701912, 1.1838479999823903, 1.1906280000175684, 1.2032280000084938], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 1.1880579999683505, "peak_bytes": 319946752, "ok": true, "absmax": 0.125, "corr": {"ok": true, "rtol": 0.02, "atol": 0.02, "absmax": 0.125, "mae": 0.000362396240234375, "mse": 2.8014183044433594e-06, "ref": "sdpa_math_fp32"}, "err": null}
flash_attn/impls/cells/benchmark.py CHANGED
@@ -4,6 +4,7 @@
4
  # "numpy",
5
  # "torch==2.8.0",
6
  # "kernels-benchmark-tools",
 
7
  # ]
8
  #
9
  # [tool.uv.sources]
@@ -12,20 +13,19 @@
12
  import torch
13
  import sys
14
  from kernels_benchmark_tools import KernelTypeEnum, run_benchmark
 
15
 
 
 
16
 
17
- def torch_mem_eff(q, k, v):
18
- qt, kt, vt = (x.transpose(1, 2).contiguous() for x in (q, k, v))
19
- with torch.nn.attention.sdpa_kernel(
20
- torch.nn.attention.SDPBackend.EFFICIENT_ATTENTION
21
- ):
22
- o = torch.nn.functional.scaled_dot_product_attention(qt, kt, vt)
23
- return o.transpose(1, 2).contiguous()
24
 
25
 
26
  run_benchmark(
27
  kernel_type=KernelTypeEnum.ATTENTION,
28
- impl_name="torch_mem_eff",
29
- impl_tags={"family": "torch-sdpa", "backend": "EFFICIENT", "compile": "none"},
30
- impl_func=torch_mem_eff,
31
  )
 
4
  # "numpy",
5
  # "torch==2.8.0",
6
  # "kernels-benchmark-tools",
7
+ # "kernels",
8
  # ]
9
  #
10
  # [tool.uv.sources]
 
13
  import torch
14
  import sys
15
  from kernels_benchmark_tools import KernelTypeEnum, run_benchmark
16
+ from kernels import get_kernel
17
 
18
+ # Load the flash attention 3 kernel
19
+ hf_kernels_flash_attn3 = get_kernel("kernels-community/flash-attn3")
20
 
21
+
22
+ def hf_flash_attention3(query, key, value):
23
+ return hf_kernels_flash_attn3.flash_attn_func(query, key, value, causal=False)[0]
 
 
 
 
24
 
25
 
26
  run_benchmark(
27
  kernel_type=KernelTypeEnum.ATTENTION,
28
+ impl_name="hf_kernels_flash_attn3",
29
+ impl_tags={"family": "hf-kernels", "backend": "flash-attn3", "compile": "none"},
30
+ impl_func=hf_flash_attention3,
31
  )
flash_attn/impls/flash_attention.html CHANGED
The diff for this file is too large to render. See raw diff
 
flash_attn/impls/hf_kernels_flash_attn.html CHANGED
The diff for this file is too large to render. See raw diff
 
flash_attn/impls/hf_kernels_flash_attn3.html CHANGED
The diff for this file is too large to render. See raw diff
 
flash_attn/impls/mem_efficient_attention.html CHANGED
The diff for this file is too large to render. See raw diff
 
flash_attn/impls/sage_attention.html CHANGED
@@ -4,6 +4,11 @@
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>sage_attention</title>
 
 
 
 
 
7
  <script>
8
  // Iframe-friendly navigation router
9
  (function() {
@@ -87,1320 +92,1542 @@
87
  </script>
88
  <style>
89
  :root[data-theme="light"] {
90
- --bg-primary: #ffffff;
91
- --bg-secondary: #f6f8fa;
92
- --bg-tertiary: #f8f9fa;
93
- --bg-code: #f8f9fa;
94
- --bg-error: #fdf2f2;
95
- --bg-artifact: #e6f3ff;
96
- --bg-artifact-hover: #d0e7ff;
97
-
98
- --text-primary: #333;
99
- --text-secondary: #656d76;
100
- --text-error: #c53030;
101
- --text-link: #0969da;
102
-
103
- --border-primary: #e1e5e9;
104
- --border-error: #e53e3e;
105
- --border-cell-failed: #d73a49;
106
-
107
- --shadow: rgba(0, 0, 0, 0.1);
108
- }
109
-
110
- :root[data-theme="dark"] {
111
- --bg-primary: #0a0a0a;
112
- --bg-secondary: #121212;
113
- --bg-tertiary: #181818;
114
- --bg-code: #0d0d0d;
115
- --bg-error: #1a0f0f;
116
- --bg-artifact: #151515;
117
- --bg-artifact-hover: #1a1a1a;
118
-
119
- --text-primary: #e0e0e0;
120
- --text-secondary: #888888;
121
- --text-error: #ff6b6b;
122
- --text-link: #64b5f6;
123
-
124
- --border-primary: #2a2a2a;
125
- --border-error: #ff6b6b;
126
- --border-cell-failed: #ff6b6b;
127
-
128
- --shadow: rgba(255, 255, 255, 0.05);
129
- }
130
- /* Monocolor UI theme: black/white background, all text/borders single blue */
131
- :root[data-ui="monocolor"] { --mono-color: #0a66ff; }
132
- :root[data-ui="monocolor"][data-theme="light"] {
133
- --bg-primary: #ffffff;
134
- }
135
- :root[data-ui="monocolor"][data-theme="dark"] {
136
- --bg-primary: #000000;
137
- }
138
- :root[data-ui="monocolor"] {
139
- --bg-secondary: var(--bg-primary);
140
- --bg-tertiary: var(--bg-primary);
141
- --bg-code: var(--bg-primary);
142
- --bg-error: var(--bg-primary);
143
- --bg-artifact: var(--bg-primary);
144
- --bg-artifact-hover: var(--bg-primary);
145
-
146
- --text-primary: var(--mono-color);
147
- --text-secondary: var(--mono-color);
148
- --text-error: var(--mono-color);
149
- --text-link: var(--mono-color);
150
-
151
- --border-primary: var(--mono-color);
152
- --border-error: var(--mono-color);
153
- --border-cell-failed: var(--mono-color);
154
-
155
- --shadow: none;
156
- }
157
- :root[data-ui="monocolor"] a { color: var(--mono-color); }
158
- :root[data-ui="monocolor"] .menu-button,
159
- :root[data-ui="monocolor"] .theme-toggle,
160
- :root[data-ui="monocolor"] .reset-toggle,
161
- :root[data-ui="monocolor"] .back-button { background: var(--bg-primary); color: var(--mono-color); border-color: var(--mono-color); }
162
- :root[data-ui="monocolor"] .menu-button:hover,
163
- :root[data-ui="monocolor"] .theme-toggle:hover,
164
- :root[data-ui="monocolor"] .reset-toggle:hover,
165
- :root[data-ui="monocolor"] .back-button:hover { background: var(--bg-primary); color: var(--mono-color); border-color: var(--mono-color); }
166
- :root[data-ui="monocolor"] .menu-dropdown { background: var(--bg-primary); border-color: var(--mono-color); box-shadow: none; }
167
- :root[data-ui="monocolor"] .menu-item { color: var(--mono-color); border-bottom-color: var(--mono-color); }
168
- :root[data-ui="monocolor"] .system-info { background: var(--bg-primary); border-color: var(--mono-color); }
169
- :root[data-ui="monocolor"] .cell { border-color: var(--mono-color); background: var(--bg-primary); }
170
- :root[data-ui="monocolor"] .cell-header { background: var(--bg-primary); border-bottom-color: var(--mono-color); }
171
- :root[data-ui="monocolor"] .artifact { background: var(--bg-primary); border-color: var(--mono-color); color: var(--mono-color); }
172
- :root[data-ui="monocolor"] .artifact:hover { background: var(--bg-primary); }
173
- :root[data-ui="monocolor"] .artifact-preview img,
174
- :root[data-ui="monocolor"] .artifact-preview svg { border-color: var(--mono-color); }
175
- :root[data-ui="monocolor"] .status-widget { background: var(--bg-primary); border-color: var(--mono-color); color: var(--mono-color); }
176
- :root[data-ui="monocolor"] .minimap,
177
- :root[data-ui="monocolor"] .file-explorer,
178
- :root[data-ui="monocolor"] .tools-widget {
179
- background: var(--bg-primary);
180
- border-color: var(--mono-color);
181
- color: var(--mono-color);
182
- }
183
- :root[data-ui="monocolor"] .cell-code {
184
- background: var(--bg-primary);
185
- border-bottom-color: var(--mono-color);
186
- }
187
- :root[data-ui="monocolor"] .tools-title,
188
- :root[data-ui="monocolor"] .file-explorer-section-title,
189
- :root[data-ui="monocolor"] .minimap-title { color: var(--mono-color); border-bottom-color: var(--mono-color); }
190
- :root[data-ui="monocolor"] .tool-button { background: var(--bg-primary); border-color: var(--mono-color); color: var(--mono-color); }
191
- :root[data-ui="monocolor"] .tool-button.active { border-color: var(--mono-color); }
192
- :root[data-ui="monocolor"] .file-explorer-item,
193
- :root[data-ui="monocolor"] .minimap-item { color: var(--mono-color); }
194
- /* Force Pygments code to mono blue on mono bg */
195
- :root[data-ui="monocolor"] .highlight { background: var(--bg-primary) !important; color: var(--mono-color) !important; }
196
- :root[data-ui="monocolor"] .highlight *,
197
- :root[data-ui="monocolor"] .highlight .hll { color: var(--mono-color) !important; background: transparent !important; border-color: var(--mono-color) !important; }
198
- /* Default code font + metrics (overridable via frontmatter) */
199
- :root { --code-font-size: 0.95rem; --code-line-height: 1.5; --code-pad-y: 0.75rem; }
200
- /* Minimal UI theme overrides base variables for a flatter, 90s look */
201
- :root[data-ui="none"] {
202
- --bg-primary: #ffffff;
203
- --bg-secondary: transparent;
204
- --bg-tertiary: transparent;
205
- --bg-code: #f9f9f9;
206
- --bg-error: #fff0f0;
207
- --bg-artifact: #f0f7ff;
208
- --bg-artifact-hover: #e5f1ff;
209
-
210
- --text-primary: #000000;
211
- --text-secondary: #222222;
212
- --text-error: #a00000;
213
- --text-link: #0000ee;
214
-
215
- --border-primary: #cccccc;
216
- --border-error: #cc0000;
217
- --border-cell-failed: #cc0000;
218
-
219
- --shadow: none;
220
- }
221
- html {
222
- overscroll-behavior: none;
223
- }
224
- body {
225
- font-family: 'Cascadia Mono', 'Cascadia Code', 'JetBrains Mono', 'SF Mono', Monaco, 'Consolas', monospace;
226
- line-height: 1.4;
227
- max-width: 1000px;
228
- margin: 0 auto;
229
- padding: 15px;
230
- color: var(--text-primary);
231
- background: var(--bg-primary);
232
- transition: background-color 0.2s ease, color 0.2s ease;
233
- overscroll-behavior: none;
234
- }
235
- /* Minimal "none" UI theme overrides */
236
- :root[data-ui="none"] body {
237
- font-family: 'Times New Roman', Times, serif;
238
- line-height: 1.5;
239
- max-width: 860px;
240
- padding: 12px;
241
- background: #ffffff;
242
- color: #000000;
243
- transition: none;
244
- }
245
-
246
- /* Two panel layout removed */
247
-
248
- .controls {
249
- position: fixed;
250
- top: 20px;
251
- right: 20px;
252
- display: flex;
253
- flex-direction: column;
254
- align-items: flex-end;
255
- gap: 0.25rem;
256
- z-index: 1000;
257
- }
258
- .controls-buttons { display: flex; gap: 0.5rem; }
259
-
260
- .menu-button {
261
- position: relative;
262
- background: var(--bg-secondary);
263
- border: 1px solid var(--border-primary);
264
- padding: 8px 12px;
265
- border-radius: 2px;
266
- color: var(--text-secondary);
267
- cursor: pointer;
268
- font-family: inherit;
269
- font-size: 0.9rem;
270
- user-select: none;
271
- }
272
- /* Keep default control styling when widgets are enabled, even in minimal UI */
273
- :root[data-ui="none"][data-widgets="on"] .menu-button,
274
- :root[data-ui="none"][data-widgets="on"] .theme-toggle,
275
- :root[data-ui="none"][data-widgets="on"] .reset-toggle,
276
- :root[data-ui="none"][data-widgets="on"] .back-button {
277
- background: #f6f6f6;
278
- border: 1px solid #cccccc;
279
- color: #222222;
280
- }
281
-
282
- .menu-button:hover {
283
- color: var(--text-primary);
284
- background: var(--bg-tertiary);
285
- }
286
- /* Controls state indicator (top-right) */
287
- /* Status widget (bottom-right) */
288
- .status-widget {
289
- position: fixed;
290
- right: 20px;
291
- bottom: 20px;
292
- width: auto;
293
- max-width: 260px;
294
- background: var(--bg-secondary);
295
- border: 1px solid var(--border-primary);
296
- border-radius: 2px;
297
- padding: 6px 8px;
298
- font-size: 0.8rem;
299
- color: var(--text-secondary);
300
- z-index: 100;
301
- }
302
- .status-widget strong { color: var(--text-primary); }
303
- :root[data-ui="none"][data-widgets="on"] .status-widget { background: #f6f6f6; border-color: #ccc; color: #222; }
304
- :root[data-ui="none"][data-widgets="on"] .menu-button:hover,
305
- :root[data-ui="none"][data-widgets="on"] .theme-toggle:hover,
306
- :root[data-ui="none"][data-widgets="on"] .reset-toggle:hover,
307
- :root[data-ui="none"][data-widgets="on"] .back-button:hover {
308
- background: #ededed;
309
- border-color: #bbbbbb;
310
- color: #000000;
311
- }
312
-
313
- .menu-dropdown {
314
- position: absolute;
315
- top: 100%;
316
- right: 0;
317
- background: var(--bg-secondary);
318
- border: 1px solid var(--border-primary);
319
- border-radius: 4px;
320
- box-shadow: 0 4px 12px var(--shadow);
321
- min-width: 160px;
322
- opacity: 0;
323
- visibility: hidden;
324
- transform: translateY(-8px);
325
- transition: all 0.2s ease;
326
- z-index: 1001;
327
- margin-top: 4px;
328
- }
329
- :root[data-ui="none"][data-widgets="on"] .menu-dropdown { background: #ffffff; border: 1px solid #cccccc; box-shadow: none; }
330
-
331
- .menu-button.active .menu-dropdown {
332
- opacity: 1;
333
- visibility: visible;
334
- transform: translateY(0);
335
- }
336
-
337
- .menu-item {
338
- display: block;
339
- padding: 8px 12px;
340
- color: var(--text-secondary);
341
- text-decoration: none;
342
- font-size: 0.85rem;
343
- border-bottom: 1px solid var(--border-primary);
344
- cursor: pointer;
345
- }
346
- :root[data-ui="none"] .menu-item { color: #000; border-bottom: 1px solid #eee; }
347
-
348
- .menu-item:last-child {
349
- border-bottom: none;
350
- }
351
-
352
- .menu-item:hover {
353
- background: var(--bg-tertiary);
354
- color: var(--text-primary);
355
- }
356
-
357
- .menu-checkbox {
358
- display: inline-block;
359
- width: 16px;
360
- font-family: monospace;
361
- color: var(--text-link);
362
- }
363
-
364
- .theme-toggle,
365
- .reset-toggle,
366
- .back-button {
367
- background: var(--bg-secondary);
368
- border: 1px solid var(--border-primary);
369
- padding: 8px 12px;
370
- border-radius: 4px;
371
- color: var(--text-secondary);
372
- cursor: pointer;
373
- font-family: inherit;
374
- font-size: 0.9rem;
375
- user-select: none;
376
- }
377
-
378
- .back-button {
379
- text-decoration: none;
380
- display: inline-block;
381
- }
382
-
383
- .theme-toggle:hover,
384
- .reset-toggle:hover,
385
- .back-button:hover {
386
- color: var(--text-primary);
387
- background: var(--bg-tertiary);
388
- }
389
-
390
- .system-info {
391
- background: var(--bg-secondary);
392
- border: 1px solid var(--border-primary);
393
- border-radius: 4px;
394
- padding: 8px 12px;
395
- margin-bottom: 16px;
396
- font-size: 0.85em;
397
- color: var(--text-secondary);
398
- }
399
-
400
- .system-info-header {
401
- font-weight: 600;
402
- color: var(--text-primary);
403
- margin-bottom: 2px;
404
- }
405
-
406
- .system-info-content {
407
- font-family: monospace;
408
- }
409
-
410
- .theme-toggle, .reset-toggle {
411
- background: var(--bg-secondary);
412
- border: 1px solid var(--border-primary);
413
- border-radius: 2px;
414
- /* padding: 0.4rem 0.6rem; */
415
- cursor: pointer;
416
- font-family: inherit;
417
- font-size: 0.8rem;
418
- color: var(--text-secondary);
419
- user-select: none;
420
- transition: all 0.2s ease;
421
- text-transform: lowercase;
422
- letter-spacing: 0;
423
- }
424
-
425
- .theme-toggle:hover, .reset-toggle:hover {
426
- background: var(--bg-tertiary);
427
- border-color: var(--text-secondary);
428
- color: var(--text-primary);
429
- }
430
-
431
- .minimap {
432
- position: fixed;
433
- bottom: 20px;
434
- right: 20px;
435
- width: 220px;
436
- max-height: 400px;
437
- background: var(--bg-secondary);
438
- border: 1px solid var(--border-primary);
439
- border-radius: 2px;
440
- padding: 0.5rem;
441
- font-size: 0.7rem;
442
- overflow-y: auto;
443
- z-index: 100;
444
- opacity: 0.9;
445
- transition: opacity 0.2s ease;
446
- }
447
- /* Hide widgets and controls when disabled via frontmatter */
448
- :root[data-widgets="off"] .controls,
449
- :root[data-widgets="off"] .minimap,
450
- :root[data-widgets="off"] .file-explorer,
451
- :root[data-widgets="off"] .tools-widget,
452
- :root[data-widgets="off"] .status-widget { display: none !important; }
453
-
454
- .file-explorer {
455
- position: fixed;
456
- bottom: 20px; /* default; JS will stack */
457
- right: 20px;
458
- left: auto;
459
- top: auto;
460
- width: 220px;
461
- max-height: 400px;
462
- background: var(--bg-secondary);
463
- border: 1px solid var(--border-primary);
464
- border-radius: 2px;
465
- padding: 0.5rem;
466
- font-size: 0.7rem;
467
- overflow-y: auto;
468
- z-index: 100;
469
- opacity: 0.9;
470
- transition: opacity 0.2s ease;
471
- }
472
-
473
- /* Drawing overlay */
474
- .draw-overlay {
475
- position: fixed;
476
- top: 0;
477
- left: 0;
478
- width: 100vw;
479
- height: 100vh;
480
- z-index: 80; /* under widgets (100) and controls (1000) */
481
- display: block;
482
- pointer-events: none; /* enabled only when a tool is active */
483
- }
484
-
485
- /* Tools widget */
486
- .tools-widget {
487
- position: fixed;
488
- bottom: 20px; /* default; JS will stack */
489
- right: 20px;
490
- left: auto;
491
- top: auto;
492
- width: 220px;
493
- background: var(--bg-secondary);
494
- border: 1px solid var(--border-primary);
495
- border-radius: 2px;
496
- padding: 0.5rem;
497
- font-size: 0.7rem;
498
- z-index: 100;
499
- opacity: 0.95;
500
- }
501
- .tools-title {
502
- font-weight: bold;
503
- color: var(--text-secondary);
504
- margin-bottom: 0.5rem;
505
- padding-bottom: 0.25rem;
506
- border-bottom: 1px solid var(--border-primary);
507
- cursor: grab;
508
- user-select: none;
509
- }
510
- .tools-row { display: flex; gap: 0.4rem; flex-wrap: wrap; }
511
- .tool-button {
512
- background: var(--bg-tertiary);
513
- border: 1px solid var(--border-primary);
514
- border-radius: 2px;
515
- padding: 0.25rem 0.4rem;
516
- cursor: pointer;
517
- color: var(--text-secondary);
518
- font-family: inherit;
519
- font-size: 0.75rem;
520
- user-select: none;
521
- }
522
- .tool-button:hover { color: var(--text-primary); }
523
- .tool-button.active { color: var(--text-primary); border-color: var(--text-secondary); background: var(--bg-secondary); }
524
-
525
- .minimap:hover, .file-explorer:hover {
526
- opacity: 1;
527
- }
528
-
529
- .minimap-title {
530
- font-weight: bold;
531
- color: var(--text-secondary);
532
- margin-bottom: 0.5rem;
533
- padding-bottom: 0.25rem;
534
- border-bottom: 1px solid var(--border-primary);
535
- cursor: grab; /* drag handle */
536
- user-select: none;
537
- }
538
-
539
- .minimap-item {
540
- display: block;
541
- color: var(--text-secondary);
542
- text-decoration: none;
543
- padding: 0.15rem 0;
544
- border-left: 2px solid transparent;
545
- padding-left: 0.5rem;
546
- transition: all 0.2s ease;
547
- cursor: pointer;
548
- }
549
-
550
- .minimap-item:hover {
551
- color: var(--text-primary);
552
- border-left-color: var(--text-secondary);
553
- }
554
-
555
- .minimap-item.active {
556
- color: var(--text-primary);
557
- border-left-color: var(--text-link);
558
- }
559
-
560
- .minimap-heading {
561
- font-weight: normal;
562
- }
563
-
564
- .minimap-heading.h1 { padding-left: 0.5rem; }
565
- .minimap-heading.h2 { padding-left: 1rem; }
566
- .minimap-heading.h3 { padding-left: 1.5rem; }
567
- .minimap-heading.h4 { padding-left: 2rem; }
568
- .minimap-heading.h5 { padding-left: 2.5rem; }
569
- .minimap-heading.h6 { padding-left: 3rem; }
570
-
571
- .minimap-cell {
572
- color: var(--text-link);
573
- opacity: 0.8;
574
- font-style: italic;
575
- }
576
-
577
- .minimap-cell:hover {
578
- opacity: 1;
579
- }
580
-
581
- .file-explorer-title {
582
- font-weight: bold;
583
- color: var(--text-secondary);
584
- margin-bottom: 0.5rem;
585
- padding-bottom: 0.25rem;
586
- border-bottom: 1px solid var(--border-primary);
587
- cursor: grab; /* drag handle */
588
- user-select: none;
589
- }
590
-
591
- .file-explorer-section {
592
- margin-bottom: 0.75rem;
593
- }
594
-
595
- .file-explorer-section-title {
596
- font-weight: bold;
597
- color: var(--text-secondary);
598
- font-size: 0.65rem;
599
- margin-bottom: 0.25rem;
600
- text-transform: uppercase;
601
- letter-spacing: 0.5px;
602
- }
603
-
604
- .file-explorer-item {
605
- display: block;
606
- color: var(--text-secondary);
607
- text-decoration: none;
608
- padding: 0.1rem 0;
609
- margin-left: 0.5rem;
610
- transition: color 0.2s ease;
611
- cursor: pointer;
612
- font-family: monospace;
613
- }
614
-
615
- .file-explorer-item:hover {
616
- color: var(--text-primary);
617
- }
618
-
619
- .file-explorer-item.script {
620
- color: var(--text-link);
621
- }
622
-
623
- .file-explorer-item.artifact {
624
- color: var(--text-secondary);
625
- opacity: 0.8;
626
- }
627
-
628
-
629
- /* Hide widgets on smaller screens */
630
- @media (max-width: 768px) {
631
- .minimap, .file-explorer, .tools-widget {
632
- display: none;
633
- }
634
- }
635
-
636
- .cell {
637
- margin: 1rem 0;
638
- border: 1px solid var(--border-primary);
639
- border-radius: 2px;
640
- overflow: hidden;
641
- background: var(--bg-secondary);
642
- }
643
- :root[data-ui="none"] .cell { margin: 1em 0; border: none; background: transparent; }
644
- .cell-header {
645
- background: var(--bg-secondary);
646
- padding: 0.5rem 1rem;
647
- border-bottom: 1px solid var(--border-primary);
648
- font-family: inherit;
649
- font-size: 0.85rem;
650
- }
651
- :root[data-ui="none"] .cell-header { background: transparent; border: none; padding: 0; font-weight: bold; }
652
- :root[data-ui="none"] .cell-content { padding: 0; }
653
- :root[data-ui="none"] .copy-button,
654
- :root[data-ui="none"] .collapse-indicators,
655
- :root[data-ui="none"] .cell-meta,
656
- :root[data-ui="none"] .cell-outputs-header { display: none !important; }
657
- :root[data-ui="none"] pre, :root[data-ui="none"] code { font-family: Menlo, Monaco, 'Courier New', monospace; }
658
- :root[data-ui="none"] .code-content pre { background: #f9f9f9; border: 1px solid #ddd; padding: 8px; }
659
- :root[data-ui="none"] .output { background: transparent; border: none; padding: 0.25em 0; }
660
- color: var(--text-secondary);
661
- cursor: pointer;
662
- user-select: none;
663
- transition: background-color 0.2s ease;
664
- }
665
- .cell-header:hover {
666
- background: var(--bg-tertiary);
667
- }
668
- .collapse-indicators {
669
- color: var(--text-secondary);
670
- font-size: 0.8rem;
671
- opacity: 0.7;
672
- }
673
- .collapse-indicators span:hover {
674
- color: var(--text-primary);
675
- opacity: 1;
676
- }
677
- .cell-code {
678
- display: block;
679
- background: var(--bg-code);
680
- }
681
- .cell-code.collapsed {
682
- display: none;
683
- }
684
- .cell-code pre {
685
- margin: 0;
686
- padding: 0.75rem;
687
- background: var(--bg-code);
688
- overflow-x: auto;
689
- color: var(--text-primary);
690
- }
691
- .cell-output {
692
- padding: 0.75rem;
693
- /* background: var(--bg-primary); */
694
- background: var(--bg-secondary);
695
- }
696
- .cell-output.collapsed {
697
- display: none;
698
- }
699
- .cell-stdout {
700
- background: var(--bg-tertiary);
701
- padding: 0.75rem;
702
- border-radius: 1px;
703
- /* margin: 0.25rem 0; */
704
- font-family: inherit;
705
- font-size: 0.9rem;
706
- white-space: pre-wrap;
707
- color: var(--text-primary);
708
- }
709
-
710
- .cell-stdout {
711
- background: var(--bg-tertiary);
712
- padding: 0.75rem;
713
- border-radius: 1px;
714
- font-family: inherit;
715
- font-size: 0.9rem;
716
- color: var(--text-primary);
717
-
718
- /* key bits */
719
- overflow: auto; /* show scrollbars when needed */
720
- max-width: 100%; /* respects whatever layout width you give it */
721
- }
722
-
723
- .cell-stdout .stdout-text {
724
- margin: 0; /* reset pre default margin */
725
- white-space: pre; /* keep line breaks, NO wrapping */
726
- display: inline-block; /* shrink-to-content */
727
- min-width: max-content; /* allow very long lines to define intrinsic width */
728
- font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
729
- tab-size: 2;
730
- }
731
-
732
- .cell-stderr {
733
- background: var(--bg-error);
734
- border-left: 2px solid var(--border-error);
735
- padding: 1rem;
736
- margin: 0.5rem 0;
737
- font-family: inherit;
738
- font-size: 0.9rem;
739
- color: var(--text-error);
740
- white-space: pre-wrap;
741
- }
742
- .uv-install-logs {
743
- margin: 0.5rem 0;
744
- }
745
- .uv-logs-header {
746
- cursor: pointer;
747
- padding: 0.75rem;
748
- border-left: 3px solid var(--border-color);
749
- font-family: inherit;
750
- font-size: 0.85rem;
751
- color: var(--text-secondary);
752
- user-select: none;
753
- }
754
- .uv-logs-content {
755
- background: var(--bg-secondary);
756
- padding: 1rem;
757
- border-left: 3px solid var(--border-color);
758
- white-space: pre-wrap;
759
- font-family: monospace;
760
- font-size: 0.85rem;
761
- color: var(--text-secondary);
762
- overflow-x: auto;
763
- }
764
- .cell-artifacts {
765
- margin: 1rem 0;
766
- }
767
- .cell-artifacts h4 {
768
- margin: 0 0 0.5rem 0;
769
- color: var(--text-secondary);
770
- font-size: 0.9rem;
771
- }
772
- .artifact {
773
- display: inline-block;
774
- background: var(--bg-artifact);
775
- padding: 0.25rem 0.5rem;
776
- border-radius: 1px;
777
- margin: 0.25rem 0.5rem 0.25rem 0;
778
- font-family: inherit;
779
- font-size: 0.8rem;
780
- color: var(--text-link);
781
- text-decoration: none;
782
- transition: background-color 0.2s ease;
783
- border: 1px solid var(--border-primary);
784
- }
785
- .artifact:hover {
786
- background: var(--bg-artifact-hover);
787
- }
788
- .artifact-preview {
789
- margin-top: 1rem;
790
- }
791
- .artifact-preview img {
792
- max-width: 100%;
793
- height: auto;
794
- border: 1px solid var(--border-primary);
795
- border-radius: 1px;
796
- }
797
- .artifact-preview svg {
798
- max-width: 100%;
799
- height: auto;
800
- border: 1px solid var(--border-primary);
801
- border-radius: 1px;
802
- display: block;
803
- }
804
- /* Style SVG text elements */
805
- .artifact-preview svg g {
806
- fill: var(--text-primary) !important;
807
- }
808
- /* Auto-theme SVG elements */
809
- .artifact-preview svg {
810
- background: transparent;
811
- }
812
- /* Invert SVG images in dark mode */
813
- :root[data-theme="dark"] .artifact-preview img[src$=".svg"] {
814
- filter: invert(0.9) hue-rotate(180deg);
815
- }
816
- /* Keep SVG images readable in monocolor mode */
817
- :root[data-ui="monocolor"] .artifact-preview img[src$=".svg"] {
818
- filter: none;
819
- }
820
- /* CSV table styling */
821
- .artifact-csv {
822
- margin-top: 1rem;
823
- overflow-x: auto;
824
- }
825
- .csv-table {
826
- width: 100%;
827
- border-collapse: collapse;
828
- font-size: 0.9rem;
829
- background: var(--bg-secondary);
830
- border: 1px solid var(--border-primary);
831
- border-radius: 1px;
832
- }
833
- .csv-table th,
834
- .csv-table td {
835
- padding: 0.5rem 0.75rem;
836
- text-align: left;
837
- border: 1px solid var(--border-primary);
838
- }
839
- .csv-table th {
840
- background: var(--bg-tertiary);
841
- font-weight: 600;
842
- color: var(--text-primary);
843
- }
844
- .csv-table tbody tr:hover {
845
- background: var(--bg-artifact-hover);
846
- }
847
- .artifact-csv-error {
848
- margin-top: 1rem;
849
- padding: 1rem;
850
- background: var(--bg-error);
851
- color: var(--text-error);
852
- border: 1px solid var(--border-error);
853
- border-radius: 1px;
854
- }
855
- .cell-failed {
856
- border-color: var(--border-cell-failed);
857
- }
858
- .cell-failed .cell-header {
859
- background: var(--bg-error);
860
- color: var(--text-error);
861
- }
862
- .cell-commented {
863
- opacity: 0.6;
864
- border-style: dashed;
865
- }
866
- .cell-commented .cell-header {
867
- background: var(--bg-secondary);
868
- color: var(--text-secondary);
869
- font-style: italic;
870
- }
871
- .run-btn {
872
- background: var(--bg-tertiary);
873
- border: 1px solid var(--border-primary);
874
- padding: 2px 6px;
875
- border-radius: 2px;
876
- color: var(--text-secondary);
877
- cursor: pointer;
878
- font-size: 0.75em;
879
- font-family: inherit;
880
- margin-left: 4px;
881
- }
882
- .run-btn:hover {
883
- color: var(--text-primary);
884
- background: var(--bg-primary);
885
- }
886
- .run-btn:disabled {
887
- opacity: 0.6;
888
- cursor: not-allowed;
889
- }
890
- .copy-btn {
891
- background: var(--bg-tertiary);
892
- border: 1px solid var(--border-primary);
893
- padding: 2px 6px;
894
- border-radius: 2px;
895
- color: var(--text-secondary);
896
- cursor: pointer;
897
- font-size: 0.75em;
898
- font-family: inherit;
899
- margin-left: 4px;
900
- }
901
- .copy-btn:hover {
902
- color: var(--text-primary);
903
- background: var(--bg-primary);
904
- }
905
- .copy-btn:disabled {
906
- opacity: 0.6;
907
- cursor: not-allowed;
908
- }
909
- .copy-btn.copied {
910
- color: #4caf50;
911
- background: var(--bg-primary);
912
- border-color: #4caf50;
913
- transition: all 0.2s ease;
914
- }
915
- .raw-btn {
916
- background: var(--bg-tertiary);
917
- border: 1px solid var(--border-primary);
918
- padding: 2px 6px;
919
- border-radius: 2px;
920
- color: var(--text-secondary);
921
- cursor: pointer;
922
- font-size: 0.75em;
923
- font-family: inherit;
924
- margin-left: 4px;
925
- text-decoration: none;
926
- display: inline-block;
927
- }
928
- .raw-btn:hover {
929
- color: var(--text-primary);
930
- background: var(--bg-primary);
931
- text-decoration: none;
932
- }
933
- .github-btn {
934
- background: var(--bg-tertiary);
935
- border: 1px solid var(--border-primary);
936
- padding: 2px 6px;
937
- border-radius: 2px;
938
- color: var(--text-secondary);
939
- cursor: pointer;
940
- font-size: 0.75em;
941
- font-family: inherit;
942
- margin-left: 4px;
943
- text-decoration: none;
944
- display: inline-block;
945
- }
946
- .github-btn:hover {
947
- color: var(--text-primary);
948
- background: var(--bg-primary);
949
- text-decoration: none;
950
- }
951
- .hf-btn {
952
- background: var(--bg-tertiary);
953
- border: 1px solid var(--border-primary);
954
- padding: 2px 6px;
955
- border-radius: 2px;
956
- color: var(--text-secondary);
957
- cursor: pointer;
958
- font-size: 0.75em;
959
- font-family: inherit;
960
- margin-left: 4px;
961
- text-decoration: none;
962
- display: inline-block;
963
- }
964
- .hf-btn:hover {
965
- color: var(--text-primary);
966
- background: var(--bg-primary);
967
- text-decoration: none;
968
- }
969
- .output-stale {
970
- opacity: 0.5;
971
- position: relative;
972
- }
973
- .output-stale::after {
974
- content: '⏳ updating...';
975
- position: absolute;
976
- top: 8px;
977
- right: 8px;
978
- background: var(--bg-secondary);
979
- padding: 4px 8px;
980
- border-radius: 2px;
981
- font-size: 0.75em;
982
- color: var(--text-secondary);
983
- border: 1px solid var(--border-primary);
984
- }
985
- h1, h2, h3, h4, h5, h6 {
986
- margin-top: 1.5rem;
987
- margin-bottom: 0.75rem;
988
- color: var(--text-primary);
989
- }
990
- h1 {
991
- margin-top: 0;
992
- margin-bottom: 1rem;
993
- }
994
- p {
995
- margin: 0.75rem 0;
996
- color: var(--text-primary);
997
- }
998
- a {
999
- color: var(--text-link);
1000
- }
1001
- img {
1002
- max-width: 100%;
1003
- height: auto;
1004
- border-radius: 1px;
1005
- box-shadow: none;
1006
- }
1007
- pre, code {
1008
- font-family: 'Cascadia Mono', 'Cascadia Code', 'JetBrains Mono', 'SF Mono', Monaco, 'Consolas', monospace;
1009
- font-size: var(--code-font-size);
1010
- }
1011
- .code-wrap { position: relative; }
1012
- .code-line-highlight { display: none; position: absolute; left: 0; right: 0; height: 1.5em; background: rgba(255, 235, 170, 0.35); pointer-events: none; border-left: 3px solid #f4c542; }
1013
- .line-number { cursor: pointer; text-decoration: none; color: var(--text-secondary); padding: 0 0.25rem; }
1014
- .line-number.selected { background: rgba(255, 235, 170, 0.4); color: var(--text-primary); }
1015
-
1016
- /* Line numbers */
1017
- .highlight-with-lines {
1018
- display: flex;
1019
- }
1020
- .line-numbers {
1021
- background: var(--bg-tertiary);
1022
- padding: var(--code-pad-y) 0.5rem;
1023
- font-family: 'Cascadia Mono', 'Cascadia Code', 'JetBrains Mono', 'SF Mono', Monaco, 'Consolas', monospace;
1024
- font-size: var(--code-font-size);
1025
- line-height: var(--code-line-height);
1026
- color: var(--text-secondary);
1027
- user-select: none;
1028
- text-align: right;
1029
- border-right: 1px solid var(--border-primary);
1030
- }
1031
- .line-numbers .line-number {
1032
- display: block;
1033
- line-height: var(--code-line-height);
1034
- }
1035
- .highlight-with-lines .highlight {
1036
- flex: 1;
1037
- }
1038
- .highlight .hll { background-color: transparent; } /* don't conflict with our highlight */
1039
- .highlight pre {
1040
- white-space: pre;
1041
- margin: 0;
1042
- padding: var(--code-pad-y) 0.75rem;
1043
- line-height: var(--code-line-height);
1044
- }
1045
-
1046
- /* Collapsed code styling */
1047
- .cell-code.collapsed {
1048
- display: none;
1049
- }
1050
- .cell-code.expanded {
1051
- display: block;
1052
- }
1053
-
1054
- .cell-code {
1055
- display: block;
1056
- border-bottom: 1px solid var(--border-primary);
1057
- }
1058
-
1059
-
1060
- pre { line-height: 125%; }
1061
- td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
1062
- span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
1063
- td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
1064
- span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
1065
- [data-theme="light"] .highlight .hll { background-color: #ffffcc }
1066
- [data-theme="light"] .highlight { background: #f8f8f8; }
1067
- [data-theme="light"] .highlight .c { color: #3D7B7B; font-style: italic } /* Comment */
1068
- [data-theme="light"] .highlight .err { border: 1px solid #F00 } /* Error */
1069
- [data-theme="light"] .highlight .k { color: #008000; font-weight: bold } /* Keyword */
1070
- [data-theme="light"] .highlight .o { color: #666 } /* Operator */
1071
- [data-theme="light"] .highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */
1072
- [data-theme="light"] .highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */
1073
- [data-theme="light"] .highlight .cp { color: #9C6500 } /* Comment.Preproc */
1074
- [data-theme="light"] .highlight .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */
1075
- [data-theme="light"] .highlight .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */
1076
- [data-theme="light"] .highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */
1077
- [data-theme="light"] .highlight .gd { color: #A00000 } /* Generic.Deleted */
1078
- [data-theme="light"] .highlight .ge { font-style: italic } /* Generic.Emph */
1079
- [data-theme="light"] .highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
1080
- [data-theme="light"] .highlight .gr { color: #E40000 } /* Generic.Error */
1081
- [data-theme="light"] .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
1082
- [data-theme="light"] .highlight .gi { color: #008400 } /* Generic.Inserted */
1083
- [data-theme="light"] .highlight .go { color: #717171 } /* Generic.Output */
1084
- [data-theme="light"] .highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
1085
- [data-theme="light"] .highlight .gs { font-weight: bold } /* Generic.Strong */
1086
- [data-theme="light"] .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
1087
- [data-theme="light"] .highlight .gt { color: #04D } /* Generic.Traceback */
1088
- [data-theme="light"] .highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
1089
- [data-theme="light"] .highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
1090
- [data-theme="light"] .highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
1091
- [data-theme="light"] .highlight .kp { color: #008000 } /* Keyword.Pseudo */
1092
- [data-theme="light"] .highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
1093
- [data-theme="light"] .highlight .kt { color: #B00040 } /* Keyword.Type */
1094
- [data-theme="light"] .highlight .m { color: #666 } /* Literal.Number */
1095
- [data-theme="light"] .highlight .s { color: #BA2121 } /* Literal.String */
1096
- [data-theme="light"] .highlight .na { color: #687822 } /* Name.Attribute */
1097
- [data-theme="light"] .highlight .nb { color: #008000 } /* Name.Builtin */
1098
- [data-theme="light"] .highlight .nc { color: #00F; font-weight: bold } /* Name.Class */
1099
- [data-theme="light"] .highlight .no { color: #800 } /* Name.Constant */
1100
- [data-theme="light"] .highlight .nd { color: #A2F } /* Name.Decorator */
1101
- [data-theme="light"] .highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */
1102
- [data-theme="light"] .highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */
1103
- [data-theme="light"] .highlight .nf { color: #00F } /* Name.Function */
1104
- [data-theme="light"] .highlight .nl { color: #767600 } /* Name.Label */
1105
- [data-theme="light"] .highlight .nn { color: #00F; font-weight: bold } /* Name.Namespace */
1106
- [data-theme="light"] .highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
1107
- [data-theme="light"] .highlight .nv { color: #19177C } /* Name.Variable */
1108
- [data-theme="light"] .highlight .ow { color: #A2F; font-weight: bold } /* Operator.Word */
1109
- [data-theme="light"] .highlight .w { color: #BBB } /* Text.Whitespace */
1110
- [data-theme="light"] .highlight .mb { color: #666 } /* Literal.Number.Bin */
1111
- [data-theme="light"] .highlight .mf { color: #666 } /* Literal.Number.Float */
1112
- [data-theme="light"] .highlight .mh { color: #666 } /* Literal.Number.Hex */
1113
- [data-theme="light"] .highlight .mi { color: #666 } /* Literal.Number.Integer */
1114
- [data-theme="light"] .highlight .mo { color: #666 } /* Literal.Number.Oct */
1115
- [data-theme="light"] .highlight .sa { color: #BA2121 } /* Literal.String.Affix */
1116
- [data-theme="light"] .highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
1117
- [data-theme="light"] .highlight .sc { color: #BA2121 } /* Literal.String.Char */
1118
- [data-theme="light"] .highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */
1119
- [data-theme="light"] .highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
1120
- [data-theme="light"] .highlight .s2 { color: #BA2121 } /* Literal.String.Double */
1121
- [data-theme="light"] .highlight .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */
1122
- [data-theme="light"] .highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */
1123
- [data-theme="light"] .highlight .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */
1124
- [data-theme="light"] .highlight .sx { color: #008000 } /* Literal.String.Other */
1125
- [data-theme="light"] .highlight .sr { color: #A45A77 } /* Literal.String.Regex */
1126
- [data-theme="light"] .highlight .s1 { color: #BA2121 } /* Literal.String.Single */
1127
- [data-theme="light"] .highlight .ss { color: #19177C } /* Literal.String.Symbol */
1128
- [data-theme="light"] .highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
1129
- [data-theme="light"] .highlight .fm { color: #00F } /* Name.Function.Magic */
1130
- [data-theme="light"] .highlight .vc { color: #19177C } /* Name.Variable.Class */
1131
- [data-theme="light"] .highlight .vg { color: #19177C } /* Name.Variable.Global */
1132
- [data-theme="light"] .highlight .vi { color: #19177C } /* Name.Variable.Instance */
1133
- [data-theme="light"] .highlight .vm { color: #19177C } /* Name.Variable.Magic */
1134
- [data-theme="light"] .highlight .il { color: #666 } /* Literal.Number.Integer.Long */
1135
-
1136
- pre { line-height: 125%; }
1137
- td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
1138
- span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
1139
- td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
1140
- span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
1141
- [data-theme="dark"] .highlight .hll { background-color: #49483e }
1142
- [data-theme="dark"] .highlight { background: #272822; color: #F8F8F2 }
1143
- [data-theme="dark"] .highlight .c { color: #959077 } /* Comment */
1144
- [data-theme="dark"] .highlight .err { color: #ED007E; background-color: #1E0010 } /* Error */
1145
- [data-theme="dark"] .highlight .esc { color: #F8F8F2 } /* Escape */
1146
- [data-theme="dark"] .highlight .g { color: #F8F8F2 } /* Generic */
1147
- [data-theme="dark"] .highlight .k { color: #66D9EF } /* Keyword */
1148
- [data-theme="dark"] .highlight .l { color: #AE81FF } /* Literal */
1149
- [data-theme="dark"] .highlight .n { color: #F8F8F2 } /* Name */
1150
- [data-theme="dark"] .highlight .o { color: #FF4689 } /* Operator */
1151
- [data-theme="dark"] .highlight .x { color: #F8F8F2 } /* Other */
1152
- [data-theme="dark"] .highlight .p { color: #F8F8F2 } /* Punctuation */
1153
- [data-theme="dark"] .highlight .ch { color: #959077 } /* Comment.Hashbang */
1154
- [data-theme="dark"] .highlight .cm { color: #959077 } /* Comment.Multiline */
1155
- [data-theme="dark"] .highlight .cp { color: #959077 } /* Comment.Preproc */
1156
- [data-theme="dark"] .highlight .cpf { color: #959077 } /* Comment.PreprocFile */
1157
- [data-theme="dark"] .highlight .c1 { color: #959077 } /* Comment.Single */
1158
- [data-theme="dark"] .highlight .cs { color: #959077 } /* Comment.Special */
1159
- [data-theme="dark"] .highlight .gd { color: #FF4689 } /* Generic.Deleted */
1160
- [data-theme="dark"] .highlight .ge { color: #F8F8F2; font-style: italic } /* Generic.Emph */
1161
- [data-theme="dark"] .highlight .ges { color: #F8F8F2; font-weight: bold; font-style: italic } /* Generic.EmphStrong */
1162
- [data-theme="dark"] .highlight .gr { color: #F8F8F2 } /* Generic.Error */
1163
- [data-theme="dark"] .highlight .gh { color: #F8F8F2 } /* Generic.Heading */
1164
- [data-theme="dark"] .highlight .gi { color: #A6E22E } /* Generic.Inserted */
1165
- [data-theme="dark"] .highlight .go { color: #66D9EF } /* Generic.Output */
1166
- [data-theme="dark"] .highlight .gp { color: #FF4689; font-weight: bold } /* Generic.Prompt */
1167
- [data-theme="dark"] .highlight .gs { color: #F8F8F2; font-weight: bold } /* Generic.Strong */
1168
- [data-theme="dark"] .highlight .gu { color: #959077 } /* Generic.Subheading */
1169
- [data-theme="dark"] .highlight .gt { color: #F8F8F2 } /* Generic.Traceback */
1170
- [data-theme="dark"] .highlight .kc { color: #66D9EF } /* Keyword.Constant */
1171
- [data-theme="dark"] .highlight .kd { color: #66D9EF } /* Keyword.Declaration */
1172
- [data-theme="dark"] .highlight .kn { color: #FF4689 } /* Keyword.Namespace */
1173
- [data-theme="dark"] .highlight .kp { color: #66D9EF } /* Keyword.Pseudo */
1174
- [data-theme="dark"] .highlight .kr { color: #66D9EF } /* Keyword.Reserved */
1175
- [data-theme="dark"] .highlight .kt { color: #66D9EF } /* Keyword.Type */
1176
- [data-theme="dark"] .highlight .ld { color: #E6DB74 } /* Literal.Date */
1177
- [data-theme="dark"] .highlight .m { color: #AE81FF } /* Literal.Number */
1178
- [data-theme="dark"] .highlight .s { color: #E6DB74 } /* Literal.String */
1179
- [data-theme="dark"] .highlight .na { color: #A6E22E } /* Name.Attribute */
1180
- [data-theme="dark"] .highlight .nb { color: #F8F8F2 } /* Name.Builtin */
1181
- [data-theme="dark"] .highlight .nc { color: #A6E22E } /* Name.Class */
1182
- [data-theme="dark"] .highlight .no { color: #66D9EF } /* Name.Constant */
1183
- [data-theme="dark"] .highlight .nd { color: #A6E22E } /* Name.Decorator */
1184
- [data-theme="dark"] .highlight .ni { color: #F8F8F2 } /* Name.Entity */
1185
- [data-theme="dark"] .highlight .ne { color: #A6E22E } /* Name.Exception */
1186
- [data-theme="dark"] .highlight .nf { color: #A6E22E } /* Name.Function */
1187
- [data-theme="dark"] .highlight .nl { color: #F8F8F2 } /* Name.Label */
1188
- [data-theme="dark"] .highlight .nn { color: #F8F8F2 } /* Name.Namespace */
1189
- [data-theme="dark"] .highlight .nx { color: #A6E22E } /* Name.Other */
1190
- [data-theme="dark"] .highlight .py { color: #F8F8F2 } /* Name.Property */
1191
- [data-theme="dark"] .highlight .nt { color: #FF4689 } /* Name.Tag */
1192
- [data-theme="dark"] .highlight .nv { color: #F8F8F2 } /* Name.Variable */
1193
- [data-theme="dark"] .highlight .ow { color: #FF4689 } /* Operator.Word */
1194
- [data-theme="dark"] .highlight .pm { color: #F8F8F2 } /* Punctuation.Marker */
1195
- [data-theme="dark"] .highlight .w { color: #F8F8F2 } /* Text.Whitespace */
1196
- [data-theme="dark"] .highlight .mb { color: #AE81FF } /* Literal.Number.Bin */
1197
- [data-theme="dark"] .highlight .mf { color: #AE81FF } /* Literal.Number.Float */
1198
- [data-theme="dark"] .highlight .mh { color: #AE81FF } /* Literal.Number.Hex */
1199
- [data-theme="dark"] .highlight .mi { color: #AE81FF } /* Literal.Number.Integer */
1200
- [data-theme="dark"] .highlight .mo { color: #AE81FF } /* Literal.Number.Oct */
1201
- [data-theme="dark"] .highlight .sa { color: #E6DB74 } /* Literal.String.Affix */
1202
- [data-theme="dark"] .highlight .sb { color: #E6DB74 } /* Literal.String.Backtick */
1203
- [data-theme="dark"] .highlight .sc { color: #E6DB74 } /* Literal.String.Char */
1204
- [data-theme="dark"] .highlight .dl { color: #E6DB74 } /* Literal.String.Delimiter */
1205
- [data-theme="dark"] .highlight .sd { color: #E6DB74 } /* Literal.String.Doc */
1206
- [data-theme="dark"] .highlight .s2 { color: #E6DB74 } /* Literal.String.Double */
1207
- [data-theme="dark"] .highlight .se { color: #AE81FF } /* Literal.String.Escape */
1208
- [data-theme="dark"] .highlight .sh { color: #E6DB74 } /* Literal.String.Heredoc */
1209
- [data-theme="dark"] .highlight .si { color: #E6DB74 } /* Literal.String.Interpol */
1210
- [data-theme="dark"] .highlight .sx { color: #E6DB74 } /* Literal.String.Other */
1211
- [data-theme="dark"] .highlight .sr { color: #E6DB74 } /* Literal.String.Regex */
1212
- [data-theme="dark"] .highlight .s1 { color: #E6DB74 } /* Literal.String.Single */
1213
- [data-theme="dark"] .highlight .ss { color: #E6DB74 } /* Literal.String.Symbol */
1214
- [data-theme="dark"] .highlight .bp { color: #F8F8F2 } /* Name.Builtin.Pseudo */
1215
- [data-theme="dark"] .highlight .fm { color: #A6E22E } /* Name.Function.Magic */
1216
- [data-theme="dark"] .highlight .vc { color: #F8F8F2 } /* Name.Variable.Class */
1217
- [data-theme="dark"] .highlight .vg { color: #F8F8F2 } /* Name.Variable.Global */
1218
- [data-theme="dark"] .highlight .vi { color: #F8F8F2 } /* Name.Variable.Instance */
1219
- [data-theme="dark"] .highlight .vm { color: #F8F8F2 } /* Name.Variable.Magic */
1220
- [data-theme="dark"] .highlight .il { color: #AE81FF } /* Literal.Number.Integer.Long */
1221
-
1222
- /* Ensure our code metrics override Pygments defaults */
1223
- .highlight pre {
1224
- white-space: pre;
1225
- margin: 0;
1226
- padding: var(--code-pad-y) 0.75rem !important;
1227
- line-height: var(--code-line-height) !important;
1228
- font-size: var(--code-font-size) !important;
1229
- font-family: 'Cascadia Mono', 'Cascadia Code', 'JetBrains Mono', 'SF Mono', Monaco, 'Consolas', monospace !important;
1230
- border: none;
1231
- }
1232
- .line-numbers { line-height: var(--code-line-height) !important; }
1233
- .line-numbers .line-number { line-height: var(--code-line-height) !important; }
1234
-
1235
- /* Custom CSS from frontmatter */
1236
-
1237
-
1238
-
1239
-
1240
-
1241
- /* Cursor for tools */
1242
- body[data-tool="arrow"] .main-content {
1243
- cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23e53935" stroke-width="2"><path d="M12 19l7-7 3 3-7 7-3-3z"/><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"/><path d="M2 2l7.586 7.586"/><circle cx="11" cy="11" r="2"/></svg>') 12 12, crosshair;
1244
- }
1245
- body[data-tool="pen"] .main-content {
1246
- cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23e53935" stroke-width="2"><path d="M12 19l7-7 3 3-7 7-3-3z"/><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"/><circle cx="4" cy="20" r="2" fill="%23e53935"/></svg>') 4 20, pointer;
1247
- }
1248
- body[data-tool="eraser"] .main-content {
1249
- cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23e53935" stroke-width="2"><path d="M20 20H7l-7-7 7-7h13v14z"/><path d="M13 13l7-7"/><path d="M13 13L9 9"/></svg>') 12 12, auto;
1250
- }
1251
-
1252
- /* Color picker styles */
1253
- .tools-section-title {
1254
- font-weight: bold;
1255
- color: var(--text-secondary);
1256
- font-size: 0.65rem;
1257
- margin: 0.75rem 0 0.5rem 0;
1258
- text-transform: uppercase;
1259
- letter-spacing: 0.5px;
1260
- }
1261
- .color-row {
1262
- display: grid;
1263
- grid-template-columns: repeat(6, 1fr);
1264
- gap: 0.25rem;
1265
- margin-bottom: 0.5rem;
1266
- }
1267
- .color-swatch {
1268
- width: 18px;
1269
- height: 18px;
1270
- border: 2px solid var(--border-primary);
1271
- border-radius: 3px;
1272
- cursor: pointer;
1273
- transition: all 0.2s ease;
1274
- position: relative;
1275
- }
1276
- .color-swatch:hover {
1277
- transform: scale(1.1);
1278
- border-color: var(--text-secondary);
1279
- }
1280
- .color-swatch.selected {
1281
- border-color: var(--text-primary);
1282
- box-shadow: 0 0 0 2px var(--text-link);
1283
- }
1284
- .color-swatch.selected::after {
1285
- content: '✓';
1286
- position: absolute;
1287
- top: 50%;
1288
- left: 50%;
1289
- transform: translate(-50%, -50%);
1290
- color: white;
1291
- font-size: 10px;
1292
- font-weight: bold;
1293
- text-shadow: 1px 1px 1px black;
1294
- }
1295
- .color-input {
1296
- width: 24px;
1297
- height: 24px;
1298
- border: 2px solid var(--border-primary);
1299
- border-radius: 3px;
1300
- cursor: pointer;
1301
- background: none;
1302
- padding: 0;
1303
- grid-column: span 2;
1304
- justify-self: center;
1305
- }
1306
- .color-input:hover {
1307
- border-color: var(--text-secondary);
1308
- }
1309
-
1310
- /* Thickness slider styles */
1311
- .thickness-row {
1312
- display: flex;
1313
- align-items: center;
1314
- gap: 0.5rem;
1315
- margin-top: 0.75rem;
1316
- }
1317
- .thickness-slider {
1318
- flex: 1;
1319
- -webkit-appearance: none;
1320
- appearance: none;
1321
- height: 4px;
1322
- background: var(--border-primary);
1323
- border-radius: 2px;
1324
- outline: none;
1325
- opacity: 0.7;
1326
- transition: opacity 0.2s;
1327
- }
1328
- .thickness-slider:hover {
1329
- opacity: 1;
1330
- }
1331
- .thickness-slider::-webkit-slider-thumb {
1332
- -webkit-appearance: none;
1333
- appearance: none;
1334
- width: 12px;
1335
- height: 12px;
1336
- background: var(--text-link);
1337
- border-radius: 50%;
1338
- cursor: pointer;
1339
- }
1340
- .thickness-slider::-moz-range-thumb {
1341
- width: 12px;
1342
- height: 12px;
1343
- background: var(--text-link);
1344
- border-radius: 50%;
1345
- cursor: pointer;
1346
- border: none;
1347
- }
1348
- .thickness-value {
1349
- font-size: 0.7rem;
1350
- color: var(--text-secondary);
1351
- min-width: 20px;
1352
- text-align: right;
1353
- }
1354
-
1355
- .highlight {
1356
- background: none !important;
1357
- }
1358
-
1359
- /* Loading animations */
1360
- .loading-spinner {
1361
- display: inline-block;
1362
- width: 16px;
1363
- height: 16px;
1364
- border: 2px solid var(--border-primary);
1365
- border-radius: 50%;
1366
- border-top-color: var(--text-link);
1367
- animation: spin 1s linear infinite;
1368
- margin-right: 8px;
1369
- vertical-align: middle;
1370
- }
1371
-
1372
- @keyframes spin {
1373
- to { transform: rotate(360deg); }
1374
- }
1375
-
1376
- .loading-skeleton {
1377
- display: inline-block;
1378
- background: var(--bg-tertiary);
1379
- background: linear-gradient(
1380
- 90deg,
1381
- var(--bg-tertiary) 25%,
1382
- var(--bg-secondary) 50%,
1383
- var(--bg-tertiary) 75%
1384
- );
1385
- background-size: 200% 100%;
1386
- animation: loading-shimmer 2s ease-in-out infinite;
1387
- border-radius: 2px;
1388
- height: 1em;
1389
- width: 80px;
1390
- vertical-align: middle;
1391
- }
1392
-
1393
- @keyframes loading-shimmer {
1394
- 0% { background-position: -200% 0; }
1395
- 100% { background-position: 200% 0; }
1396
- }
1397
-
1398
- /* Loading state for cell output */
1399
- .cell-output:has(.loading-spinner) {
1400
- opacity: 0.7;
1401
- background: var(--bg-secondary);
1402
- /* border-left: 3px solid var(--text-link); */
1403
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1404
  </style>
1405
  <script>
1406
  // --- Drag utilities ---
@@ -3879,7 +4106,7 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left:
3879
  <span onclick="toggleOutput('benchmark')" style="cursor: pointer;">▼ output</span>
3880
  <span id="uv-indicator-benchmark" style="cursor: default; opacity: 0.3;">▶ uv-logs</span>
3881
  </span> |
3882
- Cell: benchmark | 4.19s
3883
  | <button class="run-btn" onclick="runCell('benchmark')">▶ run</button>
3884
  <button class="copy-btn" onclick="copyCell('benchmark')">Copy</button>
3885
  <a href="cells/benchmark.py" target="_blank" class="raw-btn">Raw</a>
@@ -3928,22 +4155,23 @@ Cell: benchmark | 4.19s
3928
  <div class="cell-stdout"><pre class="stdout-text">Running attention benchmark on cuda with 6 workloads.
3929
  impl wl p50(ms) ok
3930
  sage_int8_fp16 cuda_attn_L128_bfloat16 FAIL False
3931
- Error: module &#x27;sage_attention_d4f4a6803f593c0b&#x27; has no attribute &#x27;fwd&#x27;
3932
  sage_int8_fp16 cuda_attn_L256_bfloat16 FAIL False
3933
- Error: module &#x27;sage_attention_d4f4a6803f593c0b&#x27; has no attribute &#x27;fwd&#x27;
3934
  sage_int8_fp16 cuda_attn_L320_bfloat16 FAIL False
3935
- Error: module &#x27;sage_attention_d4f4a6803f593c0b&#x27; has no attribute &#x27;fwd&#x27;
3936
  sage_int8_fp16 cuda_attn_L384_bfloat16 FAIL False
3937
- Error: module &#x27;sage_attention_d4f4a6803f593c0b&#x27; has no attribute &#x27;fwd&#x27;
3938
  sage_int8_fp16 cuda_attn_L448_bfloat16 FAIL False
3939
- Error: module &#x27;sage_attention_d4f4a6803f593c0b&#x27; has no attribute &#x27;fwd&#x27;
3940
  sage_int8_fp16 cuda_attn_L512_bfloat16 FAIL False
3941
- Error: module &#x27;sage_attention_d4f4a6803f593c0b&#x27; has no attribute &#x27;fwd&#x27;
3942
  </pre></div>
3943
  <div class="cell-stderr">
3944
  Fetching 11 files: 0%| | 0/11 [00:00&lt;?, ?it/s]
3945
- Fetching 11 files: 73%|███████▎ | 8/11 [00:00&lt;00:00, 13.96it/s]
3946
- Fetching 11 files: 100%|██████████| 11/11 [00:00&lt;00:00, 19.18it/s]
 
3947
  </div>
3948
  <div class="cell-artifacts">
3949
  <h4>Artifacts:</h4>
 
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>sage_attention</title>
7
+
8
+ <link rel="preconnect" href="https://fonts.googleapis.com">
9
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
+ <link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap" rel="stylesheet">
11
+
12
  <script>
13
  // Iframe-friendly navigation router
14
  (function() {
 
92
  </script>
93
  <style>
94
  :root[data-theme="light"] {
95
+ --bg-primary: #ffffff;
96
+ --bg-secondary: #f6f8fa;
97
+ --bg-tertiary: #f8f9fa;
98
+ --bg-code: #f8f9fa;
99
+ --bg-error: #fdf2f2;
100
+ --bg-artifact: #e6f3ff;
101
+ --bg-artifact-hover: #d0e7ff;
102
+
103
+ --text-primary: #333;
104
+ --text-secondary: #656d76;
105
+ --text-error: #c53030;
106
+ --text-link: #0969da;
107
+
108
+ --border-primary: #e1e5e9;
109
+ --border-error: #e53e3e;
110
+ --border-cell-failed: #d73a49;
111
+
112
+ --shadow: rgba(0, 0, 0, 0.1);
113
+ }
114
+
115
+ :root[data-theme="dark"] {
116
+ --bg-primary: #0a0a0a;
117
+ --bg-secondary: #121212;
118
+ --bg-tertiary: #181818;
119
+ --bg-code: #0d0d0d;
120
+ --bg-error: #1a0f0f;
121
+ --bg-artifact: #151515;
122
+ --bg-artifact-hover: #1a1a1a;
123
+
124
+ --text-primary: #e0e0e0;
125
+ --text-secondary: #888888;
126
+ --text-error: #ff6b6b;
127
+ --text-link: #64b5f6;
128
+
129
+ --border-primary: #2a2a2a;
130
+ --border-error: #ff6b6b;
131
+ --border-cell-failed: #ff6b6b;
132
+
133
+ --shadow: rgba(255, 255, 255, 0.05);
134
+ }
135
+
136
+ /* Monocolor UI theme: black/white background, all text/borders single blue */
137
+ :root[data-ui="monocolor"] {
138
+ --mono-color: #0a66ff;
139
+ }
140
+
141
+ :root[data-ui="monocolor"][data-theme="light"] {
142
+ --bg-primary: #ffffff;
143
+ }
144
+
145
+ :root[data-ui="monocolor"][data-theme="dark"] {
146
+ --bg-primary: #000000;
147
+ }
148
+
149
+ :root[data-ui="monocolor"] {
150
+ --bg-secondary: var(--bg-primary);
151
+ --bg-tertiary: var(--bg-primary);
152
+ --bg-code: var(--bg-primary);
153
+ --bg-error: var(--bg-primary);
154
+ --bg-artifact: var(--bg-primary);
155
+ --bg-artifact-hover: var(--bg-primary);
156
+
157
+ --text-primary: var(--mono-color);
158
+ --text-secondary: var(--mono-color);
159
+ --text-error: var(--mono-color);
160
+ --text-link: var(--mono-color);
161
+
162
+ --border-primary: var(--mono-color);
163
+ --border-error: var(--mono-color);
164
+ --border-cell-failed: var(--mono-color);
165
+
166
+ --shadow: none;
167
+ }
168
+
169
+ :root[data-ui="monocolor"] a {
170
+ color: var(--mono-color);
171
+ }
172
+
173
+ :root[data-ui="monocolor"] .menu-button,
174
+ :root[data-ui="monocolor"] .theme-toggle,
175
+ :root[data-ui="monocolor"] .reset-toggle,
176
+ :root[data-ui="monocolor"] .back-button {
177
+ background: var(--bg-primary);
178
+ color: var(--mono-color);
179
+ border-color: var(--mono-color);
180
+ }
181
+
182
+ :root[data-ui="monocolor"] .menu-button:hover,
183
+ :root[data-ui="monocolor"] .theme-toggle:hover,
184
+ :root[data-ui="monocolor"] .reset-toggle:hover,
185
+ :root[data-ui="monocolor"] .back-button:hover {
186
+ background: var(--bg-primary);
187
+ color: var(--mono-color);
188
+ border-color: var(--mono-color);
189
+ }
190
+
191
+ :root[data-ui="monocolor"] .menu-dropdown {
192
+ background: var(--bg-primary);
193
+ border-color: var(--mono-color);
194
+ box-shadow: none;
195
+ }
196
+
197
+ :root[data-ui="monocolor"] .menu-item {
198
+ color: var(--mono-color);
199
+ border-bottom-color: var(--mono-color);
200
+ }
201
+
202
+ :root[data-ui="monocolor"] .system-info {
203
+ background: var(--bg-primary);
204
+ border-color: var(--mono-color);
205
+ }
206
+
207
+ :root[data-ui="monocolor"] .cell {
208
+ border-color: var(--mono-color);
209
+ background: var(--bg-primary);
210
+ }
211
+
212
+ :root[data-ui="monocolor"] .cell-header {
213
+ background: var(--bg-primary);
214
+ border-bottom-color: var(--mono-color);
215
+ }
216
+
217
+ :root[data-ui="monocolor"] .artifact {
218
+ background: var(--bg-primary);
219
+ border-color: var(--mono-color);
220
+ color: var(--mono-color);
221
+ }
222
+
223
+ :root[data-ui="monocolor"] .artifact:hover {
224
+ background: var(--bg-primary);
225
+ }
226
+
227
+ :root[data-ui="monocolor"] .artifact-preview img,
228
+ :root[data-ui="monocolor"] .artifact-preview svg {
229
+ border-color: var(--mono-color);
230
+ }
231
+
232
+ :root[data-ui="monocolor"] .status-widget {
233
+ background: var(--bg-primary);
234
+ border-color: var(--mono-color);
235
+ color: var(--mono-color);
236
+ }
237
+
238
+ :root[data-ui="monocolor"] .minimap,
239
+ :root[data-ui="monocolor"] .file-explorer,
240
+ :root[data-ui="monocolor"] .tools-widget {
241
+ background: var(--bg-primary);
242
+ border-color: var(--mono-color);
243
+ color: var(--mono-color);
244
+ }
245
+
246
+ :root[data-ui="monocolor"] .cell-code {
247
+ background: var(--bg-primary);
248
+ border-bottom-color: var(--mono-color);
249
+ }
250
+
251
+ :root[data-ui="monocolor"] .tools-title,
252
+ :root[data-ui="monocolor"] .file-explorer-section-title,
253
+ :root[data-ui="monocolor"] .minimap-title {
254
+ color: var(--mono-color);
255
+ border-bottom-color: var(--mono-color);
256
+ }
257
+
258
+ :root[data-ui="monocolor"] .tool-button {
259
+ background: var(--bg-primary);
260
+ border-color: var(--mono-color);
261
+ color: var(--mono-color);
262
+ }
263
+
264
+ :root[data-ui="monocolor"] .tool-button.active {
265
+ border-color: var(--mono-color);
266
+ }
267
+
268
+ :root[data-ui="monocolor"] .file-explorer-item,
269
+ :root[data-ui="monocolor"] .minimap-item {
270
+ color: var(--mono-color);
271
+ }
272
+
273
+ /* Force Pygments code to mono blue on mono bg */
274
+ :root[data-ui="monocolor"] .highlight {
275
+ background: var(--bg-primary) !important;
276
+ color: var(--mono-color) !important;
277
+ }
278
+
279
+ :root[data-ui="monocolor"] .highlight *,
280
+ :root[data-ui="monocolor"] .highlight .hll {
281
+ color: var(--mono-color) !important;
282
+ background: transparent !important;
283
+ border-color: var(--mono-color) !important;
284
+ }
285
+
286
+ /* Default code font + metrics (overridable via frontmatter) */
287
+ :root {
288
+ --code-font-size: 0.95rem;
289
+ --code-line-height: 1.5;
290
+ --code-pad-y: 0.75rem;
291
+ }
292
+
293
+ /* Minimal UI theme overrides base variables for a flatter, 90s look */
294
+ :root[data-ui="none"] {
295
+ --bg-primary: #ffffff;
296
+ --bg-secondary: transparent;
297
+ --bg-tertiary: transparent;
298
+ --bg-code: #f9f9f9;
299
+ --bg-error: #fff0f0;
300
+ --bg-artifact: #f0f7ff;
301
+ --bg-artifact-hover: #e5f1ff;
302
+
303
+ --text-primary: #000000;
304
+ --text-secondary: #222222;
305
+ --text-error: #a00000;
306
+ --text-link: #0000ee;
307
+
308
+ --border-primary: #cccccc;
309
+ --border-error: #cc0000;
310
+ --border-cell-failed: #cc0000;
311
+
312
+ --shadow: none;
313
+ }
314
+
315
+ html {
316
+ overscroll-behavior: none;
317
+ }
318
+
319
+ body {
320
+ font-family: 'Cascadia Mono', 'Cascadia Code', 'JetBrains Mono', 'SF Mono', Monaco, 'Consolas', monospace;
321
+ line-height: 1.4;
322
+ max-width: 1000px;
323
+ margin: 0 auto;
324
+ padding: 15px;
325
+ color: var(--text-primary);
326
+ background: var(--bg-primary);
327
+ transition: background-color 0.2s ease, color 0.2s ease;
328
+ overscroll-behavior: none;
329
+ }
330
+
331
+ /* Minimal "none" UI theme overrides */
332
+ :root[data-ui="none"] body {
333
+ font-family: 'Times New Roman', Times, serif;
334
+ line-height: 1.5;
335
+ max-width: 860px;
336
+ padding: 12px;
337
+ background: #ffffff;
338
+ color: #000000;
339
+ transition: none;
340
+ }
341
+
342
+ /* Two panel layout removed */
343
+
344
+ .controls {
345
+ position: fixed;
346
+ top: 20px;
347
+ right: 20px;
348
+ display: flex;
349
+ flex-direction: column;
350
+ align-items: flex-end;
351
+ gap: 0.25rem;
352
+ z-index: 1000;
353
+ }
354
+
355
+ .controls-buttons {
356
+ display: flex;
357
+ gap: 0.5rem;
358
+ }
359
+
360
+ .menu-button {
361
+ position: relative;
362
+ background: var(--bg-secondary);
363
+ border: 1px solid var(--border-primary);
364
+ padding: 8px 12px;
365
+ border-radius: 2px;
366
+ color: var(--text-secondary);
367
+ cursor: pointer;
368
+ font-family: inherit;
369
+ font-size: 0.9rem;
370
+ user-select: none;
371
+ }
372
+
373
+ /* Keep default control styling when widgets are enabled, even in minimal UI */
374
+ :root[data-ui="none"][data-widgets="on"] .menu-button,
375
+ :root[data-ui="none"][data-widgets="on"] .theme-toggle,
376
+ :root[data-ui="none"][data-widgets="on"] .reset-toggle,
377
+ :root[data-ui="none"][data-widgets="on"] .back-button {
378
+ background: #f6f6f6;
379
+ border: 1px solid #cccccc;
380
+ color: #222222;
381
+ }
382
+
383
+ .menu-button:hover {
384
+ color: var(--text-primary);
385
+ background: var(--bg-tertiary);
386
+ }
387
+
388
+ /* Controls state indicator (top-right) */
389
+ /* Status widget (bottom-right) */
390
+ .status-widget {
391
+ position: fixed;
392
+ right: 20px;
393
+ bottom: 20px;
394
+ width: auto;
395
+ max-width: 260px;
396
+ background: var(--bg-secondary);
397
+ border: 1px solid var(--border-primary);
398
+ border-radius: 2px;
399
+ padding: 6px 8px;
400
+ font-size: 0.8rem;
401
+ color: var(--text-secondary);
402
+ z-index: 100;
403
+ }
404
+
405
+ .status-widget strong {
406
+ color: var(--text-primary);
407
+ }
408
+
409
+ :root[data-ui="none"][data-widgets="on"] .status-widget {
410
+ background: #f6f6f6;
411
+ border-color: #ccc;
412
+ color: #222;
413
+ }
414
+
415
+ :root[data-ui="none"][data-widgets="on"] .menu-button:hover,
416
+ :root[data-ui="none"][data-widgets="on"] .theme-toggle:hover,
417
+ :root[data-ui="none"][data-widgets="on"] .reset-toggle:hover,
418
+ :root[data-ui="none"][data-widgets="on"] .back-button:hover {
419
+ background: #ededed;
420
+ border-color: #bbbbbb;
421
+ color: #000000;
422
+ }
423
+
424
+ .menu-dropdown {
425
+ position: absolute;
426
+ top: 100%;
427
+ right: 0;
428
+ background: var(--bg-secondary);
429
+ border: 1px solid var(--border-primary);
430
+ border-radius: 4px;
431
+ box-shadow: 0 4px 12px var(--shadow);
432
+ min-width: 160px;
433
+ opacity: 0;
434
+ visibility: hidden;
435
+ transform: translateY(-8px);
436
+ transition: all 0.2s ease;
437
+ z-index: 1001;
438
+ margin-top: 4px;
439
+ }
440
+
441
+ :root[data-ui="none"][data-widgets="on"] .menu-dropdown {
442
+ background: #ffffff;
443
+ border: 1px solid #cccccc;
444
+ box-shadow: none;
445
+ }
446
+
447
+ .menu-button.active .menu-dropdown {
448
+ opacity: 1;
449
+ visibility: visible;
450
+ transform: translateY(0);
451
+ }
452
+
453
+ .menu-item {
454
+ display: block;
455
+ padding: 8px 12px;
456
+ color: var(--text-secondary);
457
+ text-decoration: none;
458
+ font-size: 0.85rem;
459
+ border-bottom: 1px solid var(--border-primary);
460
+ cursor: pointer;
461
+ }
462
+
463
+ :root[data-ui="none"] .menu-item {
464
+ color: #000;
465
+ border-bottom: 1px solid #eee;
466
+ }
467
+
468
+ .menu-item:last-child {
469
+ border-bottom: none;
470
+ }
471
+
472
+ .menu-item:hover {
473
+ background: var(--bg-tertiary);
474
+ color: var(--text-primary);
475
+ }
476
+
477
+ .menu-checkbox {
478
+ display: inline-block;
479
+ width: 16px;
480
+ font-family: monospace;
481
+ color: var(--text-link);
482
+ }
483
+
484
+ .theme-toggle,
485
+ .reset-toggle,
486
+ .back-button {
487
+ background: var(--bg-secondary);
488
+ border: 1px solid var(--border-primary);
489
+ padding: 8px 12px;
490
+ border-radius: 4px;
491
+ color: var(--text-secondary);
492
+ cursor: pointer;
493
+ font-family: inherit;
494
+ font-size: 0.9rem;
495
+ user-select: none;
496
+ }
497
+
498
+ .back-button {
499
+ text-decoration: none;
500
+ display: inline-block;
501
+ }
502
+
503
+ .theme-toggle:hover,
504
+ .reset-toggle:hover,
505
+ .back-button:hover {
506
+ color: var(--text-primary);
507
+ background: var(--bg-tertiary);
508
+ }
509
+
510
+ .system-info {
511
+ background: var(--bg-secondary);
512
+ border: 1px solid var(--border-primary);
513
+ border-radius: 4px;
514
+ padding: 8px 12px;
515
+ margin-bottom: 16px;
516
+ font-size: 0.85em;
517
+ color: var(--text-secondary);
518
+ }
519
+
520
+ .system-info-header {
521
+ font-weight: 600;
522
+ color: var(--text-primary);
523
+ margin-bottom: 2px;
524
+ }
525
+
526
+ .system-info-content {
527
+ font-family: monospace;
528
+ }
529
+
530
+ .theme-toggle,
531
+ .reset-toggle {
532
+ background: var(--bg-secondary);
533
+ border: 1px solid var(--border-primary);
534
+ border-radius: 2px;
535
+ /* padding: 0.4rem 0.6rem; */
536
+ cursor: pointer;
537
+ font-family: inherit;
538
+ font-size: 0.8rem;
539
+ color: var(--text-secondary);
540
+ user-select: none;
541
+ transition: all 0.2s ease;
542
+ text-transform: lowercase;
543
+ letter-spacing: 0;
544
+ }
545
+
546
+ .theme-toggle:hover,
547
+ .reset-toggle:hover {
548
+ background: var(--bg-tertiary);
549
+ border-color: var(--text-secondary);
550
+ color: var(--text-primary);
551
+ }
552
+
553
+ .minimap {
554
+ position: fixed;
555
+ bottom: 20px;
556
+ right: 20px;
557
+ width: 220px;
558
+ max-height: 400px;
559
+ background: var(--bg-secondary);
560
+ border: 1px solid var(--border-primary);
561
+ border-radius: 2px;
562
+ padding: 0.5rem;
563
+ font-size: 0.7rem;
564
+ overflow-y: auto;
565
+ z-index: 100;
566
+ opacity: 0.9;
567
+ transition: opacity 0.2s ease;
568
+ }
569
+
570
+ /* Hide widgets and controls when disabled via frontmatter */
571
+ :root[data-widgets="off"] .controls,
572
+ :root[data-widgets="off"] .minimap,
573
+ :root[data-widgets="off"] .file-explorer,
574
+ :root[data-widgets="off"] .tools-widget,
575
+ :root[data-widgets="off"] .status-widget {
576
+ display: none !important;
577
+ }
578
+
579
+ .file-explorer {
580
+ position: fixed;
581
+ bottom: 20px;
582
+ /* default; JS will stack */
583
+ right: 20px;
584
+ left: auto;
585
+ top: auto;
586
+ width: 220px;
587
+ max-height: 400px;
588
+ background: var(--bg-secondary);
589
+ border: 1px solid var(--border-primary);
590
+ border-radius: 2px;
591
+ padding: 0.5rem;
592
+ font-size: 0.7rem;
593
+ overflow-y: auto;
594
+ z-index: 100;
595
+ opacity: 0.9;
596
+ transition: opacity 0.2s ease;
597
+ }
598
+
599
+ /* Drawing overlay */
600
+ .draw-overlay {
601
+ position: fixed;
602
+ top: 0;
603
+ left: 0;
604
+ width: 100vw;
605
+ height: 100vh;
606
+ z-index: 80;
607
+ /* under widgets (100) and controls (1000) */
608
+ display: block;
609
+ pointer-events: none;
610
+ /* enabled only when a tool is active */
611
+ }
612
+
613
+ /* Tools widget */
614
+ .tools-widget {
615
+ position: fixed;
616
+ bottom: 20px;
617
+ /* default; JS will stack */
618
+ right: 20px;
619
+ left: auto;
620
+ top: auto;
621
+ width: 220px;
622
+ background: var(--bg-secondary);
623
+ border: 1px solid var(--border-primary);
624
+ border-radius: 2px;
625
+ padding: 0.5rem;
626
+ font-size: 0.7rem;
627
+ z-index: 100;
628
+ opacity: 0.95;
629
+ }
630
+
631
+ .tools-title {
632
+ font-weight: bold;
633
+ color: var(--text-secondary);
634
+ margin-bottom: 0.5rem;
635
+ padding-bottom: 0.25rem;
636
+ border-bottom: 1px solid var(--border-primary);
637
+ cursor: grab;
638
+ user-select: none;
639
+ }
640
+
641
+ .tools-row {
642
+ display: flex;
643
+ gap: 0.4rem;
644
+ flex-wrap: wrap;
645
+ }
646
+
647
+ .tool-button {
648
+ background: var(--bg-tertiary);
649
+ border: 1px solid var(--border-primary);
650
+ border-radius: 2px;
651
+ padding: 0.25rem 0.4rem;
652
+ cursor: pointer;
653
+ color: var(--text-secondary);
654
+ font-family: inherit;
655
+ font-size: 0.75rem;
656
+ user-select: none;
657
+ }
658
+
659
+ .tool-button:hover {
660
+ color: var(--text-primary);
661
+ }
662
+
663
+ .tool-button.active {
664
+ color: var(--text-primary);
665
+ border-color: var(--text-secondary);
666
+ background: var(--bg-secondary);
667
+ }
668
+
669
+ .minimap:hover,
670
+ .file-explorer:hover {
671
+ opacity: 1;
672
+ }
673
+
674
+ .minimap-title {
675
+ font-weight: bold;
676
+ color: var(--text-secondary);
677
+ margin-bottom: 0.5rem;
678
+ padding-bottom: 0.25rem;
679
+ border-bottom: 1px solid var(--border-primary);
680
+ cursor: grab;
681
+ /* drag handle */
682
+ user-select: none;
683
+ }
684
+
685
+ .minimap-item {
686
+ display: block;
687
+ color: var(--text-secondary);
688
+ text-decoration: none;
689
+ padding: 0.15rem 0;
690
+ border-left: 2px solid transparent;
691
+ padding-left: 0.5rem;
692
+ transition: all 0.2s ease;
693
+ cursor: pointer;
694
+ }
695
+
696
+ .minimap-item:hover {
697
+ color: var(--text-primary);
698
+ border-left-color: var(--text-secondary);
699
+ }
700
+
701
+ .minimap-item.active {
702
+ color: var(--text-primary);
703
+ border-left-color: var(--text-link);
704
+ }
705
+
706
+ .minimap-heading {
707
+ font-weight: normal;
708
+ }
709
+
710
+ .minimap-heading.h1 {
711
+ padding-left: 0.5rem;
712
+ }
713
+
714
+ .minimap-heading.h2 {
715
+ padding-left: 1rem;
716
+ }
717
+
718
+ .minimap-heading.h3 {
719
+ padding-left: 1.5rem;
720
+ }
721
+
722
+ .minimap-heading.h4 {
723
+ padding-left: 2rem;
724
+ }
725
+
726
+ .minimap-heading.h5 {
727
+ padding-left: 2.5rem;
728
+ }
729
+
730
+ .minimap-heading.h6 {
731
+ padding-left: 3rem;
732
+ }
733
+
734
+ .minimap-cell {
735
+ color: var(--text-link);
736
+ opacity: 0.8;
737
+ font-style: italic;
738
+ }
739
+
740
+ .minimap-cell:hover {
741
+ opacity: 1;
742
+ }
743
+
744
+ .file-explorer-title {
745
+ font-weight: bold;
746
+ color: var(--text-secondary);
747
+ margin-bottom: 0.5rem;
748
+ padding-bottom: 0.25rem;
749
+ border-bottom: 1px solid var(--border-primary);
750
+ cursor: grab;
751
+ /* drag handle */
752
+ user-select: none;
753
+ }
754
+
755
+ .file-explorer-section {
756
+ margin-bottom: 0.75rem;
757
+ }
758
+
759
+ .file-explorer-section-title {
760
+ font-weight: bold;
761
+ color: var(--text-secondary);
762
+ font-size: 0.65rem;
763
+ margin-bottom: 0.25rem;
764
+ text-transform: uppercase;
765
+ letter-spacing: 0.5px;
766
+ }
767
+
768
+ .file-explorer-item {
769
+ display: block;
770
+ color: var(--text-secondary);
771
+ text-decoration: none;
772
+ padding: 0.1rem 0;
773
+ margin-left: 0.5rem;
774
+ transition: color 0.2s ease;
775
+ cursor: pointer;
776
+ font-family: monospace;
777
+ }
778
+
779
+ .file-explorer-item:hover {
780
+ color: var(--text-primary);
781
+ }
782
+
783
+ .file-explorer-item.script {
784
+ color: var(--text-link);
785
+ }
786
+
787
+ .file-explorer-item.artifact {
788
+ color: var(--text-secondary);
789
+ opacity: 0.8;
790
+ }
791
+
792
+
793
+ /* Hide widgets on smaller screens */
794
+ @media (max-width: 768px) {
795
+
796
+ .minimap,
797
+ .file-explorer,
798
+ .tools-widget {
799
+ display: none;
800
+ }
801
+ }
802
+
803
+ .cell {
804
+ margin: 1rem 0;
805
+ border: 1px solid var(--border-primary);
806
+ border-radius: 2px;
807
+ overflow: hidden;
808
+ background: var(--bg-secondary);
809
+ }
810
+
811
+ :root[data-ui="none"] .cell {
812
+ margin: 1em 0;
813
+ border: none;
814
+ background: transparent;
815
+ }
816
+
817
+ .cell-header {
818
+ background: var(--bg-secondary);
819
+ padding: 0.5rem 1rem;
820
+ border-bottom: 1px solid var(--border-primary);
821
+ font-family: inherit;
822
+ font-size: 0.85rem;
823
+ }
824
+
825
+ :root[data-ui="none"] .cell-header {
826
+ background: transparent;
827
+ border: none;
828
+ padding: 0;
829
+ font-weight: bold;
830
+ }
831
+
832
+ :root[data-ui="none"] .cell-content {
833
+ padding: 0;
834
+ }
835
+
836
+ :root[data-ui="none"] .copy-button,
837
+ :root[data-ui="none"] .collapse-indicators,
838
+ :root[data-ui="none"] .cell-meta,
839
+ :root[data-ui="none"] .cell-outputs-header {
840
+ display: none !important;
841
+ }
842
+
843
+ :root[data-ui="none"] pre,
844
+ :root[data-ui="none"] code {
845
+ font-family: Menlo, Monaco, 'Courier New', monospace;
846
+ }
847
+
848
+ :root[data-ui="none"] .code-content pre {
849
+ background: #f9f9f9;
850
+ border: 1px solid #ddd;
851
+ padding: 8px;
852
+ }
853
+
854
+ :root[data-ui="none"] .output {
855
+ background: transparent;
856
+ border: none;
857
+ padding: 0.25em 0;
858
+ }
859
+
860
+ color: var(--text-secondary);
861
+ cursor: pointer;
862
+ user-select: none;
863
+ transition: background-color 0.2s ease;
864
+ }
865
+
866
+ .cell-header:hover {
867
+ background: var(--bg-tertiary);
868
+ }
869
+
870
+ .collapse-indicators {
871
+ color: var(--text-secondary);
872
+ font-size: 0.8rem;
873
+ opacity: 0.7;
874
+ }
875
+
876
+ .collapse-indicators span:hover {
877
+ color: var(--text-primary);
878
+ opacity: 1;
879
+ }
880
+
881
+ .cell-code {
882
+ display: block;
883
+ background: var(--bg-code);
884
+ }
885
+
886
+ .cell-code.collapsed {
887
+ display: none;
888
+ }
889
+
890
+ .cell-code pre {
891
+ margin: 0;
892
+ padding: 0.75rem;
893
+ background: var(--bg-code);
894
+ overflow-x: auto;
895
+ color: var(--text-primary);
896
+ }
897
+
898
+ .cell-output {
899
+ padding: 0.75rem;
900
+ /* background: var(--bg-primary); */
901
+ background: var(--bg-secondary);
902
+ }
903
+
904
+ .cell-output.collapsed {
905
+ display: none;
906
+ }
907
+
908
+ .cell-stdout {
909
+ background: var(--bg-tertiary);
910
+ padding: 0.75rem;
911
+ border-radius: 1px;
912
+ /* margin: 0.25rem 0; */
913
+ font-family: inherit;
914
+ font-size: 0.9rem;
915
+ white-space: pre-wrap;
916
+ color: var(--text-primary);
917
+ }
918
+
919
+ .cell-stdout {
920
+ background: var(--bg-tertiary);
921
+ padding: 0.75rem;
922
+ border-radius: 1px;
923
+ font-family: inherit;
924
+ font-size: 0.9rem;
925
+ color: var(--text-primary);
926
+
927
+ /* key bits */
928
+ overflow: auto;
929
+ /* show scrollbars when needed */
930
+ max-width: 100%;
931
+ /* respects whatever layout width you give it */
932
+ }
933
+
934
+ .cell-stdout .stdout-text {
935
+ margin: 0;
936
+ /* reset pre default margin */
937
+ white-space: pre;
938
+ /* keep line breaks, NO wrapping */
939
+ display: inline-block;
940
+ /* shrink-to-content */
941
+ min-width: max-content;
942
+ /* allow very long lines to define intrinsic width */
943
+ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
944
+ tab-size: 2;
945
+ }
946
+
947
+ .cell-stderr {
948
+ background: var(--bg-error);
949
+ border-left: 2px solid var(--border-error);
950
+ padding: 1rem;
951
+ margin: 0.5rem 0;
952
+ font-family: inherit;
953
+ font-size: 0.9rem;
954
+ color: var(--text-error);
955
+ white-space: pre-wrap;
956
+ }
957
+
958
+ .uv-install-logs {
959
+ margin: 0.5rem 0;
960
+ }
961
+
962
+ .uv-logs-header {
963
+ cursor: pointer;
964
+ padding: 0.75rem;
965
+ border-left: 3px solid var(--border-color);
966
+ font-family: inherit;
967
+ font-size: 0.85rem;
968
+ color: var(--text-secondary);
969
+ user-select: none;
970
+ }
971
+
972
+ .uv-logs-content {
973
+ background: var(--bg-secondary);
974
+ padding: 1rem;
975
+ border-left: 3px solid var(--border-color);
976
+ white-space: pre-wrap;
977
+ font-family: monospace;
978
+ font-size: 0.85rem;
979
+ color: var(--text-secondary);
980
+ overflow-x: auto;
981
+ }
982
+
983
+ .cell-artifacts {
984
+ margin: 1rem 0;
985
+ }
986
+
987
+ .cell-artifacts h4 {
988
+ margin: 0 0 0.5rem 0;
989
+ color: var(--text-secondary);
990
+ font-size: 0.9rem;
991
+ }
992
+
993
+ .artifact {
994
+ display: inline-block;
995
+ background: var(--bg-artifact);
996
+ padding: 0.25rem 0.5rem;
997
+ border-radius: 1px;
998
+ margin: 0.25rem 0.5rem 0.25rem 0;
999
+ font-family: inherit;
1000
+ font-size: 0.8rem;
1001
+ color: var(--text-link);
1002
+ text-decoration: none;
1003
+ transition: background-color 0.2s ease;
1004
+ border: 1px solid var(--border-primary);
1005
+ }
1006
+
1007
+ .artifact:hover {
1008
+ background: var(--bg-artifact-hover);
1009
+ }
1010
+
1011
+ .artifact-preview {
1012
+ margin-top: 1rem;
1013
+ }
1014
+
1015
+ .artifact-preview img {
1016
+ max-width: 100%;
1017
+ height: auto;
1018
+ border: 1px solid var(--border-primary);
1019
+ border-radius: 1px;
1020
+ }
1021
+
1022
+ .artifact-preview svg {
1023
+ max-width: 100%;
1024
+ height: auto;
1025
+ border: 1px solid var(--border-primary);
1026
+ border-radius: 1px;
1027
+ display: block;
1028
+ }
1029
+
1030
+ /* Style SVG text elements */
1031
+ .artifact-preview svg g {
1032
+ fill: var(--text-primary) !important;
1033
+ }
1034
+
1035
+ /* Auto-theme SVG elements */
1036
+ .artifact-preview svg {
1037
+ background: transparent;
1038
+ }
1039
+
1040
+ /* Invert SVG images in dark mode */
1041
+ :root[data-theme="dark"] .artifact-preview img[src$=".svg"] {
1042
+ filter: invert(0.9) hue-rotate(180deg);
1043
+ }
1044
+
1045
+ /* Keep SVG images readable in monocolor mode */
1046
+ :root[data-ui="monocolor"] .artifact-preview img[src$=".svg"] {
1047
+ filter: none;
1048
+ }
1049
+
1050
+ /* CSV table styling */
1051
+ .artifact-csv {
1052
+ margin-top: 1rem;
1053
+ overflow-x: auto;
1054
+ }
1055
+
1056
+ .csv-table {
1057
+ width: 100%;
1058
+ border-collapse: collapse;
1059
+ font-size: 0.9rem;
1060
+ background: var(--bg-secondary);
1061
+ border: 1px solid var(--border-primary);
1062
+ border-radius: 1px;
1063
+ }
1064
+
1065
+ .csv-table th,
1066
+ .csv-table td {
1067
+ padding: 0.5rem 0.75rem;
1068
+ text-align: left;
1069
+ border: 1px solid var(--border-primary);
1070
+ }
1071
+
1072
+ .csv-table th {
1073
+ background: var(--bg-tertiary);
1074
+ font-weight: 600;
1075
+ color: var(--text-primary);
1076
+ }
1077
+
1078
+ .csv-table tbody tr:hover {
1079
+ background: var(--bg-artifact-hover);
1080
+ }
1081
+
1082
+ .artifact-csv-error {
1083
+ margin-top: 1rem;
1084
+ padding: 1rem;
1085
+ background: var(--bg-error);
1086
+ color: var(--text-error);
1087
+ border: 1px solid var(--border-error);
1088
+ border-radius: 1px;
1089
+ }
1090
+
1091
+ .cell-failed {
1092
+ border-color: var(--border-cell-failed);
1093
+ }
1094
+
1095
+ .cell-failed .cell-header {
1096
+ background: var(--bg-error);
1097
+ color: var(--text-error);
1098
+ }
1099
+
1100
+ .cell-commented {
1101
+ opacity: 0.6;
1102
+ border-style: dashed;
1103
+ }
1104
+
1105
+ .cell-commented .cell-header {
1106
+ background: var(--bg-secondary);
1107
+ color: var(--text-secondary);
1108
+ font-style: italic;
1109
+ }
1110
+
1111
+ .run-btn {
1112
+ background: var(--bg-tertiary);
1113
+ border: 1px solid var(--border-primary);
1114
+ padding: 2px 6px;
1115
+ border-radius: 2px;
1116
+ color: var(--text-secondary);
1117
+ cursor: pointer;
1118
+ font-size: 0.75em;
1119
+ font-family: inherit;
1120
+ margin-left: 4px;
1121
+ }
1122
+
1123
+ .run-btn:hover {
1124
+ color: var(--text-primary);
1125
+ background: var(--bg-primary);
1126
+ }
1127
+
1128
+ .run-btn:disabled {
1129
+ opacity: 0.6;
1130
+ cursor: not-allowed;
1131
+ }
1132
+
1133
+ .copy-btn {
1134
+ background: var(--bg-tertiary);
1135
+ border: 1px solid var(--border-primary);
1136
+ padding: 2px 6px;
1137
+ border-radius: 2px;
1138
+ color: var(--text-secondary);
1139
+ cursor: pointer;
1140
+ font-size: 0.75em;
1141
+ font-family: inherit;
1142
+ margin-left: 4px;
1143
+ }
1144
+
1145
+ .copy-btn:hover {
1146
+ color: var(--text-primary);
1147
+ background: var(--bg-primary);
1148
+ }
1149
+
1150
+ .copy-btn:disabled {
1151
+ opacity: 0.6;
1152
+ cursor: not-allowed;
1153
+ }
1154
+
1155
+ .copy-btn.copied {
1156
+ color: #4caf50;
1157
+ background: var(--bg-primary);
1158
+ border-color: #4caf50;
1159
+ transition: all 0.2s ease;
1160
+ }
1161
+
1162
+ .raw-btn {
1163
+ background: var(--bg-tertiary);
1164
+ border: 1px solid var(--border-primary);
1165
+ padding: 2px 6px;
1166
+ border-radius: 2px;
1167
+ color: var(--text-secondary);
1168
+ cursor: pointer;
1169
+ font-size: 0.75em;
1170
+ font-family: inherit;
1171
+ margin-left: 4px;
1172
+ text-decoration: none;
1173
+ display: inline-block;
1174
+ }
1175
+
1176
+ .raw-btn:hover {
1177
+ color: var(--text-primary);
1178
+ background: var(--bg-primary);
1179
+ text-decoration: none;
1180
+ }
1181
+
1182
+ .github-btn {
1183
+ background: var(--bg-tertiary);
1184
+ border: 1px solid var(--border-primary);
1185
+ padding: 2px 6px;
1186
+ border-radius: 2px;
1187
+ color: var(--text-secondary);
1188
+ cursor: pointer;
1189
+ font-size: 0.75em;
1190
+ font-family: inherit;
1191
+ margin-left: 4px;
1192
+ text-decoration: none;
1193
+ display: inline-block;
1194
+ }
1195
+
1196
+ .github-btn:hover {
1197
+ color: var(--text-primary);
1198
+ background: var(--bg-primary);
1199
+ text-decoration: none;
1200
+ }
1201
+
1202
+ .hf-btn {
1203
+ background: var(--bg-tertiary);
1204
+ border: 1px solid var(--border-primary);
1205
+ padding: 2px 6px;
1206
+ border-radius: 2px;
1207
+ color: var(--text-secondary);
1208
+ cursor: pointer;
1209
+ font-size: 0.75em;
1210
+ font-family: inherit;
1211
+ margin-left: 4px;
1212
+ text-decoration: none;
1213
+ display: inline-block;
1214
+ }
1215
+
1216
+ .hf-btn:hover {
1217
+ color: var(--text-primary);
1218
+ background: var(--bg-primary);
1219
+ text-decoration: none;
1220
+ }
1221
+
1222
+ .output-stale {
1223
+ opacity: 0.5;
1224
+ position: relative;
1225
+ }
1226
+
1227
+ .output-stale::after {
1228
+ content: '⏳ updating...';
1229
+ position: absolute;
1230
+ top: 8px;
1231
+ right: 8px;
1232
+ background: var(--bg-secondary);
1233
+ padding: 4px 8px;
1234
+ border-radius: 2px;
1235
+ font-size: 0.75em;
1236
+ color: var(--text-secondary);
1237
+ border: 1px solid var(--border-primary);
1238
+ }
1239
+
1240
+ h1,
1241
+ h2,
1242
+ h3,
1243
+ h4,
1244
+ h5,
1245
+ h6 {
1246
+ margin-top: 1.5rem;
1247
+ margin-bottom: 0.75rem;
1248
+ color: var(--text-primary);
1249
+ }
1250
+
1251
+ h1 {
1252
+ margin-top: 0;
1253
+ margin-bottom: 1rem;
1254
+ }
1255
+
1256
+ p {
1257
+ margin: 0.75rem 0;
1258
+ color: var(--text-primary);
1259
+ }
1260
+
1261
+ a {
1262
+ color: var(--text-link);
1263
+ }
1264
+
1265
+ img {
1266
+ max-width: 100%;
1267
+ height: auto;
1268
+ border-radius: 1px;
1269
+ box-shadow: none;
1270
+ }
1271
+
1272
+ pre,
1273
+ code {
1274
+ font-family: 'Cascadia Mono', 'Cascadia Code', 'JetBrains Mono', 'SF Mono', Monaco, 'Consolas', monospace;
1275
+ font-size: var(--code-font-size);
1276
+ }
1277
+
1278
+ .code-wrap {
1279
+ position: relative;
1280
+ }
1281
+
1282
+ .code-line-highlight {
1283
+ display: none;
1284
+ position: absolute;
1285
+ left: 0;
1286
+ right: 0;
1287
+ height: 1.5em;
1288
+ background: rgba(255, 235, 170, 0.35);
1289
+ pointer-events: none;
1290
+ border-left: 3px solid #f4c542;
1291
+ }
1292
+
1293
+ .line-number {
1294
+ cursor: pointer;
1295
+ text-decoration: none;
1296
+ color: var(--text-secondary);
1297
+ padding: 0 0.25rem;
1298
+ }
1299
+
1300
+ .line-number.selected {
1301
+ background: rgba(255, 235, 170, 0.4);
1302
+ color: var(--text-primary);
1303
+ }
1304
+
1305
+ /* Line numbers */
1306
+ .highlight-with-lines {
1307
+ display: flex;
1308
+ }
1309
+
1310
+ .line-numbers {
1311
+ background: var(--bg-tertiary);
1312
+ padding: var(--code-pad-y) 0.5rem;
1313
+ font-family: 'Cascadia Mono', 'Cascadia Code', 'JetBrains Mono', 'SF Mono', Monaco, 'Consolas', monospace;
1314
+ font-size: var(--code-font-size);
1315
+ line-height: var(--code-line-height);
1316
+ color: var(--text-secondary);
1317
+ user-select: none;
1318
+ text-align: right;
1319
+ border-right: 1px solid var(--border-primary);
1320
+ }
1321
+
1322
+ .line-numbers .line-number {
1323
+ display: block;
1324
+ line-height: var(--code-line-height);
1325
+ }
1326
+
1327
+ .highlight-with-lines .highlight {
1328
+ flex: 1;
1329
+ }
1330
+
1331
+ .highlight .hll {
1332
+ background-color: transparent;
1333
+ }
1334
+
1335
+ /* don't conflict with our highlight */
1336
+ .highlight pre {
1337
+ white-space: pre;
1338
+ margin: 0;
1339
+ padding: var(--code-pad-y) 0.75rem;
1340
+ line-height: var(--code-line-height);
1341
+ }
1342
+
1343
+ /* Collapsed code styling */
1344
+ .cell-code.collapsed {
1345
+ display: none;
1346
+ }
1347
+
1348
+ .cell-code.expanded {
1349
+ display: block;
1350
+ }
1351
+
1352
+ {
1353
+ % if config.collapse_code %
1354
+ }
1355
+
1356
+ .cell-code {
1357
+ display: none;
1358
+ }
1359
+
1360
+ {
1361
+ % else %
1362
+ }
1363
+
1364
+ .cell-code {
1365
+ display: block;
1366
+ border-bottom: 1px solid var(--border-primary);
1367
+ }
1368
+
1369
+ {
1370
+ % endif %
1371
+ }
1372
+
1373
+ {
1374
+ {
1375
+ pygments_css
1376
+ }
1377
+ }
1378
+
1379
+ /* Ensure our code metrics override Pygments defaults */
1380
+ .highlight pre {
1381
+ white-space: pre;
1382
+ margin: 0;
1383
+ padding: var(--code-pad-y) 0.75rem !important;
1384
+ line-height: var(--code-line-height) !important;
1385
+ font-size: var(--code-font-size) !important;
1386
+ font-family: 'Cascadia Mono', 'Cascadia Code', 'JetBrains Mono', 'SF Mono', Monaco, 'Consolas', monospace !important;
1387
+ border: none;
1388
+ }
1389
+
1390
+ .line-numbers {
1391
+ line-height: var(--code-line-height) !important;
1392
+ }
1393
+
1394
+ .line-numbers .line-number {
1395
+ line-height: var(--code-line-height) !important;
1396
+ }
1397
+
1398
+ /* Custom CSS from frontmatter */
1399
+ {
1400
+ {
1401
+ config.custom_css
1402
+ }
1403
+ }
1404
+
1405
+ {
1406
+ # Override code font size from frontmatter (accept number as px) #
1407
+ }
1408
+
1409
+ {
1410
+ % if config.code_font_size is not none %
1411
+ }
1412
+
1413
+ {
1414
+ % if config.code_font_size is string %
1415
+ }
1416
+
1417
+ :root {
1418
+ --code-font-size: {
1419
+ {
1420
+ config.code_font_size
1421
+ }
1422
+ }
1423
+
1424
+ ;
1425
+ }
1426
+
1427
+ {
1428
+ % else %
1429
+ }
1430
+
1431
+ :root {
1432
+ --code-font-size: {
1433
+ {
1434
+ config.code_font_size
1435
+ }
1436
+ }
1437
+
1438
+ px;
1439
+ }
1440
+
1441
+ {
1442
+ % endif %
1443
+ }
1444
+
1445
+ {
1446
+ % endif %
1447
+ }
1448
+
1449
+ /* Cursor for tools */
1450
+ body[data-tool="arrow"] .main-content {
1451
+ cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23e53935" stroke-width="2"><path d="M12 19l7-7 3 3-7 7-3-3z"/><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"/><path d="M2 2l7.586 7.586"/><circle cx="11" cy="11" r="2"/></svg>') 12 12, crosshair;
1452
+ }
1453
+
1454
+ body[data-tool="pen"] .main-content {
1455
+ cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23e53935" stroke-width="2"><path d="M12 19l7-7 3 3-7 7-3-3z"/><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"/><circle cx="4" cy="20" r="2" fill="%23e53935"/></svg>') 4 20, pointer;
1456
+ }
1457
+
1458
+ body[data-tool="eraser"] .main-content {
1459
+ cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23e53935" stroke-width="2"><path d="M20 20H7l-7-7 7-7h13v14z"/><path d="M13 13l7-7"/><path d="M13 13L9 9"/></svg>') 12 12, auto;
1460
+ }
1461
+
1462
+ /* Color picker styles */
1463
+ .tools-section-title {
1464
+ font-weight: bold;
1465
+ color: var(--text-secondary);
1466
+ font-size: 0.65rem;
1467
+ margin: 0.75rem 0 0.5rem 0;
1468
+ text-transform: uppercase;
1469
+ letter-spacing: 0.5px;
1470
+ }
1471
+
1472
+ .color-row {
1473
+ display: grid;
1474
+ grid-template-columns: repeat(6, 1fr);
1475
+ gap: 0.25rem;
1476
+ margin-bottom: 0.5rem;
1477
+ }
1478
+
1479
+ .color-swatch {
1480
+ width: 18px;
1481
+ height: 18px;
1482
+ border: 2px solid var(--border-primary);
1483
+ border-radius: 3px;
1484
+ cursor: pointer;
1485
+ transition: all 0.2s ease;
1486
+ position: relative;
1487
+ }
1488
+
1489
+ .color-swatch:hover {
1490
+ transform: scale(1.1);
1491
+ border-color: var(--text-secondary);
1492
+ }
1493
+
1494
+ .color-swatch.selected {
1495
+ border-color: var(--text-primary);
1496
+ box-shadow: 0 0 0 2px var(--text-link);
1497
+ }
1498
+
1499
+ .color-swatch.selected::after {
1500
+ content: '✓';
1501
+ position: absolute;
1502
+ top: 50%;
1503
+ left: 50%;
1504
+ transform: translate(-50%, -50%);
1505
+ color: white;
1506
+ font-size: 10px;
1507
+ font-weight: bold;
1508
+ text-shadow: 1px 1px 1px black;
1509
+ }
1510
+
1511
+ .color-input {
1512
+ width: 24px;
1513
+ height: 24px;
1514
+ border: 2px solid var(--border-primary);
1515
+ border-radius: 3px;
1516
+ cursor: pointer;
1517
+ background: none;
1518
+ padding: 0;
1519
+ grid-column: span 2;
1520
+ justify-self: center;
1521
+ }
1522
+
1523
+ .color-input:hover {
1524
+ border-color: var(--text-secondary);
1525
+ }
1526
+
1527
+ /* Thickness slider styles */
1528
+ .thickness-row {
1529
+ display: flex;
1530
+ align-items: center;
1531
+ gap: 0.5rem;
1532
+ margin-top: 0.75rem;
1533
+ }
1534
+
1535
+ .thickness-slider {
1536
+ flex: 1;
1537
+ -webkit-appearance: none;
1538
+ appearance: none;
1539
+ height: 4px;
1540
+ background: var(--border-primary);
1541
+ border-radius: 2px;
1542
+ outline: none;
1543
+ opacity: 0.7;
1544
+ transition: opacity 0.2s;
1545
+ }
1546
+
1547
+ .thickness-slider:hover {
1548
+ opacity: 1;
1549
+ }
1550
+
1551
+ .thickness-slider::-webkit-slider-thumb {
1552
+ -webkit-appearance: none;
1553
+ appearance: none;
1554
+ width: 12px;
1555
+ height: 12px;
1556
+ background: var(--text-link);
1557
+ border-radius: 50%;
1558
+ cursor: pointer;
1559
+ }
1560
+
1561
+ .thickness-slider::-moz-range-thumb {
1562
+ width: 12px;
1563
+ height: 12px;
1564
+ background: var(--text-link);
1565
+ border-radius: 50%;
1566
+ cursor: pointer;
1567
+ border: none;
1568
+ }
1569
+
1570
+ .thickness-value {
1571
+ font-size: 0.7rem;
1572
+ color: var(--text-secondary);
1573
+ min-width: 20px;
1574
+ text-align: right;
1575
+ }
1576
+
1577
+ .highlight {
1578
+ background: none !important;
1579
+ }
1580
+
1581
+ /* Loading animations */
1582
+ .loading-spinner {
1583
+ display: inline-block;
1584
+ width: 16px;
1585
+ height: 16px;
1586
+ border: 2px solid var(--border-primary);
1587
+ border-radius: 50%;
1588
+ border-top-color: var(--text-link);
1589
+ animation: spin 1s linear infinite;
1590
+ margin-right: 8px;
1591
+ vertical-align: middle;
1592
+ }
1593
+
1594
+ @keyframes spin {
1595
+ to {
1596
+ transform: rotate(360deg);
1597
+ }
1598
+ }
1599
+
1600
+ .loading-skeleton {
1601
+ display: inline-block;
1602
+ background: var(--bg-tertiary);
1603
+ background: linear-gradient(90deg,
1604
+ var(--bg-tertiary) 25%,
1605
+ var(--bg-secondary) 50%,
1606
+ var(--bg-tertiary) 75%);
1607
+ background-size: 200% 100%;
1608
+ animation: loading-shimmer 2s ease-in-out infinite;
1609
+ border-radius: 2px;
1610
+ height: 1em;
1611
+ width: 80px;
1612
+ vertical-align: middle;
1613
+ }
1614
+
1615
+ @keyframes loading-shimmer {
1616
+ 0% {
1617
+ background-position: -200% 0;
1618
+ }
1619
+
1620
+ 100% {
1621
+ background-position: 200% 0;
1622
+ }
1623
+ }
1624
+
1625
+ /* Loading state for cell output */
1626
+ .cell-output:has(.loading-spinner) {
1627
+ opacity: 0.7;
1628
+ background: var(--bg-secondary);
1629
+ /* border-left: 3px solid var(--text-link); */
1630
+ }
1631
  </style>
1632
  <script>
1633
  // --- Drag utilities ---
 
4106
  <span onclick="toggleOutput('benchmark')" style="cursor: pointer;">▼ output</span>
4107
  <span id="uv-indicator-benchmark" style="cursor: default; opacity: 0.3;">▶ uv-logs</span>
4108
  </span> |
4109
+ Cell: benchmark | 4.12s
4110
  | <button class="run-btn" onclick="runCell('benchmark')">▶ run</button>
4111
  <button class="copy-btn" onclick="copyCell('benchmark')">Copy</button>
4112
  <a href="cells/benchmark.py" target="_blank" class="raw-btn">Raw</a>
 
4155
  <div class="cell-stdout"><pre class="stdout-text">Running attention benchmark on cuda with 6 workloads.
4156
  impl wl p50(ms) ok
4157
  sage_int8_fp16 cuda_attn_L128_bfloat16 FAIL False
4158
+ Error: module &#x27;sage_attention_cb34d81dafacbad9&#x27; has no attribute &#x27;fwd&#x27;
4159
  sage_int8_fp16 cuda_attn_L256_bfloat16 FAIL False
4160
+ Error: module &#x27;sage_attention_cb34d81dafacbad9&#x27; has no attribute &#x27;fwd&#x27;
4161
  sage_int8_fp16 cuda_attn_L320_bfloat16 FAIL False
4162
+ Error: module &#x27;sage_attention_cb34d81dafacbad9&#x27; has no attribute &#x27;fwd&#x27;
4163
  sage_int8_fp16 cuda_attn_L384_bfloat16 FAIL False
4164
+ Error: module &#x27;sage_attention_cb34d81dafacbad9&#x27; has no attribute &#x27;fwd&#x27;
4165
  sage_int8_fp16 cuda_attn_L448_bfloat16 FAIL False
4166
+ Error: module &#x27;sage_attention_cb34d81dafacbad9&#x27; has no attribute &#x27;fwd&#x27;
4167
  sage_int8_fp16 cuda_attn_L512_bfloat16 FAIL False
4168
+ Error: module &#x27;sage_attention_cb34d81dafacbad9&#x27; has no attribute &#x27;fwd&#x27;
4169
  </pre></div>
4170
  <div class="cell-stderr">
4171
  Fetching 11 files: 0%| | 0/11 [00:00&lt;?, ?it/s]
4172
+ Fetching 11 files: 18%|█▊ | 2/11 [00:00&lt;00:00, 17.35it/s]
4173
+ Fetching 11 files: 73%|███████▎ | 8/11 [00:00&lt;00:00, 15.18it/s]
4174
+ Fetching 11 files: 100%|██████████| 11/11 [00:00&lt;00:00, 21.06it/s]
4175
  </div>
4176
  <div class="cell-artifacts">
4177
  <h4>Artifacts:</h4>
flash_attn/impls/xformers.html CHANGED
The diff for this file is too large to render. See raw diff
 
flash_attn/results/artifacts/combine/latency.svg CHANGED

Git LFS Details

  • SHA256: 567d9c3aecb5f005a8679995284fab5112829f643a670a3a2d3688588b305153
  • Pointer size: 130 Bytes
  • Size of remote file: 24.8 kB

Git LFS Details

  • SHA256: c6390d15c17c1cced5612c62eb1fb07f7304765d3d9c2c842f634fd3107bbeaf
  • Pointer size: 130 Bytes
  • Size of remote file: 24.8 kB
flash_attn/results/combined_results.html CHANGED
The diff for this file is too large to render. See raw diff
 
index.html CHANGED
@@ -4,6 +4,11 @@
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>index</title>
 
 
 
 
 
7
  <script>
8
  // Iframe-friendly navigation router
9
  (function() {
@@ -87,1320 +92,1542 @@
87
  </script>
88
  <style>
89
  :root[data-theme="light"] {
90
- --bg-primary: #ffffff;
91
- --bg-secondary: #f6f8fa;
92
- --bg-tertiary: #f8f9fa;
93
- --bg-code: #f8f9fa;
94
- --bg-error: #fdf2f2;
95
- --bg-artifact: #e6f3ff;
96
- --bg-artifact-hover: #d0e7ff;
97
-
98
- --text-primary: #333;
99
- --text-secondary: #656d76;
100
- --text-error: #c53030;
101
- --text-link: #0969da;
102
-
103
- --border-primary: #e1e5e9;
104
- --border-error: #e53e3e;
105
- --border-cell-failed: #d73a49;
106
-
107
- --shadow: rgba(0, 0, 0, 0.1);
108
- }
109
-
110
- :root[data-theme="dark"] {
111
- --bg-primary: #0a0a0a;
112
- --bg-secondary: #121212;
113
- --bg-tertiary: #181818;
114
- --bg-code: #0d0d0d;
115
- --bg-error: #1a0f0f;
116
- --bg-artifact: #151515;
117
- --bg-artifact-hover: #1a1a1a;
118
-
119
- --text-primary: #e0e0e0;
120
- --text-secondary: #888888;
121
- --text-error: #ff6b6b;
122
- --text-link: #64b5f6;
123
-
124
- --border-primary: #2a2a2a;
125
- --border-error: #ff6b6b;
126
- --border-cell-failed: #ff6b6b;
127
-
128
- --shadow: rgba(255, 255, 255, 0.05);
129
- }
130
- /* Monocolor UI theme: black/white background, all text/borders single blue */
131
- :root[data-ui="monocolor"] { --mono-color: #0a66ff; }
132
- :root[data-ui="monocolor"][data-theme="light"] {
133
- --bg-primary: #ffffff;
134
- }
135
- :root[data-ui="monocolor"][data-theme="dark"] {
136
- --bg-primary: #000000;
137
- }
138
- :root[data-ui="monocolor"] {
139
- --bg-secondary: var(--bg-primary);
140
- --bg-tertiary: var(--bg-primary);
141
- --bg-code: var(--bg-primary);
142
- --bg-error: var(--bg-primary);
143
- --bg-artifact: var(--bg-primary);
144
- --bg-artifact-hover: var(--bg-primary);
145
-
146
- --text-primary: var(--mono-color);
147
- --text-secondary: var(--mono-color);
148
- --text-error: var(--mono-color);
149
- --text-link: var(--mono-color);
150
-
151
- --border-primary: var(--mono-color);
152
- --border-error: var(--mono-color);
153
- --border-cell-failed: var(--mono-color);
154
-
155
- --shadow: none;
156
- }
157
- :root[data-ui="monocolor"] a { color: var(--mono-color); }
158
- :root[data-ui="monocolor"] .menu-button,
159
- :root[data-ui="monocolor"] .theme-toggle,
160
- :root[data-ui="monocolor"] .reset-toggle,
161
- :root[data-ui="monocolor"] .back-button { background: var(--bg-primary); color: var(--mono-color); border-color: var(--mono-color); }
162
- :root[data-ui="monocolor"] .menu-button:hover,
163
- :root[data-ui="monocolor"] .theme-toggle:hover,
164
- :root[data-ui="monocolor"] .reset-toggle:hover,
165
- :root[data-ui="monocolor"] .back-button:hover { background: var(--bg-primary); color: var(--mono-color); border-color: var(--mono-color); }
166
- :root[data-ui="monocolor"] .menu-dropdown { background: var(--bg-primary); border-color: var(--mono-color); box-shadow: none; }
167
- :root[data-ui="monocolor"] .menu-item { color: var(--mono-color); border-bottom-color: var(--mono-color); }
168
- :root[data-ui="monocolor"] .system-info { background: var(--bg-primary); border-color: var(--mono-color); }
169
- :root[data-ui="monocolor"] .cell { border-color: var(--mono-color); background: var(--bg-primary); }
170
- :root[data-ui="monocolor"] .cell-header { background: var(--bg-primary); border-bottom-color: var(--mono-color); }
171
- :root[data-ui="monocolor"] .artifact { background: var(--bg-primary); border-color: var(--mono-color); color: var(--mono-color); }
172
- :root[data-ui="monocolor"] .artifact:hover { background: var(--bg-primary); }
173
- :root[data-ui="monocolor"] .artifact-preview img,
174
- :root[data-ui="monocolor"] .artifact-preview svg { border-color: var(--mono-color); }
175
- :root[data-ui="monocolor"] .status-widget { background: var(--bg-primary); border-color: var(--mono-color); color: var(--mono-color); }
176
- :root[data-ui="monocolor"] .minimap,
177
- :root[data-ui="monocolor"] .file-explorer,
178
- :root[data-ui="monocolor"] .tools-widget {
179
- background: var(--bg-primary);
180
- border-color: var(--mono-color);
181
- color: var(--mono-color);
182
- }
183
- :root[data-ui="monocolor"] .cell-code {
184
- background: var(--bg-primary);
185
- border-bottom-color: var(--mono-color);
186
- }
187
- :root[data-ui="monocolor"] .tools-title,
188
- :root[data-ui="monocolor"] .file-explorer-section-title,
189
- :root[data-ui="monocolor"] .minimap-title { color: var(--mono-color); border-bottom-color: var(--mono-color); }
190
- :root[data-ui="monocolor"] .tool-button { background: var(--bg-primary); border-color: var(--mono-color); color: var(--mono-color); }
191
- :root[data-ui="monocolor"] .tool-button.active { border-color: var(--mono-color); }
192
- :root[data-ui="monocolor"] .file-explorer-item,
193
- :root[data-ui="monocolor"] .minimap-item { color: var(--mono-color); }
194
- /* Force Pygments code to mono blue on mono bg */
195
- :root[data-ui="monocolor"] .highlight { background: var(--bg-primary) !important; color: var(--mono-color) !important; }
196
- :root[data-ui="monocolor"] .highlight *,
197
- :root[data-ui="monocolor"] .highlight .hll { color: var(--mono-color) !important; background: transparent !important; border-color: var(--mono-color) !important; }
198
- /* Default code font + metrics (overridable via frontmatter) */
199
- :root { --code-font-size: 0.95rem; --code-line-height: 1.5; --code-pad-y: 0.75rem; }
200
- /* Minimal UI theme overrides base variables for a flatter, 90s look */
201
- :root[data-ui="none"] {
202
- --bg-primary: #ffffff;
203
- --bg-secondary: transparent;
204
- --bg-tertiary: transparent;
205
- --bg-code: #f9f9f9;
206
- --bg-error: #fff0f0;
207
- --bg-artifact: #f0f7ff;
208
- --bg-artifact-hover: #e5f1ff;
209
-
210
- --text-primary: #000000;
211
- --text-secondary: #222222;
212
- --text-error: #a00000;
213
- --text-link: #0000ee;
214
-
215
- --border-primary: #cccccc;
216
- --border-error: #cc0000;
217
- --border-cell-failed: #cc0000;
218
-
219
- --shadow: none;
220
- }
221
- html {
222
- overscroll-behavior: none;
223
- }
224
- body {
225
- font-family: 'Cascadia Mono', 'Cascadia Code', 'JetBrains Mono', 'SF Mono', Monaco, 'Consolas', monospace;
226
- line-height: 1.4;
227
- max-width: 1000px;
228
- margin: 0 auto;
229
- padding: 15px;
230
- color: var(--text-primary);
231
- background: var(--bg-primary);
232
- transition: background-color 0.2s ease, color 0.2s ease;
233
- overscroll-behavior: none;
234
- }
235
- /* Minimal "none" UI theme overrides */
236
- :root[data-ui="none"] body {
237
- font-family: 'Times New Roman', Times, serif;
238
- line-height: 1.5;
239
- max-width: 860px;
240
- padding: 12px;
241
- background: #ffffff;
242
- color: #000000;
243
- transition: none;
244
- }
245
-
246
- /* Two panel layout removed */
247
-
248
- .controls {
249
- position: fixed;
250
- top: 20px;
251
- right: 20px;
252
- display: flex;
253
- flex-direction: column;
254
- align-items: flex-end;
255
- gap: 0.25rem;
256
- z-index: 1000;
257
- }
258
- .controls-buttons { display: flex; gap: 0.5rem; }
259
-
260
- .menu-button {
261
- position: relative;
262
- background: var(--bg-secondary);
263
- border: 1px solid var(--border-primary);
264
- padding: 8px 12px;
265
- border-radius: 2px;
266
- color: var(--text-secondary);
267
- cursor: pointer;
268
- font-family: inherit;
269
- font-size: 0.9rem;
270
- user-select: none;
271
- }
272
- /* Keep default control styling when widgets are enabled, even in minimal UI */
273
- :root[data-ui="none"][data-widgets="on"] .menu-button,
274
- :root[data-ui="none"][data-widgets="on"] .theme-toggle,
275
- :root[data-ui="none"][data-widgets="on"] .reset-toggle,
276
- :root[data-ui="none"][data-widgets="on"] .back-button {
277
- background: #f6f6f6;
278
- border: 1px solid #cccccc;
279
- color: #222222;
280
- }
281
-
282
- .menu-button:hover {
283
- color: var(--text-primary);
284
- background: var(--bg-tertiary);
285
- }
286
- /* Controls state indicator (top-right) */
287
- /* Status widget (bottom-right) */
288
- .status-widget {
289
- position: fixed;
290
- right: 20px;
291
- bottom: 20px;
292
- width: auto;
293
- max-width: 260px;
294
- background: var(--bg-secondary);
295
- border: 1px solid var(--border-primary);
296
- border-radius: 2px;
297
- padding: 6px 8px;
298
- font-size: 0.8rem;
299
- color: var(--text-secondary);
300
- z-index: 100;
301
- }
302
- .status-widget strong { color: var(--text-primary); }
303
- :root[data-ui="none"][data-widgets="on"] .status-widget { background: #f6f6f6; border-color: #ccc; color: #222; }
304
- :root[data-ui="none"][data-widgets="on"] .menu-button:hover,
305
- :root[data-ui="none"][data-widgets="on"] .theme-toggle:hover,
306
- :root[data-ui="none"][data-widgets="on"] .reset-toggle:hover,
307
- :root[data-ui="none"][data-widgets="on"] .back-button:hover {
308
- background: #ededed;
309
- border-color: #bbbbbb;
310
- color: #000000;
311
- }
312
-
313
- .menu-dropdown {
314
- position: absolute;
315
- top: 100%;
316
- right: 0;
317
- background: var(--bg-secondary);
318
- border: 1px solid var(--border-primary);
319
- border-radius: 4px;
320
- box-shadow: 0 4px 12px var(--shadow);
321
- min-width: 160px;
322
- opacity: 0;
323
- visibility: hidden;
324
- transform: translateY(-8px);
325
- transition: all 0.2s ease;
326
- z-index: 1001;
327
- margin-top: 4px;
328
- }
329
- :root[data-ui="none"][data-widgets="on"] .menu-dropdown { background: #ffffff; border: 1px solid #cccccc; box-shadow: none; }
330
-
331
- .menu-button.active .menu-dropdown {
332
- opacity: 1;
333
- visibility: visible;
334
- transform: translateY(0);
335
- }
336
-
337
- .menu-item {
338
- display: block;
339
- padding: 8px 12px;
340
- color: var(--text-secondary);
341
- text-decoration: none;
342
- font-size: 0.85rem;
343
- border-bottom: 1px solid var(--border-primary);
344
- cursor: pointer;
345
- }
346
- :root[data-ui="none"] .menu-item { color: #000; border-bottom: 1px solid #eee; }
347
-
348
- .menu-item:last-child {
349
- border-bottom: none;
350
- }
351
-
352
- .menu-item:hover {
353
- background: var(--bg-tertiary);
354
- color: var(--text-primary);
355
- }
356
-
357
- .menu-checkbox {
358
- display: inline-block;
359
- width: 16px;
360
- font-family: monospace;
361
- color: var(--text-link);
362
- }
363
-
364
- .theme-toggle,
365
- .reset-toggle,
366
- .back-button {
367
- background: var(--bg-secondary);
368
- border: 1px solid var(--border-primary);
369
- padding: 8px 12px;
370
- border-radius: 4px;
371
- color: var(--text-secondary);
372
- cursor: pointer;
373
- font-family: inherit;
374
- font-size: 0.9rem;
375
- user-select: none;
376
- }
377
-
378
- .back-button {
379
- text-decoration: none;
380
- display: inline-block;
381
- }
382
-
383
- .theme-toggle:hover,
384
- .reset-toggle:hover,
385
- .back-button:hover {
386
- color: var(--text-primary);
387
- background: var(--bg-tertiary);
388
- }
389
-
390
- .system-info {
391
- background: var(--bg-secondary);
392
- border: 1px solid var(--border-primary);
393
- border-radius: 4px;
394
- padding: 8px 12px;
395
- margin-bottom: 16px;
396
- font-size: 0.85em;
397
- color: var(--text-secondary);
398
- }
399
-
400
- .system-info-header {
401
- font-weight: 600;
402
- color: var(--text-primary);
403
- margin-bottom: 2px;
404
- }
405
-
406
- .system-info-content {
407
- font-family: monospace;
408
- }
409
-
410
- .theme-toggle, .reset-toggle {
411
- background: var(--bg-secondary);
412
- border: 1px solid var(--border-primary);
413
- border-radius: 2px;
414
- /* padding: 0.4rem 0.6rem; */
415
- cursor: pointer;
416
- font-family: inherit;
417
- font-size: 0.8rem;
418
- color: var(--text-secondary);
419
- user-select: none;
420
- transition: all 0.2s ease;
421
- text-transform: lowercase;
422
- letter-spacing: 0;
423
- }
424
-
425
- .theme-toggle:hover, .reset-toggle:hover {
426
- background: var(--bg-tertiary);
427
- border-color: var(--text-secondary);
428
- color: var(--text-primary);
429
- }
430
-
431
- .minimap {
432
- position: fixed;
433
- bottom: 20px;
434
- right: 20px;
435
- width: 220px;
436
- max-height: 400px;
437
- background: var(--bg-secondary);
438
- border: 1px solid var(--border-primary);
439
- border-radius: 2px;
440
- padding: 0.5rem;
441
- font-size: 0.7rem;
442
- overflow-y: auto;
443
- z-index: 100;
444
- opacity: 0.9;
445
- transition: opacity 0.2s ease;
446
- }
447
- /* Hide widgets and controls when disabled via frontmatter */
448
- :root[data-widgets="off"] .controls,
449
- :root[data-widgets="off"] .minimap,
450
- :root[data-widgets="off"] .file-explorer,
451
- :root[data-widgets="off"] .tools-widget,
452
- :root[data-widgets="off"] .status-widget { display: none !important; }
453
-
454
- .file-explorer {
455
- position: fixed;
456
- bottom: 20px; /* default; JS will stack */
457
- right: 20px;
458
- left: auto;
459
- top: auto;
460
- width: 220px;
461
- max-height: 400px;
462
- background: var(--bg-secondary);
463
- border: 1px solid var(--border-primary);
464
- border-radius: 2px;
465
- padding: 0.5rem;
466
- font-size: 0.7rem;
467
- overflow-y: auto;
468
- z-index: 100;
469
- opacity: 0.9;
470
- transition: opacity 0.2s ease;
471
- }
472
-
473
- /* Drawing overlay */
474
- .draw-overlay {
475
- position: fixed;
476
- top: 0;
477
- left: 0;
478
- width: 100vw;
479
- height: 100vh;
480
- z-index: 80; /* under widgets (100) and controls (1000) */
481
- display: block;
482
- pointer-events: none; /* enabled only when a tool is active */
483
- }
484
-
485
- /* Tools widget */
486
- .tools-widget {
487
- position: fixed;
488
- bottom: 20px; /* default; JS will stack */
489
- right: 20px;
490
- left: auto;
491
- top: auto;
492
- width: 220px;
493
- background: var(--bg-secondary);
494
- border: 1px solid var(--border-primary);
495
- border-radius: 2px;
496
- padding: 0.5rem;
497
- font-size: 0.7rem;
498
- z-index: 100;
499
- opacity: 0.95;
500
- }
501
- .tools-title {
502
- font-weight: bold;
503
- color: var(--text-secondary);
504
- margin-bottom: 0.5rem;
505
- padding-bottom: 0.25rem;
506
- border-bottom: 1px solid var(--border-primary);
507
- cursor: grab;
508
- user-select: none;
509
- }
510
- .tools-row { display: flex; gap: 0.4rem; flex-wrap: wrap; }
511
- .tool-button {
512
- background: var(--bg-tertiary);
513
- border: 1px solid var(--border-primary);
514
- border-radius: 2px;
515
- padding: 0.25rem 0.4rem;
516
- cursor: pointer;
517
- color: var(--text-secondary);
518
- font-family: inherit;
519
- font-size: 0.75rem;
520
- user-select: none;
521
- }
522
- .tool-button:hover { color: var(--text-primary); }
523
- .tool-button.active { color: var(--text-primary); border-color: var(--text-secondary); background: var(--bg-secondary); }
524
-
525
- .minimap:hover, .file-explorer:hover {
526
- opacity: 1;
527
- }
528
-
529
- .minimap-title {
530
- font-weight: bold;
531
- color: var(--text-secondary);
532
- margin-bottom: 0.5rem;
533
- padding-bottom: 0.25rem;
534
- border-bottom: 1px solid var(--border-primary);
535
- cursor: grab; /* drag handle */
536
- user-select: none;
537
- }
538
-
539
- .minimap-item {
540
- display: block;
541
- color: var(--text-secondary);
542
- text-decoration: none;
543
- padding: 0.15rem 0;
544
- border-left: 2px solid transparent;
545
- padding-left: 0.5rem;
546
- transition: all 0.2s ease;
547
- cursor: pointer;
548
- }
549
-
550
- .minimap-item:hover {
551
- color: var(--text-primary);
552
- border-left-color: var(--text-secondary);
553
- }
554
-
555
- .minimap-item.active {
556
- color: var(--text-primary);
557
- border-left-color: var(--text-link);
558
- }
559
-
560
- .minimap-heading {
561
- font-weight: normal;
562
- }
563
-
564
- .minimap-heading.h1 { padding-left: 0.5rem; }
565
- .minimap-heading.h2 { padding-left: 1rem; }
566
- .minimap-heading.h3 { padding-left: 1.5rem; }
567
- .minimap-heading.h4 { padding-left: 2rem; }
568
- .minimap-heading.h5 { padding-left: 2.5rem; }
569
- .minimap-heading.h6 { padding-left: 3rem; }
570
-
571
- .minimap-cell {
572
- color: var(--text-link);
573
- opacity: 0.8;
574
- font-style: italic;
575
- }
576
-
577
- .minimap-cell:hover {
578
- opacity: 1;
579
- }
580
-
581
- .file-explorer-title {
582
- font-weight: bold;
583
- color: var(--text-secondary);
584
- margin-bottom: 0.5rem;
585
- padding-bottom: 0.25rem;
586
- border-bottom: 1px solid var(--border-primary);
587
- cursor: grab; /* drag handle */
588
- user-select: none;
589
- }
590
-
591
- .file-explorer-section {
592
- margin-bottom: 0.75rem;
593
- }
594
-
595
- .file-explorer-section-title {
596
- font-weight: bold;
597
- color: var(--text-secondary);
598
- font-size: 0.65rem;
599
- margin-bottom: 0.25rem;
600
- text-transform: uppercase;
601
- letter-spacing: 0.5px;
602
- }
603
-
604
- .file-explorer-item {
605
- display: block;
606
- color: var(--text-secondary);
607
- text-decoration: none;
608
- padding: 0.1rem 0;
609
- margin-left: 0.5rem;
610
- transition: color 0.2s ease;
611
- cursor: pointer;
612
- font-family: monospace;
613
- }
614
-
615
- .file-explorer-item:hover {
616
- color: var(--text-primary);
617
- }
618
-
619
- .file-explorer-item.script {
620
- color: var(--text-link);
621
- }
622
-
623
- .file-explorer-item.artifact {
624
- color: var(--text-secondary);
625
- opacity: 0.8;
626
- }
627
-
628
-
629
- /* Hide widgets on smaller screens */
630
- @media (max-width: 768px) {
631
- .minimap, .file-explorer, .tools-widget {
632
- display: none;
633
- }
634
- }
635
-
636
- .cell {
637
- margin: 1rem 0;
638
- border: 1px solid var(--border-primary);
639
- border-radius: 2px;
640
- overflow: hidden;
641
- background: var(--bg-secondary);
642
- }
643
- :root[data-ui="none"] .cell { margin: 1em 0; border: none; background: transparent; }
644
- .cell-header {
645
- background: var(--bg-secondary);
646
- padding: 0.5rem 1rem;
647
- border-bottom: 1px solid var(--border-primary);
648
- font-family: inherit;
649
- font-size: 0.85rem;
650
- }
651
- :root[data-ui="none"] .cell-header { background: transparent; border: none; padding: 0; font-weight: bold; }
652
- :root[data-ui="none"] .cell-content { padding: 0; }
653
- :root[data-ui="none"] .copy-button,
654
- :root[data-ui="none"] .collapse-indicators,
655
- :root[data-ui="none"] .cell-meta,
656
- :root[data-ui="none"] .cell-outputs-header { display: none !important; }
657
- :root[data-ui="none"] pre, :root[data-ui="none"] code { font-family: Menlo, Monaco, 'Courier New', monospace; }
658
- :root[data-ui="none"] .code-content pre { background: #f9f9f9; border: 1px solid #ddd; padding: 8px; }
659
- :root[data-ui="none"] .output { background: transparent; border: none; padding: 0.25em 0; }
660
- color: var(--text-secondary);
661
- cursor: pointer;
662
- user-select: none;
663
- transition: background-color 0.2s ease;
664
- }
665
- .cell-header:hover {
666
- background: var(--bg-tertiary);
667
- }
668
- .collapse-indicators {
669
- color: var(--text-secondary);
670
- font-size: 0.8rem;
671
- opacity: 0.7;
672
- }
673
- .collapse-indicators span:hover {
674
- color: var(--text-primary);
675
- opacity: 1;
676
- }
677
- .cell-code {
678
- display: block;
679
- background: var(--bg-code);
680
- }
681
- .cell-code.collapsed {
682
- display: none;
683
- }
684
- .cell-code pre {
685
- margin: 0;
686
- padding: 0.75rem;
687
- background: var(--bg-code);
688
- overflow-x: auto;
689
- color: var(--text-primary);
690
- }
691
- .cell-output {
692
- padding: 0.75rem;
693
- /* background: var(--bg-primary); */
694
- background: var(--bg-secondary);
695
- }
696
- .cell-output.collapsed {
697
- display: none;
698
- }
699
- .cell-stdout {
700
- background: var(--bg-tertiary);
701
- padding: 0.75rem;
702
- border-radius: 1px;
703
- /* margin: 0.25rem 0; */
704
- font-family: inherit;
705
- font-size: 0.9rem;
706
- white-space: pre-wrap;
707
- color: var(--text-primary);
708
- }
709
-
710
- .cell-stdout {
711
- background: var(--bg-tertiary);
712
- padding: 0.75rem;
713
- border-radius: 1px;
714
- font-family: inherit;
715
- font-size: 0.9rem;
716
- color: var(--text-primary);
717
-
718
- /* key bits */
719
- overflow: auto; /* show scrollbars when needed */
720
- max-width: 100%; /* respects whatever layout width you give it */
721
- }
722
-
723
- .cell-stdout .stdout-text {
724
- margin: 0; /* reset pre default margin */
725
- white-space: pre; /* keep line breaks, NO wrapping */
726
- display: inline-block; /* shrink-to-content */
727
- min-width: max-content; /* allow very long lines to define intrinsic width */
728
- font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
729
- tab-size: 2;
730
- }
731
-
732
- .cell-stderr {
733
- background: var(--bg-error);
734
- border-left: 2px solid var(--border-error);
735
- padding: 1rem;
736
- margin: 0.5rem 0;
737
- font-family: inherit;
738
- font-size: 0.9rem;
739
- color: var(--text-error);
740
- white-space: pre-wrap;
741
- }
742
- .uv-install-logs {
743
- margin: 0.5rem 0;
744
- }
745
- .uv-logs-header {
746
- cursor: pointer;
747
- padding: 0.75rem;
748
- border-left: 3px solid var(--border-color);
749
- font-family: inherit;
750
- font-size: 0.85rem;
751
- color: var(--text-secondary);
752
- user-select: none;
753
- }
754
- .uv-logs-content {
755
- background: var(--bg-secondary);
756
- padding: 1rem;
757
- border-left: 3px solid var(--border-color);
758
- white-space: pre-wrap;
759
- font-family: monospace;
760
- font-size: 0.85rem;
761
- color: var(--text-secondary);
762
- overflow-x: auto;
763
- }
764
- .cell-artifacts {
765
- margin: 1rem 0;
766
- }
767
- .cell-artifacts h4 {
768
- margin: 0 0 0.5rem 0;
769
- color: var(--text-secondary);
770
- font-size: 0.9rem;
771
- }
772
- .artifact {
773
- display: inline-block;
774
- background: var(--bg-artifact);
775
- padding: 0.25rem 0.5rem;
776
- border-radius: 1px;
777
- margin: 0.25rem 0.5rem 0.25rem 0;
778
- font-family: inherit;
779
- font-size: 0.8rem;
780
- color: var(--text-link);
781
- text-decoration: none;
782
- transition: background-color 0.2s ease;
783
- border: 1px solid var(--border-primary);
784
- }
785
- .artifact:hover {
786
- background: var(--bg-artifact-hover);
787
- }
788
- .artifact-preview {
789
- margin-top: 1rem;
790
- }
791
- .artifact-preview img {
792
- max-width: 100%;
793
- height: auto;
794
- border: 1px solid var(--border-primary);
795
- border-radius: 1px;
796
- }
797
- .artifact-preview svg {
798
- max-width: 100%;
799
- height: auto;
800
- border: 1px solid var(--border-primary);
801
- border-radius: 1px;
802
- display: block;
803
- }
804
- /* Style SVG text elements */
805
- .artifact-preview svg g {
806
- fill: var(--text-primary) !important;
807
- }
808
- /* Auto-theme SVG elements */
809
- .artifact-preview svg {
810
- background: transparent;
811
- }
812
- /* Invert SVG images in dark mode */
813
- :root[data-theme="dark"] .artifact-preview img[src$=".svg"] {
814
- filter: invert(0.9) hue-rotate(180deg);
815
- }
816
- /* Keep SVG images readable in monocolor mode */
817
- :root[data-ui="monocolor"] .artifact-preview img[src$=".svg"] {
818
- filter: none;
819
- }
820
- /* CSV table styling */
821
- .artifact-csv {
822
- margin-top: 1rem;
823
- overflow-x: auto;
824
- }
825
- .csv-table {
826
- width: 100%;
827
- border-collapse: collapse;
828
- font-size: 0.9rem;
829
- background: var(--bg-secondary);
830
- border: 1px solid var(--border-primary);
831
- border-radius: 1px;
832
- }
833
- .csv-table th,
834
- .csv-table td {
835
- padding: 0.5rem 0.75rem;
836
- text-align: left;
837
- border: 1px solid var(--border-primary);
838
- }
839
- .csv-table th {
840
- background: var(--bg-tertiary);
841
- font-weight: 600;
842
- color: var(--text-primary);
843
- }
844
- .csv-table tbody tr:hover {
845
- background: var(--bg-artifact-hover);
846
- }
847
- .artifact-csv-error {
848
- margin-top: 1rem;
849
- padding: 1rem;
850
- background: var(--bg-error);
851
- color: var(--text-error);
852
- border: 1px solid var(--border-error);
853
- border-radius: 1px;
854
- }
855
- .cell-failed {
856
- border-color: var(--border-cell-failed);
857
- }
858
- .cell-failed .cell-header {
859
- background: var(--bg-error);
860
- color: var(--text-error);
861
- }
862
- .cell-commented {
863
- opacity: 0.6;
864
- border-style: dashed;
865
- }
866
- .cell-commented .cell-header {
867
- background: var(--bg-secondary);
868
- color: var(--text-secondary);
869
- font-style: italic;
870
- }
871
- .run-btn {
872
- background: var(--bg-tertiary);
873
- border: 1px solid var(--border-primary);
874
- padding: 2px 6px;
875
- border-radius: 2px;
876
- color: var(--text-secondary);
877
- cursor: pointer;
878
- font-size: 0.75em;
879
- font-family: inherit;
880
- margin-left: 4px;
881
- }
882
- .run-btn:hover {
883
- color: var(--text-primary);
884
- background: var(--bg-primary);
885
- }
886
- .run-btn:disabled {
887
- opacity: 0.6;
888
- cursor: not-allowed;
889
- }
890
- .copy-btn {
891
- background: var(--bg-tertiary);
892
- border: 1px solid var(--border-primary);
893
- padding: 2px 6px;
894
- border-radius: 2px;
895
- color: var(--text-secondary);
896
- cursor: pointer;
897
- font-size: 0.75em;
898
- font-family: inherit;
899
- margin-left: 4px;
900
- }
901
- .copy-btn:hover {
902
- color: var(--text-primary);
903
- background: var(--bg-primary);
904
- }
905
- .copy-btn:disabled {
906
- opacity: 0.6;
907
- cursor: not-allowed;
908
- }
909
- .copy-btn.copied {
910
- color: #4caf50;
911
- background: var(--bg-primary);
912
- border-color: #4caf50;
913
- transition: all 0.2s ease;
914
- }
915
- .raw-btn {
916
- background: var(--bg-tertiary);
917
- border: 1px solid var(--border-primary);
918
- padding: 2px 6px;
919
- border-radius: 2px;
920
- color: var(--text-secondary);
921
- cursor: pointer;
922
- font-size: 0.75em;
923
- font-family: inherit;
924
- margin-left: 4px;
925
- text-decoration: none;
926
- display: inline-block;
927
- }
928
- .raw-btn:hover {
929
- color: var(--text-primary);
930
- background: var(--bg-primary);
931
- text-decoration: none;
932
- }
933
- .github-btn {
934
- background: var(--bg-tertiary);
935
- border: 1px solid var(--border-primary);
936
- padding: 2px 6px;
937
- border-radius: 2px;
938
- color: var(--text-secondary);
939
- cursor: pointer;
940
- font-size: 0.75em;
941
- font-family: inherit;
942
- margin-left: 4px;
943
- text-decoration: none;
944
- display: inline-block;
945
- }
946
- .github-btn:hover {
947
- color: var(--text-primary);
948
- background: var(--bg-primary);
949
- text-decoration: none;
950
- }
951
- .hf-btn {
952
- background: var(--bg-tertiary);
953
- border: 1px solid var(--border-primary);
954
- padding: 2px 6px;
955
- border-radius: 2px;
956
- color: var(--text-secondary);
957
- cursor: pointer;
958
- font-size: 0.75em;
959
- font-family: inherit;
960
- margin-left: 4px;
961
- text-decoration: none;
962
- display: inline-block;
963
- }
964
- .hf-btn:hover {
965
- color: var(--text-primary);
966
- background: var(--bg-primary);
967
- text-decoration: none;
968
- }
969
- .output-stale {
970
- opacity: 0.5;
971
- position: relative;
972
- }
973
- .output-stale::after {
974
- content: '⏳ updating...';
975
- position: absolute;
976
- top: 8px;
977
- right: 8px;
978
- background: var(--bg-secondary);
979
- padding: 4px 8px;
980
- border-radius: 2px;
981
- font-size: 0.75em;
982
- color: var(--text-secondary);
983
- border: 1px solid var(--border-primary);
984
- }
985
- h1, h2, h3, h4, h5, h6 {
986
- margin-top: 1.5rem;
987
- margin-bottom: 0.75rem;
988
- color: var(--text-primary);
989
- }
990
- h1 {
991
- margin-top: 0;
992
- margin-bottom: 1rem;
993
- }
994
- p {
995
- margin: 0.75rem 0;
996
- color: var(--text-primary);
997
- }
998
- a {
999
- color: var(--text-link);
1000
- }
1001
- img {
1002
- max-width: 100%;
1003
- height: auto;
1004
- border-radius: 1px;
1005
- box-shadow: none;
1006
- }
1007
- pre, code {
1008
- font-family: 'Cascadia Mono', 'Cascadia Code', 'JetBrains Mono', 'SF Mono', Monaco, 'Consolas', monospace;
1009
- font-size: var(--code-font-size);
1010
- }
1011
- .code-wrap { position: relative; }
1012
- .code-line-highlight { display: none; position: absolute; left: 0; right: 0; height: 1.5em; background: rgba(255, 235, 170, 0.35); pointer-events: none; border-left: 3px solid #f4c542; }
1013
- .line-number { cursor: pointer; text-decoration: none; color: var(--text-secondary); padding: 0 0.25rem; }
1014
- .line-number.selected { background: rgba(255, 235, 170, 0.4); color: var(--text-primary); }
1015
-
1016
- /* Line numbers */
1017
- .highlight-with-lines {
1018
- display: flex;
1019
- }
1020
- .line-numbers {
1021
- background: var(--bg-tertiary);
1022
- padding: var(--code-pad-y) 0.5rem;
1023
- font-family: 'Cascadia Mono', 'Cascadia Code', 'JetBrains Mono', 'SF Mono', Monaco, 'Consolas', monospace;
1024
- font-size: var(--code-font-size);
1025
- line-height: var(--code-line-height);
1026
- color: var(--text-secondary);
1027
- user-select: none;
1028
- text-align: right;
1029
- border-right: 1px solid var(--border-primary);
1030
- }
1031
- .line-numbers .line-number {
1032
- display: block;
1033
- line-height: var(--code-line-height);
1034
- }
1035
- .highlight-with-lines .highlight {
1036
- flex: 1;
1037
- }
1038
- .highlight .hll { background-color: transparent; } /* don't conflict with our highlight */
1039
- .highlight pre {
1040
- white-space: pre;
1041
- margin: 0;
1042
- padding: var(--code-pad-y) 0.75rem;
1043
- line-height: var(--code-line-height);
1044
- }
1045
-
1046
- /* Collapsed code styling */
1047
- .cell-code.collapsed {
1048
- display: none;
1049
- }
1050
- .cell-code.expanded {
1051
- display: block;
1052
- }
1053
-
1054
- .cell-code {
1055
- display: block;
1056
- border-bottom: 1px solid var(--border-primary);
1057
- }
1058
-
1059
-
1060
- pre { line-height: 125%; }
1061
- td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
1062
- span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
1063
- td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
1064
- span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
1065
- [data-theme="light"] .highlight .hll { background-color: #ffffcc }
1066
- [data-theme="light"] .highlight { background: #f8f8f8; }
1067
- [data-theme="light"] .highlight .c { color: #3D7B7B; font-style: italic } /* Comment */
1068
- [data-theme="light"] .highlight .err { border: 1px solid #F00 } /* Error */
1069
- [data-theme="light"] .highlight .k { color: #008000; font-weight: bold } /* Keyword */
1070
- [data-theme="light"] .highlight .o { color: #666 } /* Operator */
1071
- [data-theme="light"] .highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */
1072
- [data-theme="light"] .highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */
1073
- [data-theme="light"] .highlight .cp { color: #9C6500 } /* Comment.Preproc */
1074
- [data-theme="light"] .highlight .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */
1075
- [data-theme="light"] .highlight .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */
1076
- [data-theme="light"] .highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */
1077
- [data-theme="light"] .highlight .gd { color: #A00000 } /* Generic.Deleted */
1078
- [data-theme="light"] .highlight .ge { font-style: italic } /* Generic.Emph */
1079
- [data-theme="light"] .highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
1080
- [data-theme="light"] .highlight .gr { color: #E40000 } /* Generic.Error */
1081
- [data-theme="light"] .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
1082
- [data-theme="light"] .highlight .gi { color: #008400 } /* Generic.Inserted */
1083
- [data-theme="light"] .highlight .go { color: #717171 } /* Generic.Output */
1084
- [data-theme="light"] .highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
1085
- [data-theme="light"] .highlight .gs { font-weight: bold } /* Generic.Strong */
1086
- [data-theme="light"] .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
1087
- [data-theme="light"] .highlight .gt { color: #04D } /* Generic.Traceback */
1088
- [data-theme="light"] .highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
1089
- [data-theme="light"] .highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
1090
- [data-theme="light"] .highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
1091
- [data-theme="light"] .highlight .kp { color: #008000 } /* Keyword.Pseudo */
1092
- [data-theme="light"] .highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
1093
- [data-theme="light"] .highlight .kt { color: #B00040 } /* Keyword.Type */
1094
- [data-theme="light"] .highlight .m { color: #666 } /* Literal.Number */
1095
- [data-theme="light"] .highlight .s { color: #BA2121 } /* Literal.String */
1096
- [data-theme="light"] .highlight .na { color: #687822 } /* Name.Attribute */
1097
- [data-theme="light"] .highlight .nb { color: #008000 } /* Name.Builtin */
1098
- [data-theme="light"] .highlight .nc { color: #00F; font-weight: bold } /* Name.Class */
1099
- [data-theme="light"] .highlight .no { color: #800 } /* Name.Constant */
1100
- [data-theme="light"] .highlight .nd { color: #A2F } /* Name.Decorator */
1101
- [data-theme="light"] .highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */
1102
- [data-theme="light"] .highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */
1103
- [data-theme="light"] .highlight .nf { color: #00F } /* Name.Function */
1104
- [data-theme="light"] .highlight .nl { color: #767600 } /* Name.Label */
1105
- [data-theme="light"] .highlight .nn { color: #00F; font-weight: bold } /* Name.Namespace */
1106
- [data-theme="light"] .highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
1107
- [data-theme="light"] .highlight .nv { color: #19177C } /* Name.Variable */
1108
- [data-theme="light"] .highlight .ow { color: #A2F; font-weight: bold } /* Operator.Word */
1109
- [data-theme="light"] .highlight .w { color: #BBB } /* Text.Whitespace */
1110
- [data-theme="light"] .highlight .mb { color: #666 } /* Literal.Number.Bin */
1111
- [data-theme="light"] .highlight .mf { color: #666 } /* Literal.Number.Float */
1112
- [data-theme="light"] .highlight .mh { color: #666 } /* Literal.Number.Hex */
1113
- [data-theme="light"] .highlight .mi { color: #666 } /* Literal.Number.Integer */
1114
- [data-theme="light"] .highlight .mo { color: #666 } /* Literal.Number.Oct */
1115
- [data-theme="light"] .highlight .sa { color: #BA2121 } /* Literal.String.Affix */
1116
- [data-theme="light"] .highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
1117
- [data-theme="light"] .highlight .sc { color: #BA2121 } /* Literal.String.Char */
1118
- [data-theme="light"] .highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */
1119
- [data-theme="light"] .highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
1120
- [data-theme="light"] .highlight .s2 { color: #BA2121 } /* Literal.String.Double */
1121
- [data-theme="light"] .highlight .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */
1122
- [data-theme="light"] .highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */
1123
- [data-theme="light"] .highlight .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */
1124
- [data-theme="light"] .highlight .sx { color: #008000 } /* Literal.String.Other */
1125
- [data-theme="light"] .highlight .sr { color: #A45A77 } /* Literal.String.Regex */
1126
- [data-theme="light"] .highlight .s1 { color: #BA2121 } /* Literal.String.Single */
1127
- [data-theme="light"] .highlight .ss { color: #19177C } /* Literal.String.Symbol */
1128
- [data-theme="light"] .highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
1129
- [data-theme="light"] .highlight .fm { color: #00F } /* Name.Function.Magic */
1130
- [data-theme="light"] .highlight .vc { color: #19177C } /* Name.Variable.Class */
1131
- [data-theme="light"] .highlight .vg { color: #19177C } /* Name.Variable.Global */
1132
- [data-theme="light"] .highlight .vi { color: #19177C } /* Name.Variable.Instance */
1133
- [data-theme="light"] .highlight .vm { color: #19177C } /* Name.Variable.Magic */
1134
- [data-theme="light"] .highlight .il { color: #666 } /* Literal.Number.Integer.Long */
1135
-
1136
- pre { line-height: 125%; }
1137
- td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
1138
- span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
1139
- td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
1140
- span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
1141
- [data-theme="dark"] .highlight .hll { background-color: #49483e }
1142
- [data-theme="dark"] .highlight { background: #272822; color: #F8F8F2 }
1143
- [data-theme="dark"] .highlight .c { color: #959077 } /* Comment */
1144
- [data-theme="dark"] .highlight .err { color: #ED007E; background-color: #1E0010 } /* Error */
1145
- [data-theme="dark"] .highlight .esc { color: #F8F8F2 } /* Escape */
1146
- [data-theme="dark"] .highlight .g { color: #F8F8F2 } /* Generic */
1147
- [data-theme="dark"] .highlight .k { color: #66D9EF } /* Keyword */
1148
- [data-theme="dark"] .highlight .l { color: #AE81FF } /* Literal */
1149
- [data-theme="dark"] .highlight .n { color: #F8F8F2 } /* Name */
1150
- [data-theme="dark"] .highlight .o { color: #FF4689 } /* Operator */
1151
- [data-theme="dark"] .highlight .x { color: #F8F8F2 } /* Other */
1152
- [data-theme="dark"] .highlight .p { color: #F8F8F2 } /* Punctuation */
1153
- [data-theme="dark"] .highlight .ch { color: #959077 } /* Comment.Hashbang */
1154
- [data-theme="dark"] .highlight .cm { color: #959077 } /* Comment.Multiline */
1155
- [data-theme="dark"] .highlight .cp { color: #959077 } /* Comment.Preproc */
1156
- [data-theme="dark"] .highlight .cpf { color: #959077 } /* Comment.PreprocFile */
1157
- [data-theme="dark"] .highlight .c1 { color: #959077 } /* Comment.Single */
1158
- [data-theme="dark"] .highlight .cs { color: #959077 } /* Comment.Special */
1159
- [data-theme="dark"] .highlight .gd { color: #FF4689 } /* Generic.Deleted */
1160
- [data-theme="dark"] .highlight .ge { color: #F8F8F2; font-style: italic } /* Generic.Emph */
1161
- [data-theme="dark"] .highlight .ges { color: #F8F8F2; font-weight: bold; font-style: italic } /* Generic.EmphStrong */
1162
- [data-theme="dark"] .highlight .gr { color: #F8F8F2 } /* Generic.Error */
1163
- [data-theme="dark"] .highlight .gh { color: #F8F8F2 } /* Generic.Heading */
1164
- [data-theme="dark"] .highlight .gi { color: #A6E22E } /* Generic.Inserted */
1165
- [data-theme="dark"] .highlight .go { color: #66D9EF } /* Generic.Output */
1166
- [data-theme="dark"] .highlight .gp { color: #FF4689; font-weight: bold } /* Generic.Prompt */
1167
- [data-theme="dark"] .highlight .gs { color: #F8F8F2; font-weight: bold } /* Generic.Strong */
1168
- [data-theme="dark"] .highlight .gu { color: #959077 } /* Generic.Subheading */
1169
- [data-theme="dark"] .highlight .gt { color: #F8F8F2 } /* Generic.Traceback */
1170
- [data-theme="dark"] .highlight .kc { color: #66D9EF } /* Keyword.Constant */
1171
- [data-theme="dark"] .highlight .kd { color: #66D9EF } /* Keyword.Declaration */
1172
- [data-theme="dark"] .highlight .kn { color: #FF4689 } /* Keyword.Namespace */
1173
- [data-theme="dark"] .highlight .kp { color: #66D9EF } /* Keyword.Pseudo */
1174
- [data-theme="dark"] .highlight .kr { color: #66D9EF } /* Keyword.Reserved */
1175
- [data-theme="dark"] .highlight .kt { color: #66D9EF } /* Keyword.Type */
1176
- [data-theme="dark"] .highlight .ld { color: #E6DB74 } /* Literal.Date */
1177
- [data-theme="dark"] .highlight .m { color: #AE81FF } /* Literal.Number */
1178
- [data-theme="dark"] .highlight .s { color: #E6DB74 } /* Literal.String */
1179
- [data-theme="dark"] .highlight .na { color: #A6E22E } /* Name.Attribute */
1180
- [data-theme="dark"] .highlight .nb { color: #F8F8F2 } /* Name.Builtin */
1181
- [data-theme="dark"] .highlight .nc { color: #A6E22E } /* Name.Class */
1182
- [data-theme="dark"] .highlight .no { color: #66D9EF } /* Name.Constant */
1183
- [data-theme="dark"] .highlight .nd { color: #A6E22E } /* Name.Decorator */
1184
- [data-theme="dark"] .highlight .ni { color: #F8F8F2 } /* Name.Entity */
1185
- [data-theme="dark"] .highlight .ne { color: #A6E22E } /* Name.Exception */
1186
- [data-theme="dark"] .highlight .nf { color: #A6E22E } /* Name.Function */
1187
- [data-theme="dark"] .highlight .nl { color: #F8F8F2 } /* Name.Label */
1188
- [data-theme="dark"] .highlight .nn { color: #F8F8F2 } /* Name.Namespace */
1189
- [data-theme="dark"] .highlight .nx { color: #A6E22E } /* Name.Other */
1190
- [data-theme="dark"] .highlight .py { color: #F8F8F2 } /* Name.Property */
1191
- [data-theme="dark"] .highlight .nt { color: #FF4689 } /* Name.Tag */
1192
- [data-theme="dark"] .highlight .nv { color: #F8F8F2 } /* Name.Variable */
1193
- [data-theme="dark"] .highlight .ow { color: #FF4689 } /* Operator.Word */
1194
- [data-theme="dark"] .highlight .pm { color: #F8F8F2 } /* Punctuation.Marker */
1195
- [data-theme="dark"] .highlight .w { color: #F8F8F2 } /* Text.Whitespace */
1196
- [data-theme="dark"] .highlight .mb { color: #AE81FF } /* Literal.Number.Bin */
1197
- [data-theme="dark"] .highlight .mf { color: #AE81FF } /* Literal.Number.Float */
1198
- [data-theme="dark"] .highlight .mh { color: #AE81FF } /* Literal.Number.Hex */
1199
- [data-theme="dark"] .highlight .mi { color: #AE81FF } /* Literal.Number.Integer */
1200
- [data-theme="dark"] .highlight .mo { color: #AE81FF } /* Literal.Number.Oct */
1201
- [data-theme="dark"] .highlight .sa { color: #E6DB74 } /* Literal.String.Affix */
1202
- [data-theme="dark"] .highlight .sb { color: #E6DB74 } /* Literal.String.Backtick */
1203
- [data-theme="dark"] .highlight .sc { color: #E6DB74 } /* Literal.String.Char */
1204
- [data-theme="dark"] .highlight .dl { color: #E6DB74 } /* Literal.String.Delimiter */
1205
- [data-theme="dark"] .highlight .sd { color: #E6DB74 } /* Literal.String.Doc */
1206
- [data-theme="dark"] .highlight .s2 { color: #E6DB74 } /* Literal.String.Double */
1207
- [data-theme="dark"] .highlight .se { color: #AE81FF } /* Literal.String.Escape */
1208
- [data-theme="dark"] .highlight .sh { color: #E6DB74 } /* Literal.String.Heredoc */
1209
- [data-theme="dark"] .highlight .si { color: #E6DB74 } /* Literal.String.Interpol */
1210
- [data-theme="dark"] .highlight .sx { color: #E6DB74 } /* Literal.String.Other */
1211
- [data-theme="dark"] .highlight .sr { color: #E6DB74 } /* Literal.String.Regex */
1212
- [data-theme="dark"] .highlight .s1 { color: #E6DB74 } /* Literal.String.Single */
1213
- [data-theme="dark"] .highlight .ss { color: #E6DB74 } /* Literal.String.Symbol */
1214
- [data-theme="dark"] .highlight .bp { color: #F8F8F2 } /* Name.Builtin.Pseudo */
1215
- [data-theme="dark"] .highlight .fm { color: #A6E22E } /* Name.Function.Magic */
1216
- [data-theme="dark"] .highlight .vc { color: #F8F8F2 } /* Name.Variable.Class */
1217
- [data-theme="dark"] .highlight .vg { color: #F8F8F2 } /* Name.Variable.Global */
1218
- [data-theme="dark"] .highlight .vi { color: #F8F8F2 } /* Name.Variable.Instance */
1219
- [data-theme="dark"] .highlight .vm { color: #F8F8F2 } /* Name.Variable.Magic */
1220
- [data-theme="dark"] .highlight .il { color: #AE81FF } /* Literal.Number.Integer.Long */
1221
-
1222
- /* Ensure our code metrics override Pygments defaults */
1223
- .highlight pre {
1224
- white-space: pre;
1225
- margin: 0;
1226
- padding: var(--code-pad-y) 0.75rem !important;
1227
- line-height: var(--code-line-height) !important;
1228
- font-size: var(--code-font-size) !important;
1229
- font-family: 'Cascadia Mono', 'Cascadia Code', 'JetBrains Mono', 'SF Mono', Monaco, 'Consolas', monospace !important;
1230
- border: none;
1231
- }
1232
- .line-numbers { line-height: var(--code-line-height) !important; }
1233
- .line-numbers .line-number { line-height: var(--code-line-height) !important; }
1234
-
1235
- /* Custom CSS from frontmatter */
1236
-
1237
-
1238
-
1239
-
1240
-
1241
- /* Cursor for tools */
1242
- body[data-tool="arrow"] .main-content {
1243
- cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23e53935" stroke-width="2"><path d="M12 19l7-7 3 3-7 7-3-3z"/><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"/><path d="M2 2l7.586 7.586"/><circle cx="11" cy="11" r="2"/></svg>') 12 12, crosshair;
1244
- }
1245
- body[data-tool="pen"] .main-content {
1246
- cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23e53935" stroke-width="2"><path d="M12 19l7-7 3 3-7 7-3-3z"/><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"/><circle cx="4" cy="20" r="2" fill="%23e53935"/></svg>') 4 20, pointer;
1247
- }
1248
- body[data-tool="eraser"] .main-content {
1249
- cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23e53935" stroke-width="2"><path d="M20 20H7l-7-7 7-7h13v14z"/><path d="M13 13l7-7"/><path d="M13 13L9 9"/></svg>') 12 12, auto;
1250
- }
1251
-
1252
- /* Color picker styles */
1253
- .tools-section-title {
1254
- font-weight: bold;
1255
- color: var(--text-secondary);
1256
- font-size: 0.65rem;
1257
- margin: 0.75rem 0 0.5rem 0;
1258
- text-transform: uppercase;
1259
- letter-spacing: 0.5px;
1260
- }
1261
- .color-row {
1262
- display: grid;
1263
- grid-template-columns: repeat(6, 1fr);
1264
- gap: 0.25rem;
1265
- margin-bottom: 0.5rem;
1266
- }
1267
- .color-swatch {
1268
- width: 18px;
1269
- height: 18px;
1270
- border: 2px solid var(--border-primary);
1271
- border-radius: 3px;
1272
- cursor: pointer;
1273
- transition: all 0.2s ease;
1274
- position: relative;
1275
- }
1276
- .color-swatch:hover {
1277
- transform: scale(1.1);
1278
- border-color: var(--text-secondary);
1279
- }
1280
- .color-swatch.selected {
1281
- border-color: var(--text-primary);
1282
- box-shadow: 0 0 0 2px var(--text-link);
1283
- }
1284
- .color-swatch.selected::after {
1285
- content: '✓';
1286
- position: absolute;
1287
- top: 50%;
1288
- left: 50%;
1289
- transform: translate(-50%, -50%);
1290
- color: white;
1291
- font-size: 10px;
1292
- font-weight: bold;
1293
- text-shadow: 1px 1px 1px black;
1294
- }
1295
- .color-input {
1296
- width: 24px;
1297
- height: 24px;
1298
- border: 2px solid var(--border-primary);
1299
- border-radius: 3px;
1300
- cursor: pointer;
1301
- background: none;
1302
- padding: 0;
1303
- grid-column: span 2;
1304
- justify-self: center;
1305
- }
1306
- .color-input:hover {
1307
- border-color: var(--text-secondary);
1308
- }
1309
-
1310
- /* Thickness slider styles */
1311
- .thickness-row {
1312
- display: flex;
1313
- align-items: center;
1314
- gap: 0.5rem;
1315
- margin-top: 0.75rem;
1316
- }
1317
- .thickness-slider {
1318
- flex: 1;
1319
- -webkit-appearance: none;
1320
- appearance: none;
1321
- height: 4px;
1322
- background: var(--border-primary);
1323
- border-radius: 2px;
1324
- outline: none;
1325
- opacity: 0.7;
1326
- transition: opacity 0.2s;
1327
- }
1328
- .thickness-slider:hover {
1329
- opacity: 1;
1330
- }
1331
- .thickness-slider::-webkit-slider-thumb {
1332
- -webkit-appearance: none;
1333
- appearance: none;
1334
- width: 12px;
1335
- height: 12px;
1336
- background: var(--text-link);
1337
- border-radius: 50%;
1338
- cursor: pointer;
1339
- }
1340
- .thickness-slider::-moz-range-thumb {
1341
- width: 12px;
1342
- height: 12px;
1343
- background: var(--text-link);
1344
- border-radius: 50%;
1345
- cursor: pointer;
1346
- border: none;
1347
- }
1348
- .thickness-value {
1349
- font-size: 0.7rem;
1350
- color: var(--text-secondary);
1351
- min-width: 20px;
1352
- text-align: right;
1353
- }
1354
-
1355
- .highlight {
1356
- background: none !important;
1357
- }
1358
-
1359
- /* Loading animations */
1360
- .loading-spinner {
1361
- display: inline-block;
1362
- width: 16px;
1363
- height: 16px;
1364
- border: 2px solid var(--border-primary);
1365
- border-radius: 50%;
1366
- border-top-color: var(--text-link);
1367
- animation: spin 1s linear infinite;
1368
- margin-right: 8px;
1369
- vertical-align: middle;
1370
- }
1371
-
1372
- @keyframes spin {
1373
- to { transform: rotate(360deg); }
1374
- }
1375
-
1376
- .loading-skeleton {
1377
- display: inline-block;
1378
- background: var(--bg-tertiary);
1379
- background: linear-gradient(
1380
- 90deg,
1381
- var(--bg-tertiary) 25%,
1382
- var(--bg-secondary) 50%,
1383
- var(--bg-tertiary) 75%
1384
- );
1385
- background-size: 200% 100%;
1386
- animation: loading-shimmer 2s ease-in-out infinite;
1387
- border-radius: 2px;
1388
- height: 1em;
1389
- width: 80px;
1390
- vertical-align: middle;
1391
- }
1392
-
1393
- @keyframes loading-shimmer {
1394
- 0% { background-position: -200% 0; }
1395
- 100% { background-position: 200% 0; }
1396
- }
1397
-
1398
- /* Loading state for cell output */
1399
- .cell-output:has(.loading-spinner) {
1400
- opacity: 0.7;
1401
- background: var(--bg-secondary);
1402
- /* border-left: 3px solid var(--text-link); */
1403
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1404
  </style>
1405
  <script>
1406
  // --- Drag utilities ---
@@ -3870,10 +4097,35 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left:
3870
  </div>
3871
 
3872
  <div class="main-content">
3873
- <h1>All Benchmarks Aggregated Report</h1>
3874
- <h2><a href="layer_norm/">Layer Norm</a></h2>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3875
  <div class="artifact-preview">
3876
- <img src="layer_norm/results/artifacts/combine/latency.svg" alt="Layer Norm Latency" width="800">
3877
  </div>
3878
 
3879
  <table>
@@ -3885,18 +4137,28 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left:
3885
  </thead>
3886
  <tbody>
3887
  <tr>
3888
- <td><a href="layer_norm/impls/hf_kernels_layer_norm.html">HF Kernels Layer Norm</a></td>
3889
  <td>HuggingFace kernels implementation</td>
3890
  </tr>
3891
  <tr>
3892
- <td><a href="layer_norm/impls/torch_layer_norm.html">PyTorch Layer Norm</a></td>
3893
  <td>PyTorch native implementation</td>
3894
  </tr>
3895
  </tbody>
3896
  </table>
3897
- <h2><a href="rotary/">Rotary Position Embeddings</a></h2>
 
 
 
 
 
 
 
 
 
 
3898
  <div class="artifact-preview">
3899
- <img src="rotary/results/artifacts/combine/latency.svg" alt="Rotary Position Embeddings Latency" width="800">
3900
  </div>
3901
 
3902
  <table>
@@ -3908,18 +4170,27 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left:
3908
  </thead>
3909
  <tbody>
3910
  <tr>
3911
- <td><a href="rotary/impls/hf_kernels_rotary.html">HF Kernels Rotary</a></td>
3912
  <td>HuggingFace kernels implementation</td>
3913
  </tr>
3914
  <tr>
3915
- <td><a href="rotary/impls/torch_rotary.html">PyTorch Rotary</a></td>
3916
  <td>PyTorch native implementation</td>
3917
  </tr>
3918
  </tbody>
3919
  </table>
3920
- <h2><a href="flash_attn/">Flash Attention</a></h2>
 
 
 
 
 
 
 
 
 
3921
  <div class="artifact-preview">
3922
- <img src="flash_attn/results/artifacts/combine/latency.svg" alt="Flash Attention Latency" width="800">
3923
  </div>
3924
 
3925
  <table>
@@ -3931,34 +4202,43 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left:
3931
  </thead>
3932
  <tbody>
3933
  <tr>
3934
- <td><a href="flash_attn/impls/flash_attention.html">Flash Attention</a></td>
3935
  <td>Flash Attention implementation</td>
3936
  </tr>
3937
  <tr>
3938
- <td><a href="flash_attn/impls/hf_kernels_flash_attn.html">HF Kernels Flash Attention</a></td>
3939
  <td>HuggingFace kernels Flash Attention</td>
3940
  </tr>
3941
  <tr>
3942
- <td><a href="flash_attn/impls/hf_kernels_flash_attn3.html">HF Kernels Flash Attention 3</a></td>
3943
  <td>HuggingFace kernels Flash Attention 3</td>
3944
  </tr>
3945
  <tr>
3946
- <td><a href="flash_attn/impls/mem_efficient_attention.html">Memory Efficient Attention</a></td>
3947
  <td>Memory efficient attention implementation</td>
3948
  </tr>
3949
  <tr>
3950
- <td><a href="flash_attn/impls/sage_attention.html">Sage Attention</a></td>
3951
  <td>Sage attention implementation</td>
3952
  </tr>
3953
  <tr>
3954
- <td><a href="flash_attn/impls/xformers.html">xFormers</a></td>
3955
  <td>xFormers attention implementation</td>
3956
  </tr>
3957
  </tbody>
3958
  </table>
3959
- <h2><a href="causal_conv1d/">Causal Conv1D</a></h2>
 
 
 
 
 
 
 
 
 
3960
  <div class="artifact-preview">
3961
- <img src="causal_conv1d/results/artifacts/combine/latency.svg" alt="Causal Conv1D Latency" width="800">
3962
  </div>
3963
 
3964
  <table>
@@ -3970,18 +4250,27 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left:
3970
  </thead>
3971
  <tbody>
3972
  <tr>
3973
- <td><a href="causal_conv1d/impls/hf_kernels_causal_conv1d.html">HF Kernels Causal Conv1D</a></td>
3974
  <td>HuggingFace kernels implementation</td>
3975
  </tr>
3976
  <tr>
3977
- <td><a href="causal_conv1d/impls/torch_causal_conv1d.html">PyTorch Causal Conv1D</a></td>
3978
  <td>PyTorch native implementation</td>
3979
  </tr>
3980
  </tbody>
3981
  </table>
3982
- <h2><a href="activation/">Activation</a></h2>
 
 
 
 
 
 
 
 
 
3983
  <div class="artifact-preview">
3984
- <img src="activation/results/artifacts/combine/latency.svg" alt="Activation Latency" width="800">
3985
  </div>
3986
 
3987
  <table>
@@ -3993,38 +4282,77 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left:
3993
  </thead>
3994
  <tbody>
3995
  <tr>
3996
- <td><a href="activation/impls/hf_kernels_swiglu.html">HF Kernels SwiGLU</a></td>
3997
  <td>HuggingFace kernels SwiGLU implementation</td>
3998
  </tr>
3999
  <tr>
4000
- <td><a href="activation/impls/torch_swiglu.html">PyTorch SwiGLU</a></td>
4001
  <td>PyTorch native SwiGLU implementation</td>
4002
  </tr>
4003
  </tbody>
4004
  </table>
4005
- <h2><a href="relu/">ReLU</a></h2>
4006
- <div class="artifact-preview">
4007
- <img src="relu/results/artifacts/combine/latency.svg" alt="ReLU Latency" width="800">
4008
- </div>
4009
-
4010
- <table>
4011
- <thead>
4012
- <tr>
4013
- <th>Implementation</th>
4014
- <th>Description</th>
4015
- </tr>
4016
- </thead>
4017
- <tbody>
4018
- <tr>
4019
- <td><a href="relu/impls/hf_kernels_relu.html">HF Kernels ReLU</a></td>
4020
- <td>HuggingFace kernels ReLU implementation</td>
4021
- </tr>
4022
- <tr>
4023
- <td><a href="relu/impls/torch_relu.html">PyTorch ReLU</a></td>
4024
- <td>PyTorch native ReLU implementation</td>
4025
- </tr>
4026
- </tbody>
4027
- </table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4028
  </div>
4029
 
4030
  </body>
 
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>index</title>
7
+
8
+ <link rel="preconnect" href="https://fonts.googleapis.com">
9
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
+ <link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap" rel="stylesheet">
11
+
12
  <script>
13
  // Iframe-friendly navigation router
14
  (function() {
 
92
  </script>
93
  <style>
94
  :root[data-theme="light"] {
95
+ --bg-primary: #ffffff;
96
+ --bg-secondary: #f6f8fa;
97
+ --bg-tertiary: #f8f9fa;
98
+ --bg-code: #f8f9fa;
99
+ --bg-error: #fdf2f2;
100
+ --bg-artifact: #e6f3ff;
101
+ --bg-artifact-hover: #d0e7ff;
102
+
103
+ --text-primary: #333;
104
+ --text-secondary: #656d76;
105
+ --text-error: #c53030;
106
+ --text-link: #0969da;
107
+
108
+ --border-primary: #e1e5e9;
109
+ --border-error: #e53e3e;
110
+ --border-cell-failed: #d73a49;
111
+
112
+ --shadow: rgba(0, 0, 0, 0.1);
113
+ }
114
+
115
+ :root[data-theme="dark"] {
116
+ --bg-primary: #0a0a0a;
117
+ --bg-secondary: #121212;
118
+ --bg-tertiary: #181818;
119
+ --bg-code: #0d0d0d;
120
+ --bg-error: #1a0f0f;
121
+ --bg-artifact: #151515;
122
+ --bg-artifact-hover: #1a1a1a;
123
+
124
+ --text-primary: #e0e0e0;
125
+ --text-secondary: #888888;
126
+ --text-error: #ff6b6b;
127
+ --text-link: #64b5f6;
128
+
129
+ --border-primary: #2a2a2a;
130
+ --border-error: #ff6b6b;
131
+ --border-cell-failed: #ff6b6b;
132
+
133
+ --shadow: rgba(255, 255, 255, 0.05);
134
+ }
135
+
136
+ /* Monocolor UI theme: black/white background, all text/borders single blue */
137
+ :root[data-ui="monocolor"] {
138
+ --mono-color: #0a66ff;
139
+ }
140
+
141
+ :root[data-ui="monocolor"][data-theme="light"] {
142
+ --bg-primary: #ffffff;
143
+ }
144
+
145
+ :root[data-ui="monocolor"][data-theme="dark"] {
146
+ --bg-primary: #000000;
147
+ }
148
+
149
+ :root[data-ui="monocolor"] {
150
+ --bg-secondary: var(--bg-primary);
151
+ --bg-tertiary: var(--bg-primary);
152
+ --bg-code: var(--bg-primary);
153
+ --bg-error: var(--bg-primary);
154
+ --bg-artifact: var(--bg-primary);
155
+ --bg-artifact-hover: var(--bg-primary);
156
+
157
+ --text-primary: var(--mono-color);
158
+ --text-secondary: var(--mono-color);
159
+ --text-error: var(--mono-color);
160
+ --text-link: var(--mono-color);
161
+
162
+ --border-primary: var(--mono-color);
163
+ --border-error: var(--mono-color);
164
+ --border-cell-failed: var(--mono-color);
165
+
166
+ --shadow: none;
167
+ }
168
+
169
+ :root[data-ui="monocolor"] a {
170
+ color: var(--mono-color);
171
+ }
172
+
173
+ :root[data-ui="monocolor"] .menu-button,
174
+ :root[data-ui="monocolor"] .theme-toggle,
175
+ :root[data-ui="monocolor"] .reset-toggle,
176
+ :root[data-ui="monocolor"] .back-button {
177
+ background: var(--bg-primary);
178
+ color: var(--mono-color);
179
+ border-color: var(--mono-color);
180
+ }
181
+
182
+ :root[data-ui="monocolor"] .menu-button:hover,
183
+ :root[data-ui="monocolor"] .theme-toggle:hover,
184
+ :root[data-ui="monocolor"] .reset-toggle:hover,
185
+ :root[data-ui="monocolor"] .back-button:hover {
186
+ background: var(--bg-primary);
187
+ color: var(--mono-color);
188
+ border-color: var(--mono-color);
189
+ }
190
+
191
+ :root[data-ui="monocolor"] .menu-dropdown {
192
+ background: var(--bg-primary);
193
+ border-color: var(--mono-color);
194
+ box-shadow: none;
195
+ }
196
+
197
+ :root[data-ui="monocolor"] .menu-item {
198
+ color: var(--mono-color);
199
+ border-bottom-color: var(--mono-color);
200
+ }
201
+
202
+ :root[data-ui="monocolor"] .system-info {
203
+ background: var(--bg-primary);
204
+ border-color: var(--mono-color);
205
+ }
206
+
207
+ :root[data-ui="monocolor"] .cell {
208
+ border-color: var(--mono-color);
209
+ background: var(--bg-primary);
210
+ }
211
+
212
+ :root[data-ui="monocolor"] .cell-header {
213
+ background: var(--bg-primary);
214
+ border-bottom-color: var(--mono-color);
215
+ }
216
+
217
+ :root[data-ui="monocolor"] .artifact {
218
+ background: var(--bg-primary);
219
+ border-color: var(--mono-color);
220
+ color: var(--mono-color);
221
+ }
222
+
223
+ :root[data-ui="monocolor"] .artifact:hover {
224
+ background: var(--bg-primary);
225
+ }
226
+
227
+ :root[data-ui="monocolor"] .artifact-preview img,
228
+ :root[data-ui="monocolor"] .artifact-preview svg {
229
+ border-color: var(--mono-color);
230
+ }
231
+
232
+ :root[data-ui="monocolor"] .status-widget {
233
+ background: var(--bg-primary);
234
+ border-color: var(--mono-color);
235
+ color: var(--mono-color);
236
+ }
237
+
238
+ :root[data-ui="monocolor"] .minimap,
239
+ :root[data-ui="monocolor"] .file-explorer,
240
+ :root[data-ui="monocolor"] .tools-widget {
241
+ background: var(--bg-primary);
242
+ border-color: var(--mono-color);
243
+ color: var(--mono-color);
244
+ }
245
+
246
+ :root[data-ui="monocolor"] .cell-code {
247
+ background: var(--bg-primary);
248
+ border-bottom-color: var(--mono-color);
249
+ }
250
+
251
+ :root[data-ui="monocolor"] .tools-title,
252
+ :root[data-ui="monocolor"] .file-explorer-section-title,
253
+ :root[data-ui="monocolor"] .minimap-title {
254
+ color: var(--mono-color);
255
+ border-bottom-color: var(--mono-color);
256
+ }
257
+
258
+ :root[data-ui="monocolor"] .tool-button {
259
+ background: var(--bg-primary);
260
+ border-color: var(--mono-color);
261
+ color: var(--mono-color);
262
+ }
263
+
264
+ :root[data-ui="monocolor"] .tool-button.active {
265
+ border-color: var(--mono-color);
266
+ }
267
+
268
+ :root[data-ui="monocolor"] .file-explorer-item,
269
+ :root[data-ui="monocolor"] .minimap-item {
270
+ color: var(--mono-color);
271
+ }
272
+
273
+ /* Force Pygments code to mono blue on mono bg */
274
+ :root[data-ui="monocolor"] .highlight {
275
+ background: var(--bg-primary) !important;
276
+ color: var(--mono-color) !important;
277
+ }
278
+
279
+ :root[data-ui="monocolor"] .highlight *,
280
+ :root[data-ui="monocolor"] .highlight .hll {
281
+ color: var(--mono-color) !important;
282
+ background: transparent !important;
283
+ border-color: var(--mono-color) !important;
284
+ }
285
+
286
+ /* Default code font + metrics (overridable via frontmatter) */
287
+ :root {
288
+ --code-font-size: 0.95rem;
289
+ --code-line-height: 1.5;
290
+ --code-pad-y: 0.75rem;
291
+ }
292
+
293
+ /* Minimal UI theme overrides base variables for a flatter, 90s look */
294
+ :root[data-ui="none"] {
295
+ --bg-primary: #ffffff;
296
+ --bg-secondary: transparent;
297
+ --bg-tertiary: transparent;
298
+ --bg-code: #f9f9f9;
299
+ --bg-error: #fff0f0;
300
+ --bg-artifact: #f0f7ff;
301
+ --bg-artifact-hover: #e5f1ff;
302
+
303
+ --text-primary: #000000;
304
+ --text-secondary: #222222;
305
+ --text-error: #a00000;
306
+ --text-link: #0000ee;
307
+
308
+ --border-primary: #cccccc;
309
+ --border-error: #cc0000;
310
+ --border-cell-failed: #cc0000;
311
+
312
+ --shadow: none;
313
+ }
314
+
315
+ html {
316
+ overscroll-behavior: none;
317
+ }
318
+
319
+ body {
320
+ font-family: 'Cascadia Mono', 'Cascadia Code', 'JetBrains Mono', 'SF Mono', Monaco, 'Consolas', monospace;
321
+ line-height: 1.4;
322
+ max-width: 1000px;
323
+ margin: 0 auto;
324
+ padding: 15px;
325
+ color: var(--text-primary);
326
+ background: var(--bg-primary);
327
+ transition: background-color 0.2s ease, color 0.2s ease;
328
+ overscroll-behavior: none;
329
+ }
330
+
331
+ /* Minimal "none" UI theme overrides */
332
+ :root[data-ui="none"] body {
333
+ font-family: 'Times New Roman', Times, serif;
334
+ line-height: 1.5;
335
+ max-width: 860px;
336
+ padding: 12px;
337
+ background: #ffffff;
338
+ color: #000000;
339
+ transition: none;
340
+ }
341
+
342
+ /* Two panel layout removed */
343
+
344
+ .controls {
345
+ position: fixed;
346
+ top: 20px;
347
+ right: 20px;
348
+ display: flex;
349
+ flex-direction: column;
350
+ align-items: flex-end;
351
+ gap: 0.25rem;
352
+ z-index: 1000;
353
+ }
354
+
355
+ .controls-buttons {
356
+ display: flex;
357
+ gap: 0.5rem;
358
+ }
359
+
360
+ .menu-button {
361
+ position: relative;
362
+ background: var(--bg-secondary);
363
+ border: 1px solid var(--border-primary);
364
+ padding: 8px 12px;
365
+ border-radius: 2px;
366
+ color: var(--text-secondary);
367
+ cursor: pointer;
368
+ font-family: inherit;
369
+ font-size: 0.9rem;
370
+ user-select: none;
371
+ }
372
+
373
+ /* Keep default control styling when widgets are enabled, even in minimal UI */
374
+ :root[data-ui="none"][data-widgets="on"] .menu-button,
375
+ :root[data-ui="none"][data-widgets="on"] .theme-toggle,
376
+ :root[data-ui="none"][data-widgets="on"] .reset-toggle,
377
+ :root[data-ui="none"][data-widgets="on"] .back-button {
378
+ background: #f6f6f6;
379
+ border: 1px solid #cccccc;
380
+ color: #222222;
381
+ }
382
+
383
+ .menu-button:hover {
384
+ color: var(--text-primary);
385
+ background: var(--bg-tertiary);
386
+ }
387
+
388
+ /* Controls state indicator (top-right) */
389
+ /* Status widget (bottom-right) */
390
+ .status-widget {
391
+ position: fixed;
392
+ right: 20px;
393
+ bottom: 20px;
394
+ width: auto;
395
+ max-width: 260px;
396
+ background: var(--bg-secondary);
397
+ border: 1px solid var(--border-primary);
398
+ border-radius: 2px;
399
+ padding: 6px 8px;
400
+ font-size: 0.8rem;
401
+ color: var(--text-secondary);
402
+ z-index: 100;
403
+ }
404
+
405
+ .status-widget strong {
406
+ color: var(--text-primary);
407
+ }
408
+
409
+ :root[data-ui="none"][data-widgets="on"] .status-widget {
410
+ background: #f6f6f6;
411
+ border-color: #ccc;
412
+ color: #222;
413
+ }
414
+
415
+ :root[data-ui="none"][data-widgets="on"] .menu-button:hover,
416
+ :root[data-ui="none"][data-widgets="on"] .theme-toggle:hover,
417
+ :root[data-ui="none"][data-widgets="on"] .reset-toggle:hover,
418
+ :root[data-ui="none"][data-widgets="on"] .back-button:hover {
419
+ background: #ededed;
420
+ border-color: #bbbbbb;
421
+ color: #000000;
422
+ }
423
+
424
+ .menu-dropdown {
425
+ position: absolute;
426
+ top: 100%;
427
+ right: 0;
428
+ background: var(--bg-secondary);
429
+ border: 1px solid var(--border-primary);
430
+ border-radius: 4px;
431
+ box-shadow: 0 4px 12px var(--shadow);
432
+ min-width: 160px;
433
+ opacity: 0;
434
+ visibility: hidden;
435
+ transform: translateY(-8px);
436
+ transition: all 0.2s ease;
437
+ z-index: 1001;
438
+ margin-top: 4px;
439
+ }
440
+
441
+ :root[data-ui="none"][data-widgets="on"] .menu-dropdown {
442
+ background: #ffffff;
443
+ border: 1px solid #cccccc;
444
+ box-shadow: none;
445
+ }
446
+
447
+ .menu-button.active .menu-dropdown {
448
+ opacity: 1;
449
+ visibility: visible;
450
+ transform: translateY(0);
451
+ }
452
+
453
+ .menu-item {
454
+ display: block;
455
+ padding: 8px 12px;
456
+ color: var(--text-secondary);
457
+ text-decoration: none;
458
+ font-size: 0.85rem;
459
+ border-bottom: 1px solid var(--border-primary);
460
+ cursor: pointer;
461
+ }
462
+
463
+ :root[data-ui="none"] .menu-item {
464
+ color: #000;
465
+ border-bottom: 1px solid #eee;
466
+ }
467
+
468
+ .menu-item:last-child {
469
+ border-bottom: none;
470
+ }
471
+
472
+ .menu-item:hover {
473
+ background: var(--bg-tertiary);
474
+ color: var(--text-primary);
475
+ }
476
+
477
+ .menu-checkbox {
478
+ display: inline-block;
479
+ width: 16px;
480
+ font-family: monospace;
481
+ color: var(--text-link);
482
+ }
483
+
484
+ .theme-toggle,
485
+ .reset-toggle,
486
+ .back-button {
487
+ background: var(--bg-secondary);
488
+ border: 1px solid var(--border-primary);
489
+ padding: 8px 12px;
490
+ border-radius: 4px;
491
+ color: var(--text-secondary);
492
+ cursor: pointer;
493
+ font-family: inherit;
494
+ font-size: 0.9rem;
495
+ user-select: none;
496
+ }
497
+
498
+ .back-button {
499
+ text-decoration: none;
500
+ display: inline-block;
501
+ }
502
+
503
+ .theme-toggle:hover,
504
+ .reset-toggle:hover,
505
+ .back-button:hover {
506
+ color: var(--text-primary);
507
+ background: var(--bg-tertiary);
508
+ }
509
+
510
+ .system-info {
511
+ background: var(--bg-secondary);
512
+ border: 1px solid var(--border-primary);
513
+ border-radius: 4px;
514
+ padding: 8px 12px;
515
+ margin-bottom: 16px;
516
+ font-size: 0.85em;
517
+ color: var(--text-secondary);
518
+ }
519
+
520
+ .system-info-header {
521
+ font-weight: 600;
522
+ color: var(--text-primary);
523
+ margin-bottom: 2px;
524
+ }
525
+
526
+ .system-info-content {
527
+ font-family: monospace;
528
+ }
529
+
530
+ .theme-toggle,
531
+ .reset-toggle {
532
+ background: var(--bg-secondary);
533
+ border: 1px solid var(--border-primary);
534
+ border-radius: 2px;
535
+ /* padding: 0.4rem 0.6rem; */
536
+ cursor: pointer;
537
+ font-family: inherit;
538
+ font-size: 0.8rem;
539
+ color: var(--text-secondary);
540
+ user-select: none;
541
+ transition: all 0.2s ease;
542
+ text-transform: lowercase;
543
+ letter-spacing: 0;
544
+ }
545
+
546
+ .theme-toggle:hover,
547
+ .reset-toggle:hover {
548
+ background: var(--bg-tertiary);
549
+ border-color: var(--text-secondary);
550
+ color: var(--text-primary);
551
+ }
552
+
553
+ .minimap {
554
+ position: fixed;
555
+ bottom: 20px;
556
+ right: 20px;
557
+ width: 220px;
558
+ max-height: 400px;
559
+ background: var(--bg-secondary);
560
+ border: 1px solid var(--border-primary);
561
+ border-radius: 2px;
562
+ padding: 0.5rem;
563
+ font-size: 0.7rem;
564
+ overflow-y: auto;
565
+ z-index: 100;
566
+ opacity: 0.9;
567
+ transition: opacity 0.2s ease;
568
+ }
569
+
570
+ /* Hide widgets and controls when disabled via frontmatter */
571
+ :root[data-widgets="off"] .controls,
572
+ :root[data-widgets="off"] .minimap,
573
+ :root[data-widgets="off"] .file-explorer,
574
+ :root[data-widgets="off"] .tools-widget,
575
+ :root[data-widgets="off"] .status-widget {
576
+ display: none !important;
577
+ }
578
+
579
+ .file-explorer {
580
+ position: fixed;
581
+ bottom: 20px;
582
+ /* default; JS will stack */
583
+ right: 20px;
584
+ left: auto;
585
+ top: auto;
586
+ width: 220px;
587
+ max-height: 400px;
588
+ background: var(--bg-secondary);
589
+ border: 1px solid var(--border-primary);
590
+ border-radius: 2px;
591
+ padding: 0.5rem;
592
+ font-size: 0.7rem;
593
+ overflow-y: auto;
594
+ z-index: 100;
595
+ opacity: 0.9;
596
+ transition: opacity 0.2s ease;
597
+ }
598
+
599
+ /* Drawing overlay */
600
+ .draw-overlay {
601
+ position: fixed;
602
+ top: 0;
603
+ left: 0;
604
+ width: 100vw;
605
+ height: 100vh;
606
+ z-index: 80;
607
+ /* under widgets (100) and controls (1000) */
608
+ display: block;
609
+ pointer-events: none;
610
+ /* enabled only when a tool is active */
611
+ }
612
+
613
+ /* Tools widget */
614
+ .tools-widget {
615
+ position: fixed;
616
+ bottom: 20px;
617
+ /* default; JS will stack */
618
+ right: 20px;
619
+ left: auto;
620
+ top: auto;
621
+ width: 220px;
622
+ background: var(--bg-secondary);
623
+ border: 1px solid var(--border-primary);
624
+ border-radius: 2px;
625
+ padding: 0.5rem;
626
+ font-size: 0.7rem;
627
+ z-index: 100;
628
+ opacity: 0.95;
629
+ }
630
+
631
+ .tools-title {
632
+ font-weight: bold;
633
+ color: var(--text-secondary);
634
+ margin-bottom: 0.5rem;
635
+ padding-bottom: 0.25rem;
636
+ border-bottom: 1px solid var(--border-primary);
637
+ cursor: grab;
638
+ user-select: none;
639
+ }
640
+
641
+ .tools-row {
642
+ display: flex;
643
+ gap: 0.4rem;
644
+ flex-wrap: wrap;
645
+ }
646
+
647
+ .tool-button {
648
+ background: var(--bg-tertiary);
649
+ border: 1px solid var(--border-primary);
650
+ border-radius: 2px;
651
+ padding: 0.25rem 0.4rem;
652
+ cursor: pointer;
653
+ color: var(--text-secondary);
654
+ font-family: inherit;
655
+ font-size: 0.75rem;
656
+ user-select: none;
657
+ }
658
+
659
+ .tool-button:hover {
660
+ color: var(--text-primary);
661
+ }
662
+
663
+ .tool-button.active {
664
+ color: var(--text-primary);
665
+ border-color: var(--text-secondary);
666
+ background: var(--bg-secondary);
667
+ }
668
+
669
+ .minimap:hover,
670
+ .file-explorer:hover {
671
+ opacity: 1;
672
+ }
673
+
674
+ .minimap-title {
675
+ font-weight: bold;
676
+ color: var(--text-secondary);
677
+ margin-bottom: 0.5rem;
678
+ padding-bottom: 0.25rem;
679
+ border-bottom: 1px solid var(--border-primary);
680
+ cursor: grab;
681
+ /* drag handle */
682
+ user-select: none;
683
+ }
684
+
685
+ .minimap-item {
686
+ display: block;
687
+ color: var(--text-secondary);
688
+ text-decoration: none;
689
+ padding: 0.15rem 0;
690
+ border-left: 2px solid transparent;
691
+ padding-left: 0.5rem;
692
+ transition: all 0.2s ease;
693
+ cursor: pointer;
694
+ }
695
+
696
+ .minimap-item:hover {
697
+ color: var(--text-primary);
698
+ border-left-color: var(--text-secondary);
699
+ }
700
+
701
+ .minimap-item.active {
702
+ color: var(--text-primary);
703
+ border-left-color: var(--text-link);
704
+ }
705
+
706
+ .minimap-heading {
707
+ font-weight: normal;
708
+ }
709
+
710
+ .minimap-heading.h1 {
711
+ padding-left: 0.5rem;
712
+ }
713
+
714
+ .minimap-heading.h2 {
715
+ padding-left: 1rem;
716
+ }
717
+
718
+ .minimap-heading.h3 {
719
+ padding-left: 1.5rem;
720
+ }
721
+
722
+ .minimap-heading.h4 {
723
+ padding-left: 2rem;
724
+ }
725
+
726
+ .minimap-heading.h5 {
727
+ padding-left: 2.5rem;
728
+ }
729
+
730
+ .minimap-heading.h6 {
731
+ padding-left: 3rem;
732
+ }
733
+
734
+ .minimap-cell {
735
+ color: var(--text-link);
736
+ opacity: 0.8;
737
+ font-style: italic;
738
+ }
739
+
740
+ .minimap-cell:hover {
741
+ opacity: 1;
742
+ }
743
+
744
+ .file-explorer-title {
745
+ font-weight: bold;
746
+ color: var(--text-secondary);
747
+ margin-bottom: 0.5rem;
748
+ padding-bottom: 0.25rem;
749
+ border-bottom: 1px solid var(--border-primary);
750
+ cursor: grab;
751
+ /* drag handle */
752
+ user-select: none;
753
+ }
754
+
755
+ .file-explorer-section {
756
+ margin-bottom: 0.75rem;
757
+ }
758
+
759
+ .file-explorer-section-title {
760
+ font-weight: bold;
761
+ color: var(--text-secondary);
762
+ font-size: 0.65rem;
763
+ margin-bottom: 0.25rem;
764
+ text-transform: uppercase;
765
+ letter-spacing: 0.5px;
766
+ }
767
+
768
+ .file-explorer-item {
769
+ display: block;
770
+ color: var(--text-secondary);
771
+ text-decoration: none;
772
+ padding: 0.1rem 0;
773
+ margin-left: 0.5rem;
774
+ transition: color 0.2s ease;
775
+ cursor: pointer;
776
+ font-family: monospace;
777
+ }
778
+
779
+ .file-explorer-item:hover {
780
+ color: var(--text-primary);
781
+ }
782
+
783
+ .file-explorer-item.script {
784
+ color: var(--text-link);
785
+ }
786
+
787
+ .file-explorer-item.artifact {
788
+ color: var(--text-secondary);
789
+ opacity: 0.8;
790
+ }
791
+
792
+
793
+ /* Hide widgets on smaller screens */
794
+ @media (max-width: 768px) {
795
+
796
+ .minimap,
797
+ .file-explorer,
798
+ .tools-widget {
799
+ display: none;
800
+ }
801
+ }
802
+
803
+ .cell {
804
+ margin: 1rem 0;
805
+ border: 1px solid var(--border-primary);
806
+ border-radius: 2px;
807
+ overflow: hidden;
808
+ background: var(--bg-secondary);
809
+ }
810
+
811
+ :root[data-ui="none"] .cell {
812
+ margin: 1em 0;
813
+ border: none;
814
+ background: transparent;
815
+ }
816
+
817
+ .cell-header {
818
+ background: var(--bg-secondary);
819
+ padding: 0.5rem 1rem;
820
+ border-bottom: 1px solid var(--border-primary);
821
+ font-family: inherit;
822
+ font-size: 0.85rem;
823
+ }
824
+
825
+ :root[data-ui="none"] .cell-header {
826
+ background: transparent;
827
+ border: none;
828
+ padding: 0;
829
+ font-weight: bold;
830
+ }
831
+
832
+ :root[data-ui="none"] .cell-content {
833
+ padding: 0;
834
+ }
835
+
836
+ :root[data-ui="none"] .copy-button,
837
+ :root[data-ui="none"] .collapse-indicators,
838
+ :root[data-ui="none"] .cell-meta,
839
+ :root[data-ui="none"] .cell-outputs-header {
840
+ display: none !important;
841
+ }
842
+
843
+ :root[data-ui="none"] pre,
844
+ :root[data-ui="none"] code {
845
+ font-family: Menlo, Monaco, 'Courier New', monospace;
846
+ }
847
+
848
+ :root[data-ui="none"] .code-content pre {
849
+ background: #f9f9f9;
850
+ border: 1px solid #ddd;
851
+ padding: 8px;
852
+ }
853
+
854
+ :root[data-ui="none"] .output {
855
+ background: transparent;
856
+ border: none;
857
+ padding: 0.25em 0;
858
+ }
859
+
860
+ color: var(--text-secondary);
861
+ cursor: pointer;
862
+ user-select: none;
863
+ transition: background-color 0.2s ease;
864
+ }
865
+
866
+ .cell-header:hover {
867
+ background: var(--bg-tertiary);
868
+ }
869
+
870
+ .collapse-indicators {
871
+ color: var(--text-secondary);
872
+ font-size: 0.8rem;
873
+ opacity: 0.7;
874
+ }
875
+
876
+ .collapse-indicators span:hover {
877
+ color: var(--text-primary);
878
+ opacity: 1;
879
+ }
880
+
881
+ .cell-code {
882
+ display: block;
883
+ background: var(--bg-code);
884
+ }
885
+
886
+ .cell-code.collapsed {
887
+ display: none;
888
+ }
889
+
890
+ .cell-code pre {
891
+ margin: 0;
892
+ padding: 0.75rem;
893
+ background: var(--bg-code);
894
+ overflow-x: auto;
895
+ color: var(--text-primary);
896
+ }
897
+
898
+ .cell-output {
899
+ padding: 0.75rem;
900
+ /* background: var(--bg-primary); */
901
+ background: var(--bg-secondary);
902
+ }
903
+
904
+ .cell-output.collapsed {
905
+ display: none;
906
+ }
907
+
908
+ .cell-stdout {
909
+ background: var(--bg-tertiary);
910
+ padding: 0.75rem;
911
+ border-radius: 1px;
912
+ /* margin: 0.25rem 0; */
913
+ font-family: inherit;
914
+ font-size: 0.9rem;
915
+ white-space: pre-wrap;
916
+ color: var(--text-primary);
917
+ }
918
+
919
+ .cell-stdout {
920
+ background: var(--bg-tertiary);
921
+ padding: 0.75rem;
922
+ border-radius: 1px;
923
+ font-family: inherit;
924
+ font-size: 0.9rem;
925
+ color: var(--text-primary);
926
+
927
+ /* key bits */
928
+ overflow: auto;
929
+ /* show scrollbars when needed */
930
+ max-width: 100%;
931
+ /* respects whatever layout width you give it */
932
+ }
933
+
934
+ .cell-stdout .stdout-text {
935
+ margin: 0;
936
+ /* reset pre default margin */
937
+ white-space: pre;
938
+ /* keep line breaks, NO wrapping */
939
+ display: inline-block;
940
+ /* shrink-to-content */
941
+ min-width: max-content;
942
+ /* allow very long lines to define intrinsic width */
943
+ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
944
+ tab-size: 2;
945
+ }
946
+
947
+ .cell-stderr {
948
+ background: var(--bg-error);
949
+ border-left: 2px solid var(--border-error);
950
+ padding: 1rem;
951
+ margin: 0.5rem 0;
952
+ font-family: inherit;
953
+ font-size: 0.9rem;
954
+ color: var(--text-error);
955
+ white-space: pre-wrap;
956
+ }
957
+
958
+ .uv-install-logs {
959
+ margin: 0.5rem 0;
960
+ }
961
+
962
+ .uv-logs-header {
963
+ cursor: pointer;
964
+ padding: 0.75rem;
965
+ border-left: 3px solid var(--border-color);
966
+ font-family: inherit;
967
+ font-size: 0.85rem;
968
+ color: var(--text-secondary);
969
+ user-select: none;
970
+ }
971
+
972
+ .uv-logs-content {
973
+ background: var(--bg-secondary);
974
+ padding: 1rem;
975
+ border-left: 3px solid var(--border-color);
976
+ white-space: pre-wrap;
977
+ font-family: monospace;
978
+ font-size: 0.85rem;
979
+ color: var(--text-secondary);
980
+ overflow-x: auto;
981
+ }
982
+
983
+ .cell-artifacts {
984
+ margin: 1rem 0;
985
+ }
986
+
987
+ .cell-artifacts h4 {
988
+ margin: 0 0 0.5rem 0;
989
+ color: var(--text-secondary);
990
+ font-size: 0.9rem;
991
+ }
992
+
993
+ .artifact {
994
+ display: inline-block;
995
+ background: var(--bg-artifact);
996
+ padding: 0.25rem 0.5rem;
997
+ border-radius: 1px;
998
+ margin: 0.25rem 0.5rem 0.25rem 0;
999
+ font-family: inherit;
1000
+ font-size: 0.8rem;
1001
+ color: var(--text-link);
1002
+ text-decoration: none;
1003
+ transition: background-color 0.2s ease;
1004
+ border: 1px solid var(--border-primary);
1005
+ }
1006
+
1007
+ .artifact:hover {
1008
+ background: var(--bg-artifact-hover);
1009
+ }
1010
+
1011
+ .artifact-preview {
1012
+ margin-top: 1rem;
1013
+ }
1014
+
1015
+ .artifact-preview img {
1016
+ max-width: 100%;
1017
+ height: auto;
1018
+ border: 1px solid var(--border-primary);
1019
+ border-radius: 1px;
1020
+ }
1021
+
1022
+ .artifact-preview svg {
1023
+ max-width: 100%;
1024
+ height: auto;
1025
+ border: 1px solid var(--border-primary);
1026
+ border-radius: 1px;
1027
+ display: block;
1028
+ }
1029
+
1030
+ /* Style SVG text elements */
1031
+ .artifact-preview svg g {
1032
+ fill: var(--text-primary) !important;
1033
+ }
1034
+
1035
+ /* Auto-theme SVG elements */
1036
+ .artifact-preview svg {
1037
+ background: transparent;
1038
+ }
1039
+
1040
+ /* Invert SVG images in dark mode */
1041
+ :root[data-theme="dark"] .artifact-preview img[src$=".svg"] {
1042
+ filter: invert(0.9) hue-rotate(180deg);
1043
+ }
1044
+
1045
+ /* Keep SVG images readable in monocolor mode */
1046
+ :root[data-ui="monocolor"] .artifact-preview img[src$=".svg"] {
1047
+ filter: none;
1048
+ }
1049
+
1050
+ /* CSV table styling */
1051
+ .artifact-csv {
1052
+ margin-top: 1rem;
1053
+ overflow-x: auto;
1054
+ }
1055
+
1056
+ .csv-table {
1057
+ width: 100%;
1058
+ border-collapse: collapse;
1059
+ font-size: 0.9rem;
1060
+ background: var(--bg-secondary);
1061
+ border: 1px solid var(--border-primary);
1062
+ border-radius: 1px;
1063
+ }
1064
+
1065
+ .csv-table th,
1066
+ .csv-table td {
1067
+ padding: 0.5rem 0.75rem;
1068
+ text-align: left;
1069
+ border: 1px solid var(--border-primary);
1070
+ }
1071
+
1072
+ .csv-table th {
1073
+ background: var(--bg-tertiary);
1074
+ font-weight: 600;
1075
+ color: var(--text-primary);
1076
+ }
1077
+
1078
+ .csv-table tbody tr:hover {
1079
+ background: var(--bg-artifact-hover);
1080
+ }
1081
+
1082
+ .artifact-csv-error {
1083
+ margin-top: 1rem;
1084
+ padding: 1rem;
1085
+ background: var(--bg-error);
1086
+ color: var(--text-error);
1087
+ border: 1px solid var(--border-error);
1088
+ border-radius: 1px;
1089
+ }
1090
+
1091
+ .cell-failed {
1092
+ border-color: var(--border-cell-failed);
1093
+ }
1094
+
1095
+ .cell-failed .cell-header {
1096
+ background: var(--bg-error);
1097
+ color: var(--text-error);
1098
+ }
1099
+
1100
+ .cell-commented {
1101
+ opacity: 0.6;
1102
+ border-style: dashed;
1103
+ }
1104
+
1105
+ .cell-commented .cell-header {
1106
+ background: var(--bg-secondary);
1107
+ color: var(--text-secondary);
1108
+ font-style: italic;
1109
+ }
1110
+
1111
+ .run-btn {
1112
+ background: var(--bg-tertiary);
1113
+ border: 1px solid var(--border-primary);
1114
+ padding: 2px 6px;
1115
+ border-radius: 2px;
1116
+ color: var(--text-secondary);
1117
+ cursor: pointer;
1118
+ font-size: 0.75em;
1119
+ font-family: inherit;
1120
+ margin-left: 4px;
1121
+ }
1122
+
1123
+ .run-btn:hover {
1124
+ color: var(--text-primary);
1125
+ background: var(--bg-primary);
1126
+ }
1127
+
1128
+ .run-btn:disabled {
1129
+ opacity: 0.6;
1130
+ cursor: not-allowed;
1131
+ }
1132
+
1133
+ .copy-btn {
1134
+ background: var(--bg-tertiary);
1135
+ border: 1px solid var(--border-primary);
1136
+ padding: 2px 6px;
1137
+ border-radius: 2px;
1138
+ color: var(--text-secondary);
1139
+ cursor: pointer;
1140
+ font-size: 0.75em;
1141
+ font-family: inherit;
1142
+ margin-left: 4px;
1143
+ }
1144
+
1145
+ .copy-btn:hover {
1146
+ color: var(--text-primary);
1147
+ background: var(--bg-primary);
1148
+ }
1149
+
1150
+ .copy-btn:disabled {
1151
+ opacity: 0.6;
1152
+ cursor: not-allowed;
1153
+ }
1154
+
1155
+ .copy-btn.copied {
1156
+ color: #4caf50;
1157
+ background: var(--bg-primary);
1158
+ border-color: #4caf50;
1159
+ transition: all 0.2s ease;
1160
+ }
1161
+
1162
+ .raw-btn {
1163
+ background: var(--bg-tertiary);
1164
+ border: 1px solid var(--border-primary);
1165
+ padding: 2px 6px;
1166
+ border-radius: 2px;
1167
+ color: var(--text-secondary);
1168
+ cursor: pointer;
1169
+ font-size: 0.75em;
1170
+ font-family: inherit;
1171
+ margin-left: 4px;
1172
+ text-decoration: none;
1173
+ display: inline-block;
1174
+ }
1175
+
1176
+ .raw-btn:hover {
1177
+ color: var(--text-primary);
1178
+ background: var(--bg-primary);
1179
+ text-decoration: none;
1180
+ }
1181
+
1182
+ .github-btn {
1183
+ background: var(--bg-tertiary);
1184
+ border: 1px solid var(--border-primary);
1185
+ padding: 2px 6px;
1186
+ border-radius: 2px;
1187
+ color: var(--text-secondary);
1188
+ cursor: pointer;
1189
+ font-size: 0.75em;
1190
+ font-family: inherit;
1191
+ margin-left: 4px;
1192
+ text-decoration: none;
1193
+ display: inline-block;
1194
+ }
1195
+
1196
+ .github-btn:hover {
1197
+ color: var(--text-primary);
1198
+ background: var(--bg-primary);
1199
+ text-decoration: none;
1200
+ }
1201
+
1202
+ .hf-btn {
1203
+ background: var(--bg-tertiary);
1204
+ border: 1px solid var(--border-primary);
1205
+ padding: 2px 6px;
1206
+ border-radius: 2px;
1207
+ color: var(--text-secondary);
1208
+ cursor: pointer;
1209
+ font-size: 0.75em;
1210
+ font-family: inherit;
1211
+ margin-left: 4px;
1212
+ text-decoration: none;
1213
+ display: inline-block;
1214
+ }
1215
+
1216
+ .hf-btn:hover {
1217
+ color: var(--text-primary);
1218
+ background: var(--bg-primary);
1219
+ text-decoration: none;
1220
+ }
1221
+
1222
+ .output-stale {
1223
+ opacity: 0.5;
1224
+ position: relative;
1225
+ }
1226
+
1227
+ .output-stale::after {
1228
+ content: '⏳ updating...';
1229
+ position: absolute;
1230
+ top: 8px;
1231
+ right: 8px;
1232
+ background: var(--bg-secondary);
1233
+ padding: 4px 8px;
1234
+ border-radius: 2px;
1235
+ font-size: 0.75em;
1236
+ color: var(--text-secondary);
1237
+ border: 1px solid var(--border-primary);
1238
+ }
1239
+
1240
+ h1,
1241
+ h2,
1242
+ h3,
1243
+ h4,
1244
+ h5,
1245
+ h6 {
1246
+ margin-top: 1.5rem;
1247
+ margin-bottom: 0.75rem;
1248
+ color: var(--text-primary);
1249
+ }
1250
+
1251
+ h1 {
1252
+ margin-top: 0;
1253
+ margin-bottom: 1rem;
1254
+ }
1255
+
1256
+ p {
1257
+ margin: 0.75rem 0;
1258
+ color: var(--text-primary);
1259
+ }
1260
+
1261
+ a {
1262
+ color: var(--text-link);
1263
+ }
1264
+
1265
+ img {
1266
+ max-width: 100%;
1267
+ height: auto;
1268
+ border-radius: 1px;
1269
+ box-shadow: none;
1270
+ }
1271
+
1272
+ pre,
1273
+ code {
1274
+ font-family: 'Cascadia Mono', 'Cascadia Code', 'JetBrains Mono', 'SF Mono', Monaco, 'Consolas', monospace;
1275
+ font-size: var(--code-font-size);
1276
+ }
1277
+
1278
+ .code-wrap {
1279
+ position: relative;
1280
+ }
1281
+
1282
+ .code-line-highlight {
1283
+ display: none;
1284
+ position: absolute;
1285
+ left: 0;
1286
+ right: 0;
1287
+ height: 1.5em;
1288
+ background: rgba(255, 235, 170, 0.35);
1289
+ pointer-events: none;
1290
+ border-left: 3px solid #f4c542;
1291
+ }
1292
+
1293
+ .line-number {
1294
+ cursor: pointer;
1295
+ text-decoration: none;
1296
+ color: var(--text-secondary);
1297
+ padding: 0 0.25rem;
1298
+ }
1299
+
1300
+ .line-number.selected {
1301
+ background: rgba(255, 235, 170, 0.4);
1302
+ color: var(--text-primary);
1303
+ }
1304
+
1305
+ /* Line numbers */
1306
+ .highlight-with-lines {
1307
+ display: flex;
1308
+ }
1309
+
1310
+ .line-numbers {
1311
+ background: var(--bg-tertiary);
1312
+ padding: var(--code-pad-y) 0.5rem;
1313
+ font-family: 'Cascadia Mono', 'Cascadia Code', 'JetBrains Mono', 'SF Mono', Monaco, 'Consolas', monospace;
1314
+ font-size: var(--code-font-size);
1315
+ line-height: var(--code-line-height);
1316
+ color: var(--text-secondary);
1317
+ user-select: none;
1318
+ text-align: right;
1319
+ border-right: 1px solid var(--border-primary);
1320
+ }
1321
+
1322
+ .line-numbers .line-number {
1323
+ display: block;
1324
+ line-height: var(--code-line-height);
1325
+ }
1326
+
1327
+ .highlight-with-lines .highlight {
1328
+ flex: 1;
1329
+ }
1330
+
1331
+ .highlight .hll {
1332
+ background-color: transparent;
1333
+ }
1334
+
1335
+ /* don't conflict with our highlight */
1336
+ .highlight pre {
1337
+ white-space: pre;
1338
+ margin: 0;
1339
+ padding: var(--code-pad-y) 0.75rem;
1340
+ line-height: var(--code-line-height);
1341
+ }
1342
+
1343
+ /* Collapsed code styling */
1344
+ .cell-code.collapsed {
1345
+ display: none;
1346
+ }
1347
+
1348
+ .cell-code.expanded {
1349
+ display: block;
1350
+ }
1351
+
1352
+ {
1353
+ % if config.collapse_code %
1354
+ }
1355
+
1356
+ .cell-code {
1357
+ display: none;
1358
+ }
1359
+
1360
+ {
1361
+ % else %
1362
+ }
1363
+
1364
+ .cell-code {
1365
+ display: block;
1366
+ border-bottom: 1px solid var(--border-primary);
1367
+ }
1368
+
1369
+ {
1370
+ % endif %
1371
+ }
1372
+
1373
+ {
1374
+ {
1375
+ pygments_css
1376
+ }
1377
+ }
1378
+
1379
+ /* Ensure our code metrics override Pygments defaults */
1380
+ .highlight pre {
1381
+ white-space: pre;
1382
+ margin: 0;
1383
+ padding: var(--code-pad-y) 0.75rem !important;
1384
+ line-height: var(--code-line-height) !important;
1385
+ font-size: var(--code-font-size) !important;
1386
+ font-family: 'Cascadia Mono', 'Cascadia Code', 'JetBrains Mono', 'SF Mono', Monaco, 'Consolas', monospace !important;
1387
+ border: none;
1388
+ }
1389
+
1390
+ .line-numbers {
1391
+ line-height: var(--code-line-height) !important;
1392
+ }
1393
+
1394
+ .line-numbers .line-number {
1395
+ line-height: var(--code-line-height) !important;
1396
+ }
1397
+
1398
+ /* Custom CSS from frontmatter */
1399
+ {
1400
+ {
1401
+ config.custom_css
1402
+ }
1403
+ }
1404
+
1405
+ {
1406
+ # Override code font size from frontmatter (accept number as px) #
1407
+ }
1408
+
1409
+ {
1410
+ % if config.code_font_size is not none %
1411
+ }
1412
+
1413
+ {
1414
+ % if config.code_font_size is string %
1415
+ }
1416
+
1417
+ :root {
1418
+ --code-font-size: {
1419
+ {
1420
+ config.code_font_size
1421
+ }
1422
+ }
1423
+
1424
+ ;
1425
+ }
1426
+
1427
+ {
1428
+ % else %
1429
+ }
1430
+
1431
+ :root {
1432
+ --code-font-size: {
1433
+ {
1434
+ config.code_font_size
1435
+ }
1436
+ }
1437
+
1438
+ px;
1439
+ }
1440
+
1441
+ {
1442
+ % endif %
1443
+ }
1444
+
1445
+ {
1446
+ % endif %
1447
+ }
1448
+
1449
+ /* Cursor for tools */
1450
+ body[data-tool="arrow"] .main-content {
1451
+ cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23e53935" stroke-width="2"><path d="M12 19l7-7 3 3-7 7-3-3z"/><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"/><path d="M2 2l7.586 7.586"/><circle cx="11" cy="11" r="2"/></svg>') 12 12, crosshair;
1452
+ }
1453
+
1454
+ body[data-tool="pen"] .main-content {
1455
+ cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23e53935" stroke-width="2"><path d="M12 19l7-7 3 3-7 7-3-3z"/><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"/><circle cx="4" cy="20" r="2" fill="%23e53935"/></svg>') 4 20, pointer;
1456
+ }
1457
+
1458
+ body[data-tool="eraser"] .main-content {
1459
+ cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23e53935" stroke-width="2"><path d="M20 20H7l-7-7 7-7h13v14z"/><path d="M13 13l7-7"/><path d="M13 13L9 9"/></svg>') 12 12, auto;
1460
+ }
1461
+
1462
+ /* Color picker styles */
1463
+ .tools-section-title {
1464
+ font-weight: bold;
1465
+ color: var(--text-secondary);
1466
+ font-size: 0.65rem;
1467
+ margin: 0.75rem 0 0.5rem 0;
1468
+ text-transform: uppercase;
1469
+ letter-spacing: 0.5px;
1470
+ }
1471
+
1472
+ .color-row {
1473
+ display: grid;
1474
+ grid-template-columns: repeat(6, 1fr);
1475
+ gap: 0.25rem;
1476
+ margin-bottom: 0.5rem;
1477
+ }
1478
+
1479
+ .color-swatch {
1480
+ width: 18px;
1481
+ height: 18px;
1482
+ border: 2px solid var(--border-primary);
1483
+ border-radius: 3px;
1484
+ cursor: pointer;
1485
+ transition: all 0.2s ease;
1486
+ position: relative;
1487
+ }
1488
+
1489
+ .color-swatch:hover {
1490
+ transform: scale(1.1);
1491
+ border-color: var(--text-secondary);
1492
+ }
1493
+
1494
+ .color-swatch.selected {
1495
+ border-color: var(--text-primary);
1496
+ box-shadow: 0 0 0 2px var(--text-link);
1497
+ }
1498
+
1499
+ .color-swatch.selected::after {
1500
+ content: '✓';
1501
+ position: absolute;
1502
+ top: 50%;
1503
+ left: 50%;
1504
+ transform: translate(-50%, -50%);
1505
+ color: white;
1506
+ font-size: 10px;
1507
+ font-weight: bold;
1508
+ text-shadow: 1px 1px 1px black;
1509
+ }
1510
+
1511
+ .color-input {
1512
+ width: 24px;
1513
+ height: 24px;
1514
+ border: 2px solid var(--border-primary);
1515
+ border-radius: 3px;
1516
+ cursor: pointer;
1517
+ background: none;
1518
+ padding: 0;
1519
+ grid-column: span 2;
1520
+ justify-self: center;
1521
+ }
1522
+
1523
+ .color-input:hover {
1524
+ border-color: var(--text-secondary);
1525
+ }
1526
+
1527
+ /* Thickness slider styles */
1528
+ .thickness-row {
1529
+ display: flex;
1530
+ align-items: center;
1531
+ gap: 0.5rem;
1532
+ margin-top: 0.75rem;
1533
+ }
1534
+
1535
+ .thickness-slider {
1536
+ flex: 1;
1537
+ -webkit-appearance: none;
1538
+ appearance: none;
1539
+ height: 4px;
1540
+ background: var(--border-primary);
1541
+ border-radius: 2px;
1542
+ outline: none;
1543
+ opacity: 0.7;
1544
+ transition: opacity 0.2s;
1545
+ }
1546
+
1547
+ .thickness-slider:hover {
1548
+ opacity: 1;
1549
+ }
1550
+
1551
+ .thickness-slider::-webkit-slider-thumb {
1552
+ -webkit-appearance: none;
1553
+ appearance: none;
1554
+ width: 12px;
1555
+ height: 12px;
1556
+ background: var(--text-link);
1557
+ border-radius: 50%;
1558
+ cursor: pointer;
1559
+ }
1560
+
1561
+ .thickness-slider::-moz-range-thumb {
1562
+ width: 12px;
1563
+ height: 12px;
1564
+ background: var(--text-link);
1565
+ border-radius: 50%;
1566
+ cursor: pointer;
1567
+ border: none;
1568
+ }
1569
+
1570
+ .thickness-value {
1571
+ font-size: 0.7rem;
1572
+ color: var(--text-secondary);
1573
+ min-width: 20px;
1574
+ text-align: right;
1575
+ }
1576
+
1577
+ .highlight {
1578
+ background: none !important;
1579
+ }
1580
+
1581
+ /* Loading animations */
1582
+ .loading-spinner {
1583
+ display: inline-block;
1584
+ width: 16px;
1585
+ height: 16px;
1586
+ border: 2px solid var(--border-primary);
1587
+ border-radius: 50%;
1588
+ border-top-color: var(--text-link);
1589
+ animation: spin 1s linear infinite;
1590
+ margin-right: 8px;
1591
+ vertical-align: middle;
1592
+ }
1593
+
1594
+ @keyframes spin {
1595
+ to {
1596
+ transform: rotate(360deg);
1597
+ }
1598
+ }
1599
+
1600
+ .loading-skeleton {
1601
+ display: inline-block;
1602
+ background: var(--bg-tertiary);
1603
+ background: linear-gradient(90deg,
1604
+ var(--bg-tertiary) 25%,
1605
+ var(--bg-secondary) 50%,
1606
+ var(--bg-tertiary) 75%);
1607
+ background-size: 200% 100%;
1608
+ animation: loading-shimmer 2s ease-in-out infinite;
1609
+ border-radius: 2px;
1610
+ height: 1em;
1611
+ width: 80px;
1612
+ vertical-align: middle;
1613
+ }
1614
+
1615
+ @keyframes loading-shimmer {
1616
+ 0% {
1617
+ background-position: -200% 0;
1618
+ }
1619
+
1620
+ 100% {
1621
+ background-position: 200% 0;
1622
+ }
1623
+ }
1624
+
1625
+ /* Loading state for cell output */
1626
+ .cell-output:has(.loading-spinner) {
1627
+ opacity: 0.7;
1628
+ background: var(--bg-secondary);
1629
+ /* border-left: 3px solid var(--text-link); */
1630
+ }
1631
  </style>
1632
  <script>
1633
  // --- Drag utilities ---
 
4097
  </div>
4098
 
4099
  <div class="main-content">
4100
+ <h1>KERNELS COMMUNITY BENCHMARKS</h1>
4101
+ <p>This report aggregates latency and performance benchmarks across core model components.<br />
4102
+ Each section includes:<br />
4103
+ - A latency visualization<br />
4104
+ - Links to detailed implementation benchmarks </p>
4105
+ <h2>TABLE OF CONTENTS</h2>
4106
+ <ul>
4107
+ <li><a href="#methodology">METHODOLOGY</a></li>
4108
+ <li><a href="#layer-normalization">LAYER NORMALIZATION</a></li>
4109
+ <li><a href="#rotary-position-embeddings">ROTARY POSITION EMBEDDINGS</a></li>
4110
+ <li><a href="#flash-attention">FLASH ATTENTION</a></li>
4111
+ <li><a href="#causal-conv1d">CAUSAL CONV1D</a></li>
4112
+ <li><a href="#activation-functions">ACTIVATION FUNCTIONS</a></li>
4113
+ <li><a href="#notes">NOTES</a></li>
4114
+ </ul>
4115
+ <h2>METHODOLOGY</h2>
4116
+ <p>Each benchmark is run with the <a href="https://github.com/huggingface/kernels-benchmarks">Kernels Benchmarking Framework</a> and follows these principles:<br />
4117
+ - a reference implementation (usually PyTorch native) is included for baseline comparison<br />
4118
+ - multiple input sizes and batch sizes are tested to reflect real-world usage<br />
4119
+ - runs are repeatable via python virtual environments and documented dependencies<br />
4120
+ - results are collected and visualized using standardized scripts </p>
4121
+ <hr />
4122
+ <div class="alert">
4123
+ <strong>Note:</strong> Latency values are measured in milliseconds (ms). Lower values indicate better performance.
4124
+ </div>
4125
+
4126
+ <h2>LAYER NORMALIZATION</h2>
4127
  <div class="artifact-preview">
4128
+ <img src="layer_norm/results/artifacts/combine/latency.svg" alt="Layer Norm Latency" width="800">
4129
  </div>
4130
 
4131
  <table>
 
4137
  </thead>
4138
  <tbody>
4139
  <tr>
4140
+ <td>HF Kernels Layer Norm</td>
4141
  <td>HuggingFace kernels implementation</td>
4142
  </tr>
4143
  <tr>
4144
+ <td>PyTorch Layer Norm</td>
4145
  <td>PyTorch native implementation</td>
4146
  </tr>
4147
  </tbody>
4148
  </table>
4149
+ <p align="center">
4150
+ <!-- <button onclick="window.location.href='layer_norm/'" style="margin-left: 20px; padding: 10px 20px; background-color: #007bff; color: white; border: none; border-radius: 5px; cursor: pointer;"> -->
4151
+ <button
4152
+ onclick="window.location.href='layer_norm/'"
4153
+ class="btn">
4154
+ Explore Full Bench
4155
+ </button>
4156
+ </p>
4157
+
4158
+ <hr />
4159
+ <h2>ROTARY POSITION EMBEDDINGS</h2>
4160
  <div class="artifact-preview">
4161
+ <img src="rotary/results/artifacts/combine/latency.svg" alt="Rotary Position Embeddings Latency" width="800">
4162
  </div>
4163
 
4164
  <table>
 
4170
  </thead>
4171
  <tbody>
4172
  <tr>
4173
+ <td>HF Kernels Rotary</td>
4174
  <td>HuggingFace kernels implementation</td>
4175
  </tr>
4176
  <tr>
4177
+ <td>PyTorch Rotary</td>
4178
  <td>PyTorch native implementation</td>
4179
  </tr>
4180
  </tbody>
4181
  </table>
4182
+ <p align="center">
4183
+ <button
4184
+ onclick="window.location.href='rotary/'"
4185
+ class="btn">
4186
+ Explore Full Bench
4187
+ </button>
4188
+ </p>
4189
+
4190
+ <hr />
4191
+ <h2>FLASH ATTENTION</h2>
4192
  <div class="artifact-preview">
4193
+ <img src="flash_attn/results/artifacts/combine/latency.svg" alt="Flash Attention Latency" width="800">
4194
  </div>
4195
 
4196
  <table>
 
4202
  </thead>
4203
  <tbody>
4204
  <tr>
4205
+ <td>Flash Attention</td>
4206
  <td>Flash Attention implementation</td>
4207
  </tr>
4208
  <tr>
4209
+ <td>HF Kernels Flash Attention</td>
4210
  <td>HuggingFace kernels Flash Attention</td>
4211
  </tr>
4212
  <tr>
4213
+ <td>HF Kernels Flash Attention 3</td>
4214
  <td>HuggingFace kernels Flash Attention 3</td>
4215
  </tr>
4216
  <tr>
4217
+ <td>Memory Efficient Attention</td>
4218
  <td>Memory efficient attention implementation</td>
4219
  </tr>
4220
  <tr>
4221
+ <td>Sage Attention</td>
4222
  <td>Sage attention implementation</td>
4223
  </tr>
4224
  <tr>
4225
+ <td>xFormers</td>
4226
  <td>xFormers attention implementation</td>
4227
  </tr>
4228
  </tbody>
4229
  </table>
4230
+ <p align="center">
4231
+ <button
4232
+ onclick="window.location.href='flash_attn/'"
4233
+ class="btn">
4234
+ Explore Full Bench
4235
+ </button>
4236
+ </p>
4237
+
4238
+ <hr />
4239
+ <h2>CAUSAL CONV1D</h2>
4240
  <div class="artifact-preview">
4241
+ <img src="causal_conv1d/results/artifacts/combine/latency.svg" alt="Causal Conv1D Latency" width="800">
4242
  </div>
4243
 
4244
  <table>
 
4250
  </thead>
4251
  <tbody>
4252
  <tr>
4253
+ <td>HF Kernels Causal Conv1D</td>
4254
  <td>HuggingFace kernels implementation</td>
4255
  </tr>
4256
  <tr>
4257
+ <td>PyTorch Causal Conv1D</td>
4258
  <td>PyTorch native implementation</td>
4259
  </tr>
4260
  </tbody>
4261
  </table>
4262
+ <p align="center">
4263
+ <button
4264
+ onclick="window.location.href='causal_conv1d/'"
4265
+ class="btn">
4266
+ Explore Full Bench
4267
+ </button>
4268
+ </p>
4269
+
4270
+ <hr />
4271
+ <h2>ACTIVATION FUNCTIONS</h2>
4272
  <div class="artifact-preview">
4273
+ <img src="activation/results/artifacts/combine/latency.svg" alt="Activation Latency" width="800">
4274
  </div>
4275
 
4276
  <table>
 
4282
  </thead>
4283
  <tbody>
4284
  <tr>
4285
+ <td>HF Kernels SwiGLU</td>
4286
  <td>HuggingFace kernels SwiGLU implementation</td>
4287
  </tr>
4288
  <tr>
4289
+ <td>PyTorch SwiGLU</td>
4290
  <td>PyTorch native SwiGLU implementation</td>
4291
  </tr>
4292
  </tbody>
4293
  </table>
4294
+ <p align="center">
4295
+ <button
4296
+ onclick="window.location.href='activation/'"
4297
+ class="btn">
4298
+ Explore Full Bench
4299
+ </button>
4300
+ </p>
4301
+
4302
+ <hr />
4303
+ <style>
4304
+ .controls {
4305
+ display: none !important;
4306
+ }
4307
+ .status-widget {
4308
+ display: none !important;
4309
+ }
4310
+ table {
4311
+ width: 100%;
4312
+ border-collapse: collapse;
4313
+ font-size: 0.9rem;
4314
+ background: var(--bg-secondary);
4315
+ border: 1px solid var(--border-primary);
4316
+ border-radius: 1px;
4317
+ }
4318
+ table th,
4319
+ table td {
4320
+ padding: 0.5rem 0.75rem;
4321
+ text-align: left;
4322
+ border: 1px solid var(--border-primary);
4323
+ }
4324
+ table th {
4325
+ background: var(--bg-tertiary);
4326
+ font-weight: 600;
4327
+ color: var(--text-primary);
4328
+ }
4329
+ table tbody tr:hover {
4330
+ background: var(--bg-artifact-hover);
4331
+ }
4332
+ .btn {
4333
+ margin: 10px 0;
4334
+ padding: 10px 20px;
4335
+ background-color: transparent;
4336
+ color: inherit;
4337
+ border: 1px solid var(--text-primary);
4338
+ border-radius: 5px;
4339
+ cursor: pointer;
4340
+ }
4341
+ .btn:hover {
4342
+ background-color: var(--bg-artifact-hover);
4343
+ }
4344
+ :root {
4345
+ --bg-alert: #0069cbff;
4346
+ --border-alert: #001628ff;
4347
+ }
4348
+ .alert {
4349
+ padding: 5px;
4350
+ background-color: var(--bg-alert);
4351
+ border-left: 6px solid var(--border-alert);
4352
+ margin-bottom: 10px;
4353
+ border-radius: 6px;
4354
+ }
4355
+ </style>
4356
  </div>
4357
 
4358
  </body>
layer_norm/impls/artifacts/benchmark/layer_norm.jsonl CHANGED
@@ -1,4 +1,4 @@
1
- {"ts": "2025-10-29T15:50:43Z", "run": "146df378aaa14293b5d1526656fc6cb4", "impl": "torch_layer_norm", "tags": {"family": "torch", "op": "layer_norm"}, "wl": {"name": "LN_B16_S2048_D4096", "batch": 16, "seq_len": 2048, "hidden_dim": 4096, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.8137589999819284, "p50": 0.8219090000238793, "p90": 0.8223789999988185, "mean": 0.8196492000138278, "iqr": 0.007259999961206631, "raw_times": [0.825080000026901, 0.8219090000238793, 0.8137589999819284, 0.8223789999988185, 0.8151190000376118], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.8213489999775447, "peak_bytes": 2415935488, "ok": true, "absmax": 0.03125, "corr": {"ok": true, "rtol": 0.001, "atol": 0.03125, "absmax": 0.03125, "mae": 0.0015411376953125, "mse": 1.1205673217773438e-05, "ref": "layer_norm_ref"}, "err": null}
2
- {"ts": "2025-10-29T15:50:43Z", "run": "146df378aaa14293b5d1526656fc6cb4", "impl": "torch_layer_norm", "tags": {"family": "torch", "op": "layer_norm"}, "wl": {"name": "LN_B16_S2048_D8192", "batch": 16, "seq_len": 2048, "hidden_dim": 8192, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 1.680888999999297, "p50": 1.6820789999769659, "p90": 1.6842590000010205, "mean": 1.683131400000093, "iqr": 0.0026189999857706425, "raw_times": [1.6820789999769659, 1.680888999999297, 1.6816400000152498, 1.6842590000010205, 1.6867900000079317], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 1.687689999982922, "peak_bytes": 4831870976, "ok": true, "absmax": 0.03125, "corr": {"ok": true, "rtol": 0.001, "atol": 0.03125, "absmax": 0.03125, "mae": 0.0015106201171875, "mse": 1.1086463928222656e-05, "ref": "layer_norm_ref"}, "err": null}
3
- {"ts": "2025-10-29T15:50:43Z", "run": "146df378aaa14293b5d1526656fc6cb4", "impl": "torch_layer_norm", "tags": {"family": "torch", "op": "layer_norm"}, "wl": {"name": "LN_B16_S4096_D4096", "batch": 16, "seq_len": 4096, "hidden_dim": 4096, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 1.603787000021839, "p50": 1.6093779999550861, "p90": 1.6102179999961663, "mean": 1.6086159999986194, "iqr": 0.002069999993636884, "raw_times": [1.6093779999550861, 1.6081480000025294, 1.603787000021839, 1.611549000017476, 1.6102179999961663], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 1.6238279999924998, "peak_bytes": 4831854592, "ok": true, "absmax": 0.03125, "corr": {"ok": true, "rtol": 0.001, "atol": 0.03125, "absmax": 0.03125, "mae": 0.0015411376953125, "mse": 1.1205673217773438e-05, "ref": "layer_norm_ref"}, "err": null}
4
- {"ts": "2025-10-29T15:50:44Z", "run": "146df378aaa14293b5d1526656fc6cb4", "impl": "torch_layer_norm", "tags": {"family": "torch", "op": "layer_norm"}, "wl": {"name": "LN_B16_S4096_D8192", "batch": 16, "seq_len": 4096, "hidden_dim": 8192, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 3.30805800001599, "p50": 3.3301390000133324, "p90": 3.331328999991001, "mean": 3.3278527999868857, "iqr": 0.001610000026630587, "raw_times": [3.331328999991001, 3.3400189999497343, 3.3297189999643706, 3.30805800001599, 3.3301390000133324], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 3.3235790000389898, "peak_bytes": 9663709184, "ok": true, "absmax": 0.03125, "corr": {"ok": true, "rtol": 0.001, "atol": 0.03125, "absmax": 0.03125, "mae": 0.0015106201171875, "mse": 1.1026859283447266e-05, "ref": "layer_norm_ref"}, "err": null}
 
1
+ {"ts": "2025-10-30T15:53:20Z", "run": "43d96fd4ebe14ca496dc9089d5327f41", "impl": "hf_kernels_layer_norm", "tags": {"family": "hf-kernels", "repo": "kernels-community/layer-norm", "op": "layer_norm"}, "wl": {"name": "LN_B16_S2048_D4096", "batch": 16, "seq_len": 2048, "hidden_dim": 4096, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.8346939999910319, "p50": 0.8380950000059784, "p90": 0.838174000023173, "mean": 0.8376522000048681, "iqr": 0.0016900000332498166, "raw_times": [0.8346939999910319, 0.8364839999899232, 0.8408140000142339, 0.838174000023173, 0.8380950000059784], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.8434949999696073, "peak_bytes": 2415935488, "ok": true, "absmax": 0.03125, "corr": {"ok": true, "rtol": 0.001, "atol": 0.03125, "absmax": 0.03125, "mae": 0.0015411376953125, "mse": 1.1205673217773438e-05, "ref": "layer_norm_ref"}, "err": null}
2
+ {"ts": "2025-10-30T15:53:20Z", "run": "43d96fd4ebe14ca496dc9089d5327f41", "impl": "hf_kernels_layer_norm", "tags": {"family": "hf-kernels", "repo": "kernels-community/layer-norm", "op": "layer_norm"}, "wl": {"name": "LN_B16_S2048_D8192", "batch": 16, "seq_len": 2048, "hidden_dim": 8192, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 1.6432289999670502, "p50": 1.649038999971708, "p90": 1.6514490000076876, "mean": 1.6484529999956976, "iqr": 0.006049999967672193, "raw_times": [1.649038999971708, 1.6531489999920268, 1.6453990000400154, 1.6432289999670502, 1.6514490000076876], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 1.660748999995576, "peak_bytes": 4831870976, "ok": true, "absmax": 0.03125, "corr": {"ok": true, "rtol": 0.001, "atol": 0.03125, "absmax": 0.03125, "mae": 0.0015106201171875, "mse": 1.1086463928222656e-05, "ref": "layer_norm_ref"}, "err": null}
3
+ {"ts": "2025-10-30T15:53:20Z", "run": "43d96fd4ebe14ca496dc9089d5327f41", "impl": "hf_kernels_layer_norm", "tags": {"family": "hf-kernels", "repo": "kernels-community/layer-norm", "op": "layer_norm"}, "wl": {"name": "LN_B16_S4096_D4096", "batch": 16, "seq_len": 4096, "hidden_dim": 4096, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 1.639337999961299, "p50": 1.64666899996746, "p90": 1.647079000008489, "mean": 1.645640799983994, "iqr": 0.0004199999921183917, "raw_times": [1.64666899996746, 1.6484589999663513, 1.639337999961299, 1.647079000008489, 1.6466590000163706], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 1.6403390000050422, "peak_bytes": 4831854592, "ok": true, "absmax": 0.03125, "corr": {"ok": true, "rtol": 0.001, "atol": 0.03125, "absmax": 0.03125, "mae": 0.0015411376953125, "mse": 1.1205673217773438e-05, "ref": "layer_norm_ref"}, "err": null}
4
+ {"ts": "2025-10-30T15:53:21Z", "run": "43d96fd4ebe14ca496dc9089d5327f41", "impl": "hf_kernels_layer_norm", "tags": {"family": "hf-kernels", "repo": "kernels-community/layer-norm", "op": "layer_norm"}, "wl": {"name": "LN_B16_S4096_D8192", "batch": 16, "seq_len": 4096, "hidden_dim": 8192, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 3.2456669999874066, "p50": 3.2605380000063633, "p90": 3.2625569999709114, "mean": 3.2589550000011513, "iqr": 0.014490999944882788, "raw_times": [3.2456669999874066, 3.2625569999709114, 3.2605380000063633, 3.277947000015047, 3.2480660000260286], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 3.260236999949484, "peak_bytes": 9663709184, "ok": true, "absmax": 0.03125, "corr": {"ok": true, "rtol": 0.001, "atol": 0.03125, "absmax": 0.03125, "mae": 0.0015106201171875, "mse": 1.1026859283447266e-05, "ref": "layer_norm_ref"}, "err": null}
layer_norm/impls/cells/benchmark.py CHANGED
@@ -3,6 +3,7 @@
3
  # dependencies = [
4
  # "numpy",
5
  # "torch==2.8.0",
 
6
  # "kernels-benchmark-tools",
7
  # ]
8
  #
@@ -12,15 +13,37 @@
12
  import torch
13
  import sys
14
  from kernels_benchmark_tools import KernelTypeEnum, run_benchmark
 
15
 
 
 
16
 
17
- def torch_layer_norm(x, weight, bias, eps: float = 1e-5):
18
- return torch.nn.functional.layer_norm(x, (x.shape[-1],), weight, bias, eps)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
 
20
 
21
  run_benchmark(
22
  kernel_type=KernelTypeEnum.LAYER_NORM,
23
- impl_name="torch_layer_norm",
24
- impl_tags={"family": "torch", "op": "layer_norm"},
25
- impl_func=torch_layer_norm,
26
  )
 
3
  # dependencies = [
4
  # "numpy",
5
  # "torch==2.8.0",
6
+ # "kernels",
7
  # "kernels-benchmark-tools",
8
  # ]
9
  #
 
13
  import torch
14
  import sys
15
  from kernels_benchmark_tools import KernelTypeEnum, run_benchmark
16
+ from kernels import get_kernel
17
 
18
+ # Load the layer norm kernel
19
+ layer_norm_kernel = get_kernel("kernels-community/layer-norm")
20
 
21
+
22
+ def hf_kernels_layer_norm(x, weight, bias, eps: float = 1e-5):
23
+ B, S, D = x.shape
24
+ # The kernel expects [N, D] input; support beta (bias) if provided.
25
+ out = layer_norm_kernel.dropout_add_ln_fwd(
26
+ input=x.view(-1, D),
27
+ gamma=weight,
28
+ beta=bias,
29
+ rowscale=None,
30
+ colscale=None,
31
+ x0_subset=None,
32
+ z_subset=None,
33
+ dropout_p=0.0,
34
+ epsilon=eps,
35
+ rowscale_const=1.0,
36
+ z_numrows=S,
37
+ gen=None,
38
+ residual_in_fp32=False,
39
+ is_rms_norm=False,
40
+ )[0].view(B, S, D)
41
+ return out
42
 
43
 
44
  run_benchmark(
45
  kernel_type=KernelTypeEnum.LAYER_NORM,
46
+ impl_name="hf_kernels_layer_norm",
47
+ impl_tags={"family": "hf-kernels", "repo": "kernels-community/layer-norm", "op": "layer_norm"},
48
+ impl_func=hf_kernels_layer_norm,
49
  )
layer_norm/impls/hf_kernels_layer_norm.html CHANGED
The diff for this file is too large to render. See raw diff
 
layer_norm/impls/torch_layer_norm.html CHANGED
The diff for this file is too large to render. See raw diff
 
layer_norm/results/artifacts/combine/latency.svg CHANGED

Git LFS Details

  • SHA256: 9bbb6ba8f80ad7d025abae8130bb65dedc3691b259d1e31011653d588f2a3243
  • Pointer size: 130 Bytes
  • Size of remote file: 14.6 kB

Git LFS Details

  • SHA256: fae823f30e52d7309b2e012b577544ab4911a33cc2d4ec0acdc57866ceb942fa
  • Pointer size: 130 Bytes
  • Size of remote file: 14.6 kB
layer_norm/results/combined_results.html CHANGED
The diff for this file is too large to render. See raw diff
 
rotary/impls/artifacts/benchmark/rotary.jsonl CHANGED
@@ -1,24 +1,24 @@
1
- {"ts": "2025-10-29T15:50:31Z", "run": "acca4aa63c524f09b2ae69a99c25a06c", "impl": "hf_kernels_rotary", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B1_S128_H8_D64_R32", "batch": 1, "seqlen": 128, "num_heads": 8, "head_dim": 64, "rotary_dim": 32, "dtype": "float32", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.0735019999638098, "p50": 0.07410199998503231, "p90": 0.07441199994673298, "mean": 0.07416379996811884, "iqr": 0.00038999996831989847, "raw_times": [0.07478099996660603, 0.0735019999638098, 0.07441199994673298, 0.07402199997841308, 0.07410199998503231], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.08146199996872383, "peak_bytes": 3178496, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 1e-05, "atol": 1e-05, "absmax_q": 9.5367431640625e-07, "absmax_k": 9.5367431640625e-07, "mae_q": 1.590452924915553e-08, "mae_k": 1.5487040982975486e-08, "mse_q": 2.5241010080938753e-15, "mse_k": 2.364223539299626e-15, "ref": "rotary_torch"}, "err": null}
2
- {"ts": "2025-10-29T15:50:31Z", "run": "acca4aa63c524f09b2ae69a99c25a06c", "impl": "hf_kernels_rotary", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B1_S128_H8_D128_R64", "batch": 1, "seqlen": 128, "num_heads": 8, "head_dim": 128, "rotary_dim": 64, "dtype": "float32", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.0912220000373054, "p50": 0.09200200003078862, "p90": 0.09276200000840618, "mean": 0.09224400001812683, "iqr": 0.0012400000173329317, "raw_times": [0.09152199999107324, 0.09276200000840618, 0.0912220000373054, 0.09200200003078862, 0.09371200002306068], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.09689300003401513, "peak_bytes": 6356992, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 1e-05, "atol": 1e-05, "absmax_q": 9.5367431640625e-07, "absmax_k": 9.5367431640625e-07, "mae_q": 1.5508486939097565e-08, "mae_k": 1.567566698668088e-08, "mse_q": 2.3630110116356316e-15, "mse_k": 2.416562128626943e-15, "ref": "rotary_torch"}, "err": null}
3
- {"ts": "2025-10-29T15:50:31Z", "run": "acca4aa63c524f09b2ae69a99c25a06c", "impl": "hf_kernels_rotary", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B1_S128_H32_D64_R32", "batch": 1, "seqlen": 128, "num_heads": 32, "head_dim": 64, "rotary_dim": 32, "dtype": "float32", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.08820200002901402, "p50": 0.09085200002800775, "p90": 0.0915720000307374, "mean": 0.09087420002060753, "iqr": 0.002170000016121776, "raw_times": [0.08820200002901402, 0.09434300000066287, 0.08940200001461562, 0.0915720000307374, 0.09085200002800775], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.0964319999638974, "peak_bytes": 12615680, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 1e-05, "atol": 1e-05, "absmax_q": 9.5367431640625e-07, "absmax_k": 9.5367431640625e-07, "mae_q": 1.5856898016863852e-08, "mae_k": 1.572981211950264e-08, "mse_q": 2.4771055025978386e-15, "mse_k": 2.4544071371937915e-15, "ref": "rotary_torch"}, "err": null}
4
- {"ts": "2025-10-29T15:50:31Z", "run": "acca4aa63c524f09b2ae69a99c25a06c", "impl": "hf_kernels_rotary", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B1_S128_H32_D128_R64", "batch": 1, "seqlen": 128, "num_heads": 32, "head_dim": 128, "rotary_dim": 64, "dtype": "float32", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.09069200001476929, "p50": 0.09134200001881254, "p90": 0.09142199996858835, "mean": 0.09263220000548245, "iqr": 0.0006699999630654929, "raw_times": [0.09069200001476929, 0.09075200000552286, 0.09142199996858835, 0.09895300001971918, 0.09134200001881254], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.09313199996086041, "peak_bytes": 25231360, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 1e-05, "atol": 1e-05, "absmax_q": 9.5367431640625e-07, "absmax_k": 9.5367431640625e-07, "mae_q": 1.5617658277733426e-08, "mae_k": 1.5788685914230882e-08, "mse_q": 2.4549424620164562e-15, "mse_k": 2.492823469483563e-15, "ref": "rotary_torch"}, "err": null}
5
- {"ts": "2025-10-29T15:50:31Z", "run": "acca4aa63c524f09b2ae69a99c25a06c", "impl": "hf_kernels_rotary", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B1_S512_H8_D64_R32", "batch": 1, "seqlen": 512, "num_heads": 8, "head_dim": 64, "rotary_dim": 32, "dtype": "float32", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.0885120000475581, "p50": 0.08998200001997247, "p90": 0.09122199998046199, "mean": 0.09028400000943293, "iqr": 0.0016600000094513234, "raw_times": [0.09122199998046199, 0.0885120000475581, 0.09214200002816142, 0.08998200001997247, 0.08956199997101066], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.1227330000119764, "peak_bytes": 12779520, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 1e-05, "atol": 1e-05, "absmax_q": 9.5367431640625e-07, "absmax_k": 9.5367431640625e-07, "mae_q": 1.5962712041073246e-08, "mae_k": 1.5743363945830424e-08, "mse_q": 2.534145124782417e-15, "mse_k": 2.451281585618423e-15, "ref": "rotary_torch"}, "err": null}
6
- {"ts": "2025-10-29T15:50:31Z", "run": "acca4aa63c524f09b2ae69a99c25a06c", "impl": "hf_kernels_rotary", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B1_S512_H8_D128_R64", "batch": 1, "seqlen": 512, "num_heads": 8, "head_dim": 128, "rotary_dim": 64, "dtype": "float32", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.08860200000526675, "p50": 0.09058200004119499, "p90": 0.09118299999499868, "mean": 0.09031840000943703, "iqr": 0.0011699999618031143, "raw_times": [0.08860200000526675, 0.09001300003319557, 0.09058200004119499, 0.09121199997252916, 0.09118299999499868], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.09078199997247793, "peak_bytes": 25427968, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 1e-05, "atol": 1e-05, "absmax_q": 9.5367431640625e-07, "absmax_k": 9.5367431640625e-07, "mae_q": 1.578730035589615e-08, "mae_k": 1.5859711766097462e-08, "mse_q": 2.440287521479536e-15, "mse_k": 2.477901290051784e-15, "ref": "rotary_torch"}, "err": null}
7
- {"ts": "2025-10-29T15:50:31Z", "run": "acca4aa63c524f09b2ae69a99c25a06c", "impl": "hf_kernels_rotary", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B1_S512_H32_D64_R32", "batch": 1, "seqlen": 512, "num_heads": 32, "head_dim": 64, "rotary_dim": 32, "dtype": "float32", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.08772200004614206, "p50": 0.09064199997510514, "p90": 0.09105200001613412, "mean": 0.08990000001176668, "iqr": 0.002190000031987438, "raw_times": [0.08772200004614206, 0.09064199997510514, 0.09105200001613412, 0.0912220000373054, 0.08886199998414668], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.09194199998319164, "peak_bytes": 50462720, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 1e-05, "atol": 1e-05, "absmax_q": 9.5367431640625e-07, "absmax_k": 9.5367431640625e-07, "mae_q": 1.5775295736375483e-08, "mae_k": 1.5847881229547056e-08, "mse_q": 2.471039476146077e-15, "mse_k": 2.472378635235686e-15, "ref": "rotary_torch"}, "err": null}
8
- {"ts": "2025-10-29T15:50:32Z", "run": "acca4aa63c524f09b2ae69a99c25a06c", "impl": "hf_kernels_rotary", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B1_S512_H32_D128_R64", "batch": 1, "seqlen": 512, "num_heads": 32, "head_dim": 128, "rotary_dim": 64, "dtype": "float32", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.08855200002244601, "p50": 0.08938199999874996, "p90": 0.0907319999896572, "mean": 0.0897739999913938, "iqr": 0.0015100000041456951, "raw_times": [0.0892219999855115, 0.0909819999606043, 0.0907319999896572, 0.08855200002244601, 0.08938199999874996], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.09457200002316313, "peak_bytes": 100925440, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 1e-05, "atol": 1e-05, "absmax_q": 9.5367431640625e-07, "absmax_k": 9.5367431640625e-07, "mae_q": 1.5959869870130206e-08, "mae_k": 1.588083975434529e-08, "mse_q": 2.510663677418633e-15, "mse_k": 2.502786271009168e-15, "ref": "rotary_torch"}, "err": null}
9
- {"ts": "2025-10-29T15:50:32Z", "run": "acca4aa63c524f09b2ae69a99c25a06c", "impl": "hf_kernels_rotary", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B1_S2048_H8_D64_R32", "batch": 1, "seqlen": 2048, "num_heads": 8, "head_dim": 64, "rotary_dim": 32, "dtype": "float32", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.08880199999339311, "p50": 0.08953200000405559, "p90": 0.08999199997106189, "mean": 0.08967999999640597, "iqr": 0.0006899999789311551, "raw_times": [0.08880199999339311, 0.08930199999213073, 0.08999199997106189, 0.09077200002138852, 0.08953200000405559], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.09282199999915974, "peak_bytes": 51118080, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 1e-05, "atol": 1e-05, "absmax_q": 9.5367431640625e-07, "absmax_k": 9.5367431640625e-07, "mae_q": 1.5894533689220225e-08, "mae_k": 1.5873395042831362e-08, "mse_q": 2.5093181655819197e-15, "mse_k": 2.488611809911578e-15, "ref": "rotary_torch"}, "err": null}
10
- {"ts": "2025-10-29T15:50:32Z", "run": "acca4aa63c524f09b2ae69a99c25a06c", "impl": "hf_kernels_rotary", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B1_S2048_H8_D128_R64", "batch": 1, "seqlen": 2048, "num_heads": 8, "head_dim": 128, "rotary_dim": 64, "dtype": "float32", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.08904199995640738, "p50": 0.09102199999233562, "p90": 0.09121199997252916, "mean": 0.0907579999761765, "iqr": 0.0006099999723119254, "raw_times": [0.08904199995640738, 0.09191199995939314, 0.09121199997252916, 0.09060200000021723, 0.09102199999233562], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.09379199997283649, "peak_bytes": 101711872, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 1e-05, "atol": 1e-05, "absmax_q": 9.5367431640625e-07, "absmax_k": 9.5367431640625e-07, "mae_q": 1.5936768349433805e-08, "mae_k": 1.5960043953100467e-08, "mse_q": 2.51039008577667e-15, "mse_k": 2.5111253103748867e-15, "ref": "rotary_torch"}, "err": null}
11
- {"ts": "2025-10-29T15:50:32Z", "run": "acca4aa63c524f09b2ae69a99c25a06c", "impl": "hf_kernels_rotary", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B1_S2048_H32_D64_R32", "batch": 1, "seqlen": 2048, "num_heads": 32, "head_dim": 64, "rotary_dim": 32, "dtype": "float32", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.09005199996181545, "p50": 0.09118200000557408, "p90": 0.0916120000056253, "mean": 0.09133820000215565, "iqr": 0.0005590000000665896, "raw_times": [0.09005199996181545, 0.09105300000555872, 0.09279200003220467, 0.0916120000056253, 0.09118200000557408], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.09626199999956953, "peak_bytes": 201850880, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 1e-05, "atol": 1e-05, "absmax_q": 1.9073486328125e-06, "absmax_k": 9.5367431640625e-07, "mae_q": 1.586510300910504e-08, "mae_k": 1.5813935050346117e-08, "mse_q": 2.499836478770355e-15, "mse_k": 2.4755639026338358e-15, "ref": "rotary_torch"}, "err": null}
12
- {"ts": "2025-10-29T15:50:32Z", "run": "acca4aa63c524f09b2ae69a99c25a06c", "impl": "hf_kernels_rotary", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B1_S2048_H32_D128_R64", "batch": 1, "seqlen": 2048, "num_heads": 32, "head_dim": 128, "rotary_dim": 64, "dtype": "float32", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.2600759999609181, "p50": 0.261636000004728, "p90": 0.2620960000285777, "mean": 0.26208780000160914, "iqr": 0.0012810000384888554, "raw_times": [0.2600759999609181, 0.261636000004728, 0.26581600002373307, 0.26081499999008884, 0.2620960000285777], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.263886000027469, "peak_bytes": 403701760, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 1e-05, "atol": 1e-05, "absmax_q": 9.5367431640625e-07, "absmax_k": 9.5367431640625e-07, "mae_q": 1.581049247079136e-08, "mae_k": 1.5861061797295406e-08, "mse_q": 2.4735094242202705e-15, "mse_k": 2.486832828964107e-15, "ref": "rotary_torch"}, "err": null}
13
- {"ts": "2025-10-29T15:50:32Z", "run": "acca4aa63c524f09b2ae69a99c25a06c", "impl": "hf_kernels_rotary", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B2_S128_H8_D64_R32", "batch": 2, "seqlen": 128, "num_heads": 8, "head_dim": 64, "rotary_dim": 32, "dtype": "float32", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.08898199996565381, "p50": 0.09088199999496283, "p90": 0.09099199996853713, "mean": 0.09348599999157159, "iqr": 0.001969999971151992, "raw_times": [0.08898199996565381, 0.09099199996853713, 0.10755200003131904, 0.09088199999496283, 0.08902199999738514], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.09600300001011419, "peak_bytes": 137396224, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 1e-05, "atol": 1e-05, "absmax_q": 9.5367431640625e-07, "absmax_k": 9.5367431640625e-07, "mae_q": 1.5824980437173508e-08, "mae_k": 1.5615324144846454e-08, "mse_q": 2.488090249374306e-15, "mse_k": 2.425079044911585e-15, "ref": "rotary_torch"}, "err": null}
14
- {"ts": "2025-10-29T15:50:32Z", "run": "acca4aa63c524f09b2ae69a99c25a06c", "impl": "hf_kernels_rotary", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B2_S128_H8_D128_R64", "batch": 2, "seqlen": 128, "num_heads": 8, "head_dim": 128, "rotary_dim": 64, "dtype": "float32", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.08880199999339311, "p50": 0.09035199997242671, "p90": 0.09093199997778356, "mean": 0.09011999998165265, "iqr": 0.0015400000279441883, "raw_times": [0.08939199994983937, 0.09093199997778356, 0.09035199997242671, 0.09112200001482051, 0.08880199999339311], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.09145199999238685, "peak_bytes": 12648448, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 1e-05, "atol": 1e-05, "absmax_q": 9.5367431640625e-07, "absmax_k": 9.5367431640625e-07, "mae_q": 1.5683587761827766e-08, "mae_k": 1.574532682013796e-08, "mse_q": 2.4310271220254415e-15, "mse_k": 2.4601385856313877e-15, "ref": "rotary_torch"}, "err": null}
15
- {"ts": "2025-10-29T15:50:32Z", "run": "acca4aa63c524f09b2ae69a99c25a06c", "impl": "hf_kernels_rotary", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B2_S128_H32_D64_R32", "batch": 2, "seqlen": 128, "num_heads": 32, "head_dim": 64, "rotary_dim": 32, "dtype": "float32", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.08985199997368909, "p50": 0.09101199998440279, "p90": 0.09125200000426048, "mean": 0.09087419999787016, "iqr": 0.0002900000026784255, "raw_times": [0.08985199997368909, 0.09096200000158206, 0.0912930000254164, 0.09125200000426048, 0.09101199998440279], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.09303199999521894, "peak_bytes": 25198592, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 1e-05, "atol": 1e-05, "absmax_q": 9.5367431640625e-07, "absmax_k": 9.5367431640625e-07, "mae_q": 1.5835009747888762e-08, "mae_k": 1.572560215379326e-08, "mse_q": 2.478222950813504e-15, "mse_k": 2.4541699679685603e-15, "ref": "rotary_torch"}, "err": null}
16
- {"ts": "2025-10-29T15:50:32Z", "run": "acca4aa63c524f09b2ae69a99c25a06c", "impl": "hf_kernels_rotary", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B2_S128_H32_D128_R64", "batch": 2, "seqlen": 128, "num_heads": 32, "head_dim": 128, "rotary_dim": 64, "dtype": "float32", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.08871200003568447, "p50": 0.0907719999645451, "p90": 0.09140200000956611, "mean": 0.09065600000894847, "iqr": 0.001259999976355175, "raw_times": [0.08871200003568447, 0.09225200000173572, 0.09014200003321093, 0.0907719999645451, 0.09140200000956611], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.09131100000558945, "peak_bytes": 50397184, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 1e-05, "atol": 1e-05, "absmax_q": 9.5367431640625e-07, "absmax_k": 9.5367431640625e-07, "mae_q": 1.5876850056883995e-08, "mae_k": 1.5927410501603845e-08, "mse_q": 2.504224532953606e-15, "mse_k": 2.503892919554756e-15, "ref": "rotary_torch"}, "err": null}
17
- {"ts": "2025-10-29T15:50:32Z", "run": "acca4aa63c524f09b2ae69a99c25a06c", "impl": "hf_kernels_rotary", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B2_S512_H8_D64_R32", "batch": 2, "seqlen": 512, "num_heads": 8, "head_dim": 64, "rotary_dim": 32, "dtype": "float32", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.08793200004220125, "p50": 0.0902419999988524, "p90": 0.09114200003068618, "mean": 0.09024000002000321, "iqr": 0.001160000010713702, "raw_times": [0.08793200004220125, 0.08998200001997247, 0.0902419999988524, 0.09114200003068618, 0.09190200000830373], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.09403199999269418, "peak_bytes": 25362432, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 1e-05, "atol": 1e-05, "absmax_q": 9.5367431640625e-07, "absmax_k": 9.5367431640625e-07, "mae_q": 1.5820052823301012e-08, "mae_k": 1.580205122309053e-08, "mse_q": 2.4876468276264184e-15, "mse_k": 2.4866062476507165e-15, "ref": "rotary_torch"}, "err": null}
18
- {"ts": "2025-10-29T15:50:32Z", "run": "acca4aa63c524f09b2ae69a99c25a06c", "impl": "hf_kernels_rotary", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B2_S512_H8_D128_R64", "batch": 2, "seqlen": 512, "num_heads": 8, "head_dim": 128, "rotary_dim": 64, "dtype": "float32", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.08730199999718025, "p50": 0.0906619999909708, "p90": 0.09115200003861901, "mean": 0.08998400001019036, "iqr": 0.0016399999935856613, "raw_times": [0.08730199999718025, 0.09115200003861901, 0.09129199997914839, 0.08951200004503335, 0.0906619999909708], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.09093099998835896, "peak_bytes": 50593792, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 1e-05, "atol": 1e-05, "absmax_q": 9.5367431640625e-07, "absmax_k": 9.5367431640625e-07, "mae_q": 1.5823172105911e-08, "mae_k": 1.582038855474366e-08, "mse_q": 2.464257071579175e-15, "mse_k": 2.4775099608301526e-15, "ref": "rotary_torch"}, "err": null}
19
- {"ts": "2025-10-29T15:50:32Z", "run": "acca4aa63c524f09b2ae69a99c25a06c", "impl": "hf_kernels_rotary", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B2_S512_H32_D64_R32", "batch": 2, "seqlen": 512, "num_heads": 32, "head_dim": 64, "rotary_dim": 32, "dtype": "float32", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.08923199999344433, "p50": 0.09018200000809884, "p90": 0.09221200002684782, "mean": 0.09105200000476543, "iqr": 0.0028300000280978566, "raw_times": [0.08923199999344433, 0.09221200002684782, 0.09018200000809884, 0.08938199999874996, 0.09425199999668621], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.09410199999138058, "peak_bytes": 100794368, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 1e-05, "atol": 1e-05, "absmax_q": 9.5367431640625e-07, "absmax_k": 9.5367431640625e-07, "mae_q": 1.5888783622131086e-08, "mae_k": 1.5861886026868888e-08, "mse_q": 2.4766798685418433e-15, "mse_k": 2.475923891636419e-15, "ref": "rotary_torch"}, "err": null}
20
- {"ts": "2025-10-29T15:50:32Z", "run": "acca4aa63c524f09b2ae69a99c25a06c", "impl": "hf_kernels_rotary", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B2_S512_H32_D128_R64", "batch": 2, "seqlen": 512, "num_heads": 32, "head_dim": 128, "rotary_dim": 64, "dtype": "float32", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.08850200003962527, "p50": 0.0899920000279053, "p90": 0.09176200001093093, "mean": 0.09526220001134789, "iqr": 0.002740000013545796, "raw_times": [0.08850200003962527, 0.0899920000279053, 0.11703299998089278, 0.08902199999738514, 0.09176200001093093], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.09607300000880059, "peak_bytes": 201588736, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 1e-05, "atol": 1e-05, "absmax_q": 9.5367431640625e-07, "absmax_k": 9.5367431640625e-07, "mae_q": 1.5826390864503992e-08, "mae_k": 1.5792682717119533e-08, "mse_q": 2.480465258783123e-15, "mse_k": 2.475580631534544e-15, "ref": "rotary_torch"}, "err": null}
21
- {"ts": "2025-10-29T15:50:32Z", "run": "acca4aa63c524f09b2ae69a99c25a06c", "impl": "hf_kernels_rotary", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B2_S2048_H8_D64_R32", "batch": 2, "seqlen": 2048, "num_heads": 8, "head_dim": 64, "rotary_dim": 32, "dtype": "float32", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.0902020000239645, "p50": 0.09163200002149097, "p90": 0.09188199999243807, "mean": 0.09142600000586754, "iqr": 0.0006299999881775875, "raw_times": [0.09163200002149097, 0.09216199998718366, 0.09188199999243807, 0.09125200000426048, 0.0902020000239645], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.09537199997566859, "peak_bytes": 101449728, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 1e-05, "atol": 1e-05, "absmax_q": 9.5367431640625e-07, "absmax_k": 9.5367431640625e-07, "mae_q": 1.592899323554775e-08, "mae_k": 1.5925031959795888e-08, "mse_q": 2.50783882253954e-15, "mse_k": 2.5015648494992274e-15, "ref": "rotary_torch"}, "err": null}
22
- {"ts": "2025-10-29T15:50:32Z", "run": "acca4aa63c524f09b2ae69a99c25a06c", "impl": "hf_kernels_rotary", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B2_S2048_H8_D128_R64", "batch": 2, "seqlen": 2048, "num_heads": 8, "head_dim": 128, "rotary_dim": 64, "dtype": "float32", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.08815199998934986, "p50": 0.08920199996964584, "p90": 0.0900620000265917, "mean": 0.08925999999291889, "iqr": 0.001270000041131425, "raw_times": [0.08815199998934986, 0.09009199999354678, 0.0900620000265917, 0.08920199996964584, 0.08879199998546028], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.09250199997268282, "peak_bytes": 202375168, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 1e-05, "atol": 1e-05, "absmax_q": 9.5367431640625e-07, "absmax_k": 9.5367431640625e-07, "mae_q": 1.590209919299923e-08, "mae_k": 1.590130160877834e-08, "mse_q": 2.4971026799330918e-15, "mse_k": 2.506967649153289e-15, "ref": "rotary_torch"}, "err": null}
23
- {"ts": "2025-10-29T15:50:32Z", "run": "acca4aa63c524f09b2ae69a99c25a06c", "impl": "hf_kernels_rotary", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B2_S2048_H32_D64_R32", "batch": 2, "seqlen": 2048, "num_heads": 32, "head_dim": 64, "rotary_dim": 32, "dtype": "float32", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.26207600001271203, "p50": 0.263255999982448, "p90": 0.2654460000144354, "mean": 0.26436599999897226, "iqr": 0.0022400000148081745, "raw_times": [0.26207600001271203, 0.263255999982448, 0.2678459999856386, 0.26320599999962724, 0.2654460000144354], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.25824599998713893, "peak_bytes": 403177472, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 1e-05, "atol": 1e-05, "absmax_q": 9.5367431640625e-07, "absmax_k": 9.5367431640625e-07, "mae_q": 1.5847520629108658e-08, "mae_k": 1.5862454461057496e-08, "mse_q": 2.4917348203881045e-15, "mse_k": 2.491306009958557e-15, "ref": "rotary_torch"}, "err": null}
24
- {"ts": "2025-10-29T15:50:32Z", "run": "acca4aa63c524f09b2ae69a99c25a06c", "impl": "hf_kernels_rotary", "tags": {"family": "hf-kernels", "backend": "cuda"}, "wl": {"name": "cuda_B2_S2048_H32_D128_R64", "batch": 2, "seqlen": 2048, "num_heads": 32, "head_dim": 128, "rotary_dim": 64, "dtype": "float32", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.8428699999853961, "p50": 0.8440990000053716, "p90": 0.8457790000306886, "mean": 0.8458453999992344, "iqr": 0.0025290000280620006, "raw_times": [0.8428699999853961, 0.8532289999720888, 0.8432500000026266, 0.8440990000053716, 0.8457790000306886], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.8568399999830945, "peak_bytes": 806354944, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 1e-05, "atol": 1e-05, "absmax_q": 9.5367431640625e-07, "absmax_k": 9.5367431640625e-07, "mae_q": 1.585225106737198e-08, "mae_k": 1.581303976649906e-08, "mse_q": 2.4866460581992374e-15, "mse_k": 2.4721545950211372e-15, "ref": "rotary_torch"}, "err": null}
 
1
+ {"ts": "2025-10-30T15:53:24Z", "run": "2249f950b26b464fbf028ad8f9536606", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B1_S128_H8_D64_R32", "batch": 1, "seqlen": 128, "num_heads": 8, "head_dim": 64, "rotary_dim": 32, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.17100299999128765, "p50": 0.1746739999930469, "p90": 0.1748229999520845, "mean": 0.17718919998515048, "iqr": 0.0008499999921696144, "raw_times": [0.1739729999599149, 0.19147300002941847, 0.17100299999128765, 0.1748229999520845, 0.1746739999930469], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.1834729999927731, "peak_bytes": 1720320, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax_q": 0.0, "absmax_k": 0.0, "mae_q": 0.0, "mae_k": 0.0, "mse_q": 0.0, "mse_k": 0.0, "ref": "rotary_torch"}, "err": null}
2
+ {"ts": "2025-10-30T15:53:24Z", "run": "2249f950b26b464fbf028ad8f9536606", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B1_S128_H8_D128_R64", "batch": 1, "seqlen": 128, "num_heads": 8, "head_dim": 128, "rotary_dim": 64, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.2229240000133359, "p50": 0.22586399995816464, "p90": 0.2263739999648351, "mean": 0.2256739999893398, "iqr": 0.0011099999710495467, "raw_times": [0.2229240000133359, 0.22586399995816464, 0.2263739999648351, 0.22526399999378555, 0.22794400001657777], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.22923400001673144, "peak_bytes": 3440640, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax_q": 0.0, "absmax_k": 0.0, "mae_q": 0.0, "mae_k": 0.0, "mse_q": 0.0, "mse_k": 0.0, "ref": "rotary_torch"}, "err": null}
3
+ {"ts": "2025-10-30T15:53:24Z", "run": "2249f950b26b464fbf028ad8f9536606", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B1_S128_H32_D64_R32", "batch": 1, "seqlen": 128, "num_heads": 32, "head_dim": 64, "rotary_dim": 32, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.22077400001307979, "p50": 0.2269739999860576, "p90": 0.2270040000098561, "mean": 0.2274739999961639, "iqr": 0.0016900000332498166, "raw_times": [0.22531399997660628, 0.2269739999860576, 0.23730399999521978, 0.22077400001307979, 0.2270040000098561], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.23222400000122434, "peak_bytes": 6832128, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax_q": 0.0, "absmax_k": 0.0, "mae_q": 0.0, "mae_k": 0.0, "mse_q": 0.0, "mse_k": 0.0, "ref": "rotary_torch"}, "err": null}
4
+ {"ts": "2025-10-30T15:53:24Z", "run": "2249f950b26b464fbf028ad8f9536606", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B1_S128_H32_D128_R64", "batch": 1, "seqlen": 128, "num_heads": 32, "head_dim": 128, "rotary_dim": 64, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.21741400001928923, "p50": 0.2200139999786188, "p90": 0.22255300001461364, "mean": 0.22600780001766907, "iqr": 0.0031789999752618314, "raw_times": [0.2200139999786188, 0.21741400001928923, 0.22255300001461364, 0.2193740000393518, 0.25068400003647184], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.22356400000944632, "peak_bytes": 13664256, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax_q": 0.0, "absmax_k": 0.0, "mae_q": 0.0, "mae_k": 0.0, "mse_q": 0.0, "mse_k": 0.0, "ref": "rotary_torch"}, "err": null}
5
+ {"ts": "2025-10-30T15:53:24Z", "run": "2249f950b26b464fbf028ad8f9536606", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B1_S512_H8_D64_R32", "batch": 1, "seqlen": 512, "num_heads": 8, "head_dim": 64, "rotary_dim": 32, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.22311399999352943, "p50": 0.22467400003733928, "p90": 0.22555399999646397, "mean": 0.22520960002339052, "iqr": 0.0019609999526437605, "raw_times": [0.22555399999646397, 0.22467400003733928, 0.2291130000457997, 0.22311399999352943, 0.2235930000438202], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.23042399999440022, "peak_bytes": 6881280, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax_q": 0.0, "absmax_k": 0.0, "mae_q": 0.0, "mae_k": 0.0, "mse_q": 0.0, "mse_k": 0.0, "ref": "rotary_torch"}, "err": null}
6
+ {"ts": "2025-10-30T15:53:24Z", "run": "2249f950b26b464fbf028ad8f9536606", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B1_S512_H8_D128_R64", "batch": 1, "seqlen": 512, "num_heads": 8, "head_dim": 128, "rotary_dim": 64, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.21832400000221241, "p50": 0.21977400001560454, "p90": 0.22210299999869676, "mean": 0.22257580001223687, "iqr": 0.002768999991076271, "raw_times": [0.21832400000221241, 0.22210299999869676, 0.23334400003705014, 0.2193340000076205, 0.21977400001560454], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.23037299996531146, "peak_bytes": 13762560, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax_q": 0.0, "absmax_k": 0.0, "mae_q": 0.0, "mae_k": 0.0, "mse_q": 0.0, "mse_k": 0.0, "ref": "rotary_torch"}, "err": null}
7
+ {"ts": "2025-10-30T15:53:24Z", "run": "2249f950b26b464fbf028ad8f9536606", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B1_S512_H32_D64_R32", "batch": 1, "seqlen": 512, "num_heads": 32, "head_dim": 64, "rotary_dim": 32, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.21834399996123466, "p50": 0.22027399995749875, "p90": 0.22137399997745888, "mean": 0.22062599997525467, "iqr": 0.00113999999484804, "raw_times": [0.22290399999747024, 0.22027399995749875, 0.22137399997745888, 0.22023399998261084, 0.21834399996123466], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.22569399999383677, "peak_bytes": 27328512, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax_q": 0.0, "absmax_k": 0.0, "mae_q": 0.0, "mae_k": 0.0, "mse_q": 0.0, "mse_k": 0.0, "ref": "rotary_torch"}, "err": null}
8
+ {"ts": "2025-10-30T15:53:24Z", "run": "2249f950b26b464fbf028ad8f9536606", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B1_S512_H32_D128_R64", "batch": 1, "seqlen": 512, "num_heads": 32, "head_dim": 128, "rotary_dim": 64, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.22165399997220447, "p50": 0.22276400000009744, "p90": 0.2233839999803422, "mean": 0.22286399999984496, "iqr": 0.0009499999578110874, "raw_times": [0.2224340000225311, 0.22165399997220447, 0.2233839999803422, 0.22276400000009744, 0.2240840000240496], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.2297839999982898, "peak_bytes": 54657024, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax_q": 0.0, "absmax_k": 0.0, "mae_q": 0.0, "mae_k": 0.0, "mse_q": 0.0, "mse_k": 0.0, "ref": "rotary_torch"}, "err": null}
9
+ {"ts": "2025-10-30T15:53:24Z", "run": "2249f950b26b464fbf028ad8f9536606", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B1_S2048_H8_D64_R32", "batch": 1, "seqlen": 2048, "num_heads": 8, "head_dim": 64, "rotary_dim": 32, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.22094399997740766, "p50": 0.22392400001081114, "p90": 0.226194999981999, "mean": 0.22451620000083494, "iqr": 0.003770999967400712, "raw_times": [0.22094399997740766, 0.22392400001081114, 0.22909400001935865, 0.226194999981999, 0.22242400001459828], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.22784399999409288, "peak_bytes": 27525120, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax_q": 0.0, "absmax_k": 0.0, "mae_q": 0.0, "mae_k": 0.0, "mse_q": 0.0, "mse_k": 0.0, "ref": "rotary_torch"}, "err": null}
10
+ {"ts": "2025-10-30T15:53:24Z", "run": "2249f950b26b464fbf028ad8f9536606", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B1_S2048_H8_D128_R64", "batch": 1, "seqlen": 2048, "num_heads": 8, "head_dim": 128, "rotary_dim": 64, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.22157400002242866, "p50": 0.22411399999100468, "p90": 0.22636400001374568, "mean": 0.22692980001011165, "iqr": 0.0029010000162088545, "raw_times": [0.22346299999753683, 0.22636400001374568, 0.2391340000258424, 0.22157400002242866, 0.22411399999100468], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.22614400000975365, "peak_bytes": 55050240, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax_q": 0.0, "absmax_k": 0.0, "mae_q": 0.0, "mae_k": 0.0, "mse_q": 0.0, "mse_k": 0.0, "ref": "rotary_torch"}, "err": null}
11
+ {"ts": "2025-10-30T15:53:24Z", "run": "2249f950b26b464fbf028ad8f9536606", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B1_S2048_H32_D64_R32", "batch": 1, "seqlen": 2048, "num_heads": 32, "head_dim": 64, "rotary_dim": 32, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.22298400000408947, "p50": 0.2238440000041919, "p90": 0.225143999955435, "mean": 0.22477019999769254, "iqr": 0.0013799999578623101, "raw_times": [0.22376399999757268, 0.22298400000408947, 0.22811500002717366, 0.225143999955435, 0.2238440000041919], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.22483399999373432, "peak_bytes": 109314048, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax_q": 0.0, "absmax_k": 0.0, "mae_q": 0.0, "mae_k": 0.0, "mse_q": 0.0, "mse_k": 0.0, "ref": "rotary_torch"}, "err": null}
12
+ {"ts": "2025-10-30T15:53:24Z", "run": "2249f950b26b464fbf028ad8f9536606", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B1_S2048_H32_D128_R64", "batch": 1, "seqlen": 2048, "num_heads": 32, "head_dim": 128, "rotary_dim": 64, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.22621400000844005, "p50": 0.22858399995584477, "p90": 0.22970399999167057, "mean": 0.22850999999945998, "iqr": 0.003459999959432025, "raw_times": [0.22624400003223855, 0.22858399995584477, 0.22621400000844005, 0.23180400000910595, 0.22970399999167057], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.22907400000349298, "peak_bytes": 218628096, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax_q": 0.0, "absmax_k": 0.0, "mae_q": 0.0, "mae_k": 0.0, "mse_q": 0.0, "mse_k": 0.0, "ref": "rotary_torch"}, "err": null}
13
+ {"ts": "2025-10-30T15:53:24Z", "run": "2249f950b26b464fbf028ad8f9536606", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B2_S128_H8_D64_R32", "batch": 2, "seqlen": 128, "num_heads": 8, "head_dim": 64, "rotary_dim": 32, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.22101400003293747, "p50": 0.224504000016168, "p90": 0.22463400000560796, "mean": 0.22994020000624005, "iqr": 0.0010800000040944724, "raw_times": [0.22101400003293747, 0.22463400000560796, 0.2559949999749733, 0.224504000016168, 0.2235540000015135], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.2261639999687759, "peak_bytes": 68698112, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax_q": 0.0, "absmax_k": 0.0, "mae_q": 0.0, "mae_k": 0.0, "mse_q": 0.0, "mse_k": 0.0, "ref": "rotary_torch"}, "err": null}
14
+ {"ts": "2025-10-30T15:53:24Z", "run": "2249f950b26b464fbf028ad8f9536606", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B2_S128_H8_D128_R64", "batch": 2, "seqlen": 128, "num_heads": 8, "head_dim": 128, "rotary_dim": 64, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.22005400001035014, "p50": 0.22374300004912584, "p90": 0.22502399997392786, "mean": 0.2236157999959687, "iqr": 0.0018200000226897828, "raw_times": [0.22374300004912584, 0.2260539999952016, 0.22320399995123807, 0.22502399997392786, 0.22005400001035014], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.2302039999904082, "peak_bytes": 6848512, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax_q": 0.0, "absmax_k": 0.0, "mae_q": 0.0, "mae_k": 0.0, "mse_q": 0.0, "mse_k": 0.0, "ref": "rotary_torch"}, "err": null}
15
+ {"ts": "2025-10-30T15:53:24Z", "run": "2249f950b26b464fbf028ad8f9536606", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B2_S128_H32_D64_R32", "batch": 2, "seqlen": 128, "num_heads": 32, "head_dim": 64, "rotary_dim": 32, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.22128399996290682, "p50": 0.22392400001081114, "p90": 0.22476399999504793, "mean": 0.22437599998283986, "iqr": 0.0009500000146545062, "raw_times": [0.22381399998039342, 0.22809399996503998, 0.22476399999504793, 0.22392400001081114, 0.22128399996290682], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.23023399995736327, "peak_bytes": 13647872, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax_q": 0.0, "absmax_k": 0.0, "mae_q": 0.0, "mae_k": 0.0, "mse_q": 0.0, "mse_k": 0.0, "ref": "rotary_torch"}, "err": null}
16
+ {"ts": "2025-10-30T15:53:24Z", "run": "2249f950b26b464fbf028ad8f9536606", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B2_S128_H32_D128_R64", "batch": 2, "seqlen": 128, "num_heads": 32, "head_dim": 128, "rotary_dim": 64, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.21981399999049245, "p50": 0.22491400000035355, "p90": 0.2271139999834304, "mean": 0.2256657999851086, "iqr": 0.0057999999967250915, "raw_times": [0.2213139999867053, 0.2351729999645613, 0.21981399999049245, 0.22491400000035355, 0.2271139999834304], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.22896399997307526, "peak_bytes": 27295744, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax_q": 0.0, "absmax_k": 0.0, "mae_q": 0.0, "mae_k": 0.0, "mse_q": 0.0, "mse_k": 0.0, "ref": "rotary_torch"}, "err": null}
17
+ {"ts": "2025-10-30T15:53:24Z", "run": "2249f950b26b464fbf028ad8f9536606", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B2_S512_H8_D64_R32", "batch": 2, "seqlen": 512, "num_heads": 8, "head_dim": 64, "rotary_dim": 32, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.2212340000369295, "p50": 0.22300300003053053, "p90": 0.22370400000681911, "mean": 0.2228398000170273, "iqr": 0.0018700000055105193, "raw_times": [0.22300300003053053, 0.22370400000681911, 0.22442400000954876, 0.2212340000369295, 0.2218340000013086], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.24375499998541272, "peak_bytes": 13697024, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax_q": 0.0, "absmax_k": 0.0, "mae_q": 0.0, "mae_k": 0.0, "mse_q": 0.0, "mse_k": 0.0, "ref": "rotary_torch"}, "err": null}
18
+ {"ts": "2025-10-30T15:53:24Z", "run": "2249f950b26b464fbf028ad8f9536606", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B2_S512_H8_D128_R64", "batch": 2, "seqlen": 512, "num_heads": 8, "head_dim": 128, "rotary_dim": 64, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.21925400000100126, "p50": 0.22213400001191985, "p90": 0.2221839999947406, "mean": 0.22427599999446102, "iqr": 0.0003700000092976552, "raw_times": [0.22181399998544293, 0.23599399997920045, 0.21925400000100126, 0.22213400001191985, 0.2221839999947406], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.255094999999983, "peak_bytes": 27394048, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax_q": 0.0, "absmax_k": 0.0, "mae_q": 0.0, "mae_k": 0.0, "mse_q": 0.0, "mse_k": 0.0, "ref": "rotary_torch"}, "err": null}
19
+ {"ts": "2025-10-30T15:53:24Z", "run": "2249f950b26b464fbf028ad8f9536606", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B2_S512_H32_D64_R32", "batch": 2, "seqlen": 512, "num_heads": 32, "head_dim": 64, "rotary_dim": 32, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.22207399996432287, "p50": 0.22611399998595516, "p90": 0.22614400000975365, "mean": 0.22540399997978966, "iqr": 0.0004800000397153781, "raw_times": [0.22611399998595516, 0.22207399996432287, 0.22702399996887834, 0.22614400000975365, 0.22566399997003828], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.24224399999184243, "peak_bytes": 54591488, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax_q": 0.0, "absmax_k": 0.0, "mae_q": 0.0, "mae_k": 0.0, "mse_q": 0.0, "mse_k": 0.0, "ref": "rotary_torch"}, "err": null}
20
+ {"ts": "2025-10-30T15:53:25Z", "run": "2249f950b26b464fbf028ad8f9536606", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B2_S512_H32_D128_R64", "batch": 2, "seqlen": 512, "num_heads": 32, "head_dim": 128, "rotary_dim": 64, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.21955500000103711, "p50": 0.2238039999724606, "p90": 0.22417399998175824, "mean": 0.229038399993442, "iqr": 0.0011799999697359453, "raw_times": [0.2238039999724606, 0.22417399998175824, 0.25466499999993175, 0.2229940000120223, 0.21955500000103711], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.23440400002527895, "peak_bytes": 109182976, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax_q": 0.0, "absmax_k": 0.0, "mae_q": 0.0, "mae_k": 0.0, "mse_q": 0.0, "mse_k": 0.0, "ref": "rotary_torch"}, "err": null}
21
+ {"ts": "2025-10-30T15:53:25Z", "run": "2249f950b26b464fbf028ad8f9536606", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B2_S2048_H8_D64_R32", "batch": 2, "seqlen": 2048, "num_heads": 8, "head_dim": 64, "rotary_dim": 32, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.2215840000303615, "p50": 0.22219400000267342, "p90": 0.22536399995942702, "mean": 0.22351999999727923, "iqr": 0.0037099999303791265, "raw_times": [0.2215840000303615, 0.22219400000267342, 0.22680399996488632, 0.22536399995942702, 0.2216540000290479], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.22727300000724426, "peak_bytes": 54788096, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax_q": 0.0, "absmax_k": 0.0, "mae_q": 0.0, "mae_k": 0.0, "mse_q": 0.0, "mse_k": 0.0, "ref": "rotary_torch"}, "err": null}
22
+ {"ts": "2025-10-30T15:53:25Z", "run": "2249f950b26b464fbf028ad8f9536606", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B2_S2048_H8_D128_R64", "batch": 2, "seqlen": 2048, "num_heads": 8, "head_dim": 128, "rotary_dim": 64, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.22125399999595174, "p50": 0.22540399999115834, "p90": 0.23793399998339737, "mean": 0.23205199998983517, "iqr": 0.012690000005477486, "raw_times": [0.2504240000007485, 0.22524399997791988, 0.22125399999595174, 0.23793399998339737, 0.22540399999115834], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.22909400001935865, "peak_bytes": 109576192, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax_q": 0.0, "absmax_k": 0.0, "mae_q": 0.0, "mae_k": 0.0, "mse_q": 0.0, "mse_k": 0.0, "ref": "rotary_torch"}, "err": null}
23
+ {"ts": "2025-10-30T15:53:25Z", "run": "2249f950b26b464fbf028ad8f9536606", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B2_S2048_H32_D64_R32", "batch": 2, "seqlen": 2048, "num_heads": 32, "head_dim": 64, "rotary_dim": 32, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.2288640000074338, "p50": 0.2294729999903211, "p90": 0.22959400001809627, "mean": 0.2293698000016775, "iqr": 0.0005100000066704524, "raw_times": [0.22959400001809627, 0.2294729999903211, 0.22983399998111054, 0.2288640000074338, 0.22908400001142581], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.22990399997979694, "peak_bytes": 218365952, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax_q": 0.0, "absmax_k": 0.0, "mae_q": 0.0, "mae_k": 0.0, "mse_q": 0.0, "mse_k": 0.0, "ref": "rotary_torch"}, "err": null}
24
+ {"ts": "2025-10-30T15:53:25Z", "run": "2249f950b26b464fbf028ad8f9536606", "impl": "torch_eager", "tags": {"family": "pytorch", "backend": "eager"}, "wl": {"name": "cuda_B2_S2048_H32_D128_R64", "batch": 2, "seqlen": 2048, "num_heads": 32, "head_dim": 128, "rotary_dim": 64, "dtype": "bfloat16", "device": "cuda", "seed": 0}, "env": {"torch": "2.8.0+cu128", "cuda": "12.8", "gpu": "NVIDIA L40S", "sm": "8.9", "py": "3.11.14", "plat": "Linux-5.10.244-240.970.amzn2.x86_64-x86_64-with-glibc2.35"}, "lat_ms": {"p10": 0.6347010000240516, "p50": 0.6367309999859572, "p90": 0.6407210000247687, "mean": 0.6405370000038602, "iqr": 0.004560000036235579, "raw_times": [0.6543709999959901, 0.6347010000240516, 0.6407210000247687, 0.6367309999859572, 0.6361609999885331], "has_warnings": false, "reps": 5, "warmup": 2}, "compile_ms": 0.6394609999915701, "peak_bytes": 436731904, "ok": true, "absmax": null, "corr": {"ok": true, "rtol": 0.003, "atol": 0.005, "absmax_q": 0.0, "absmax_k": 0.0, "mae_q": 0.0, "mae_k": 0.0, "mse_q": 0.0, "mse_k": 0.0, "ref": "rotary_torch"}, "err": null}
rotary/impls/cells/benchmark.py CHANGED
@@ -4,7 +4,6 @@
4
  # "numpy",
5
  # "torch==2.8.0",
6
  # "kernels-benchmark-tools",
7
- # "kernels",
8
  # ]
9
  #
10
  # [tool.uv.sources]
@@ -13,36 +12,46 @@
13
  import torch
14
  import sys
15
  from kernels_benchmark_tools import KernelTypeEnum, run_benchmark
16
- from kernels import get_kernel
17
 
18
- # Load the rotary kernel
19
- rotary = get_kernel("kernels-community/rotary")
20
 
 
 
 
 
 
 
 
 
 
21
 
22
- def hf_kernels_rotary(query, key, cos, sin, conj=False):
 
23
  rotary_dim = cos.shape[-1]
24
 
25
- # Clone to avoid modifying inputs
26
  q_out = query.clone()
27
  k_out = key.clone()
28
 
29
  # Apply rotation to query
30
  q1 = q_out[..., :rotary_dim]
31
  q2 = q_out[..., rotary_dim : 2 * rotary_dim]
32
- rotary.apply_rotary(q1, q2, cos, sin, q1, q2, conj)
 
 
33
 
34
  # Apply rotation to key
35
  k1 = k_out[..., :rotary_dim]
36
  k2 = k_out[..., rotary_dim : 2 * rotary_dim]
37
- rotary.apply_rotary(k1, k2, cos, sin, k1, k2, conj)
 
 
38
 
39
  return q_out, k_out
40
 
41
 
42
  run_benchmark(
43
  kernel_type=KernelTypeEnum.ROTARY,
44
- impl_name="hf_kernels_rotary",
45
- impl_tags={"family": "hf-kernels", "backend": "cuda"},
46
- impl_func=hf_kernels_rotary,
47
- dtype="float32",
48
  )
 
4
  # "numpy",
5
  # "torch==2.8.0",
6
  # "kernels-benchmark-tools",
 
7
  # ]
8
  #
9
  # [tool.uv.sources]
 
12
  import torch
13
  import sys
14
  from kernels_benchmark_tools import KernelTypeEnum, run_benchmark
 
15
 
 
 
16
 
17
+ def apply_rotary_torch(x1, x2, cos, sin, conj=False):
18
+ """Reference rotary implementation."""
19
+ if not conj:
20
+ out1 = x1 * cos - x2 * sin
21
+ out2 = x1 * sin + x2 * cos
22
+ else:
23
+ out1 = x1 * cos + x2 * sin
24
+ out2 = -x1 * sin + x2 * cos
25
+ return out1, out2
26
 
27
+
28
+ def torch_rotary(query, key, cos, sin, conj=False):
29
  rotary_dim = cos.shape[-1]
30
 
31
+ # Clone inputs to avoid modifying them
32
  q_out = query.clone()
33
  k_out = key.clone()
34
 
35
  # Apply rotation to query
36
  q1 = q_out[..., :rotary_dim]
37
  q2 = q_out[..., rotary_dim : 2 * rotary_dim]
38
+ q_out_1, q_out_2 = apply_rotary_torch(q1, q2, cos, sin, conj)
39
+ q_out[..., :rotary_dim] = q_out_1
40
+ q_out[..., rotary_dim : 2 * rotary_dim] = q_out_2
41
 
42
  # Apply rotation to key
43
  k1 = k_out[..., :rotary_dim]
44
  k2 = k_out[..., rotary_dim : 2 * rotary_dim]
45
+ k_out_1, k_out_2 = apply_rotary_torch(k1, k2, cos, sin, conj)
46
+ k_out[..., :rotary_dim] = k_out_1
47
+ k_out[..., rotary_dim : 2 * rotary_dim] = k_out_2
48
 
49
  return q_out, k_out
50
 
51
 
52
  run_benchmark(
53
  kernel_type=KernelTypeEnum.ROTARY,
54
+ impl_name="torch_eager",
55
+ impl_tags={"family": "pytorch", "backend": "eager"},
56
+ impl_func=torch_rotary,
 
57
  )
rotary/impls/hf_kernels_rotary.html CHANGED
The diff for this file is too large to render. See raw diff
 
rotary/impls/torch_rotary.html CHANGED
The diff for this file is too large to render. See raw diff
 
rotary/index.html CHANGED
@@ -4,6 +4,11 @@
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>index</title>
 
 
 
 
 
7
  <script>
8
  // Iframe-friendly navigation router
9
  (function() {
@@ -87,1320 +92,1542 @@
87
  </script>
88
  <style>
89
  :root[data-theme="light"] {
90
- --bg-primary: #ffffff;
91
- --bg-secondary: #f6f8fa;
92
- --bg-tertiary: #f8f9fa;
93
- --bg-code: #f8f9fa;
94
- --bg-error: #fdf2f2;
95
- --bg-artifact: #e6f3ff;
96
- --bg-artifact-hover: #d0e7ff;
97
-
98
- --text-primary: #333;
99
- --text-secondary: #656d76;
100
- --text-error: #c53030;
101
- --text-link: #0969da;
102
-
103
- --border-primary: #e1e5e9;
104
- --border-error: #e53e3e;
105
- --border-cell-failed: #d73a49;
106
-
107
- --shadow: rgba(0, 0, 0, 0.1);
108
- }
109
-
110
- :root[data-theme="dark"] {
111
- --bg-primary: #0a0a0a;
112
- --bg-secondary: #121212;
113
- --bg-tertiary: #181818;
114
- --bg-code: #0d0d0d;
115
- --bg-error: #1a0f0f;
116
- --bg-artifact: #151515;
117
- --bg-artifact-hover: #1a1a1a;
118
-
119
- --text-primary: #e0e0e0;
120
- --text-secondary: #888888;
121
- --text-error: #ff6b6b;
122
- --text-link: #64b5f6;
123
-
124
- --border-primary: #2a2a2a;
125
- --border-error: #ff6b6b;
126
- --border-cell-failed: #ff6b6b;
127
-
128
- --shadow: rgba(255, 255, 255, 0.05);
129
- }
130
- /* Monocolor UI theme: black/white background, all text/borders single blue */
131
- :root[data-ui="monocolor"] { --mono-color: #0a66ff; }
132
- :root[data-ui="monocolor"][data-theme="light"] {
133
- --bg-primary: #ffffff;
134
- }
135
- :root[data-ui="monocolor"][data-theme="dark"] {
136
- --bg-primary: #000000;
137
- }
138
- :root[data-ui="monocolor"] {
139
- --bg-secondary: var(--bg-primary);
140
- --bg-tertiary: var(--bg-primary);
141
- --bg-code: var(--bg-primary);
142
- --bg-error: var(--bg-primary);
143
- --bg-artifact: var(--bg-primary);
144
- --bg-artifact-hover: var(--bg-primary);
145
-
146
- --text-primary: var(--mono-color);
147
- --text-secondary: var(--mono-color);
148
- --text-error: var(--mono-color);
149
- --text-link: var(--mono-color);
150
-
151
- --border-primary: var(--mono-color);
152
- --border-error: var(--mono-color);
153
- --border-cell-failed: var(--mono-color);
154
-
155
- --shadow: none;
156
- }
157
- :root[data-ui="monocolor"] a { color: var(--mono-color); }
158
- :root[data-ui="monocolor"] .menu-button,
159
- :root[data-ui="monocolor"] .theme-toggle,
160
- :root[data-ui="monocolor"] .reset-toggle,
161
- :root[data-ui="monocolor"] .back-button { background: var(--bg-primary); color: var(--mono-color); border-color: var(--mono-color); }
162
- :root[data-ui="monocolor"] .menu-button:hover,
163
- :root[data-ui="monocolor"] .theme-toggle:hover,
164
- :root[data-ui="monocolor"] .reset-toggle:hover,
165
- :root[data-ui="monocolor"] .back-button:hover { background: var(--bg-primary); color: var(--mono-color); border-color: var(--mono-color); }
166
- :root[data-ui="monocolor"] .menu-dropdown { background: var(--bg-primary); border-color: var(--mono-color); box-shadow: none; }
167
- :root[data-ui="monocolor"] .menu-item { color: var(--mono-color); border-bottom-color: var(--mono-color); }
168
- :root[data-ui="monocolor"] .system-info { background: var(--bg-primary); border-color: var(--mono-color); }
169
- :root[data-ui="monocolor"] .cell { border-color: var(--mono-color); background: var(--bg-primary); }
170
- :root[data-ui="monocolor"] .cell-header { background: var(--bg-primary); border-bottom-color: var(--mono-color); }
171
- :root[data-ui="monocolor"] .artifact { background: var(--bg-primary); border-color: var(--mono-color); color: var(--mono-color); }
172
- :root[data-ui="monocolor"] .artifact:hover { background: var(--bg-primary); }
173
- :root[data-ui="monocolor"] .artifact-preview img,
174
- :root[data-ui="monocolor"] .artifact-preview svg { border-color: var(--mono-color); }
175
- :root[data-ui="monocolor"] .status-widget { background: var(--bg-primary); border-color: var(--mono-color); color: var(--mono-color); }
176
- :root[data-ui="monocolor"] .minimap,
177
- :root[data-ui="monocolor"] .file-explorer,
178
- :root[data-ui="monocolor"] .tools-widget {
179
- background: var(--bg-primary);
180
- border-color: var(--mono-color);
181
- color: var(--mono-color);
182
- }
183
- :root[data-ui="monocolor"] .cell-code {
184
- background: var(--bg-primary);
185
- border-bottom-color: var(--mono-color);
186
- }
187
- :root[data-ui="monocolor"] .tools-title,
188
- :root[data-ui="monocolor"] .file-explorer-section-title,
189
- :root[data-ui="monocolor"] .minimap-title { color: var(--mono-color); border-bottom-color: var(--mono-color); }
190
- :root[data-ui="monocolor"] .tool-button { background: var(--bg-primary); border-color: var(--mono-color); color: var(--mono-color); }
191
- :root[data-ui="monocolor"] .tool-button.active { border-color: var(--mono-color); }
192
- :root[data-ui="monocolor"] .file-explorer-item,
193
- :root[data-ui="monocolor"] .minimap-item { color: var(--mono-color); }
194
- /* Force Pygments code to mono blue on mono bg */
195
- :root[data-ui="monocolor"] .highlight { background: var(--bg-primary) !important; color: var(--mono-color) !important; }
196
- :root[data-ui="monocolor"] .highlight *,
197
- :root[data-ui="monocolor"] .highlight .hll { color: var(--mono-color) !important; background: transparent !important; border-color: var(--mono-color) !important; }
198
- /* Default code font + metrics (overridable via frontmatter) */
199
- :root { --code-font-size: 0.95rem; --code-line-height: 1.5; --code-pad-y: 0.75rem; }
200
- /* Minimal UI theme overrides base variables for a flatter, 90s look */
201
- :root[data-ui="none"] {
202
- --bg-primary: #ffffff;
203
- --bg-secondary: transparent;
204
- --bg-tertiary: transparent;
205
- --bg-code: #f9f9f9;
206
- --bg-error: #fff0f0;
207
- --bg-artifact: #f0f7ff;
208
- --bg-artifact-hover: #e5f1ff;
209
-
210
- --text-primary: #000000;
211
- --text-secondary: #222222;
212
- --text-error: #a00000;
213
- --text-link: #0000ee;
214
-
215
- --border-primary: #cccccc;
216
- --border-error: #cc0000;
217
- --border-cell-failed: #cc0000;
218
-
219
- --shadow: none;
220
- }
221
- html {
222
- overscroll-behavior: none;
223
- }
224
- body {
225
- font-family: 'Cascadia Mono', 'Cascadia Code', 'JetBrains Mono', 'SF Mono', Monaco, 'Consolas', monospace;
226
- line-height: 1.4;
227
- max-width: 1000px;
228
- margin: 0 auto;
229
- padding: 15px;
230
- color: var(--text-primary);
231
- background: var(--bg-primary);
232
- transition: background-color 0.2s ease, color 0.2s ease;
233
- overscroll-behavior: none;
234
- }
235
- /* Minimal "none" UI theme overrides */
236
- :root[data-ui="none"] body {
237
- font-family: 'Times New Roman', Times, serif;
238
- line-height: 1.5;
239
- max-width: 860px;
240
- padding: 12px;
241
- background: #ffffff;
242
- color: #000000;
243
- transition: none;
244
- }
245
-
246
- /* Two panel layout removed */
247
-
248
- .controls {
249
- position: fixed;
250
- top: 20px;
251
- right: 20px;
252
- display: flex;
253
- flex-direction: column;
254
- align-items: flex-end;
255
- gap: 0.25rem;
256
- z-index: 1000;
257
- }
258
- .controls-buttons { display: flex; gap: 0.5rem; }
259
-
260
- .menu-button {
261
- position: relative;
262
- background: var(--bg-secondary);
263
- border: 1px solid var(--border-primary);
264
- padding: 8px 12px;
265
- border-radius: 2px;
266
- color: var(--text-secondary);
267
- cursor: pointer;
268
- font-family: inherit;
269
- font-size: 0.9rem;
270
- user-select: none;
271
- }
272
- /* Keep default control styling when widgets are enabled, even in minimal UI */
273
- :root[data-ui="none"][data-widgets="on"] .menu-button,
274
- :root[data-ui="none"][data-widgets="on"] .theme-toggle,
275
- :root[data-ui="none"][data-widgets="on"] .reset-toggle,
276
- :root[data-ui="none"][data-widgets="on"] .back-button {
277
- background: #f6f6f6;
278
- border: 1px solid #cccccc;
279
- color: #222222;
280
- }
281
-
282
- .menu-button:hover {
283
- color: var(--text-primary);
284
- background: var(--bg-tertiary);
285
- }
286
- /* Controls state indicator (top-right) */
287
- /* Status widget (bottom-right) */
288
- .status-widget {
289
- position: fixed;
290
- right: 20px;
291
- bottom: 20px;
292
- width: auto;
293
- max-width: 260px;
294
- background: var(--bg-secondary);
295
- border: 1px solid var(--border-primary);
296
- border-radius: 2px;
297
- padding: 6px 8px;
298
- font-size: 0.8rem;
299
- color: var(--text-secondary);
300
- z-index: 100;
301
- }
302
- .status-widget strong { color: var(--text-primary); }
303
- :root[data-ui="none"][data-widgets="on"] .status-widget { background: #f6f6f6; border-color: #ccc; color: #222; }
304
- :root[data-ui="none"][data-widgets="on"] .menu-button:hover,
305
- :root[data-ui="none"][data-widgets="on"] .theme-toggle:hover,
306
- :root[data-ui="none"][data-widgets="on"] .reset-toggle:hover,
307
- :root[data-ui="none"][data-widgets="on"] .back-button:hover {
308
- background: #ededed;
309
- border-color: #bbbbbb;
310
- color: #000000;
311
- }
312
-
313
- .menu-dropdown {
314
- position: absolute;
315
- top: 100%;
316
- right: 0;
317
- background: var(--bg-secondary);
318
- border: 1px solid var(--border-primary);
319
- border-radius: 4px;
320
- box-shadow: 0 4px 12px var(--shadow);
321
- min-width: 160px;
322
- opacity: 0;
323
- visibility: hidden;
324
- transform: translateY(-8px);
325
- transition: all 0.2s ease;
326
- z-index: 1001;
327
- margin-top: 4px;
328
- }
329
- :root[data-ui="none"][data-widgets="on"] .menu-dropdown { background: #ffffff; border: 1px solid #cccccc; box-shadow: none; }
330
-
331
- .menu-button.active .menu-dropdown {
332
- opacity: 1;
333
- visibility: visible;
334
- transform: translateY(0);
335
- }
336
-
337
- .menu-item {
338
- display: block;
339
- padding: 8px 12px;
340
- color: var(--text-secondary);
341
- text-decoration: none;
342
- font-size: 0.85rem;
343
- border-bottom: 1px solid var(--border-primary);
344
- cursor: pointer;
345
- }
346
- :root[data-ui="none"] .menu-item { color: #000; border-bottom: 1px solid #eee; }
347
-
348
- .menu-item:last-child {
349
- border-bottom: none;
350
- }
351
-
352
- .menu-item:hover {
353
- background: var(--bg-tertiary);
354
- color: var(--text-primary);
355
- }
356
-
357
- .menu-checkbox {
358
- display: inline-block;
359
- width: 16px;
360
- font-family: monospace;
361
- color: var(--text-link);
362
- }
363
-
364
- .theme-toggle,
365
- .reset-toggle,
366
- .back-button {
367
- background: var(--bg-secondary);
368
- border: 1px solid var(--border-primary);
369
- padding: 8px 12px;
370
- border-radius: 4px;
371
- color: var(--text-secondary);
372
- cursor: pointer;
373
- font-family: inherit;
374
- font-size: 0.9rem;
375
- user-select: none;
376
- }
377
-
378
- .back-button {
379
- text-decoration: none;
380
- display: inline-block;
381
- }
382
-
383
- .theme-toggle:hover,
384
- .reset-toggle:hover,
385
- .back-button:hover {
386
- color: var(--text-primary);
387
- background: var(--bg-tertiary);
388
- }
389
-
390
- .system-info {
391
- background: var(--bg-secondary);
392
- border: 1px solid var(--border-primary);
393
- border-radius: 4px;
394
- padding: 8px 12px;
395
- margin-bottom: 16px;
396
- font-size: 0.85em;
397
- color: var(--text-secondary);
398
- }
399
-
400
- .system-info-header {
401
- font-weight: 600;
402
- color: var(--text-primary);
403
- margin-bottom: 2px;
404
- }
405
-
406
- .system-info-content {
407
- font-family: monospace;
408
- }
409
-
410
- .theme-toggle, .reset-toggle {
411
- background: var(--bg-secondary);
412
- border: 1px solid var(--border-primary);
413
- border-radius: 2px;
414
- /* padding: 0.4rem 0.6rem; */
415
- cursor: pointer;
416
- font-family: inherit;
417
- font-size: 0.8rem;
418
- color: var(--text-secondary);
419
- user-select: none;
420
- transition: all 0.2s ease;
421
- text-transform: lowercase;
422
- letter-spacing: 0;
423
- }
424
-
425
- .theme-toggle:hover, .reset-toggle:hover {
426
- background: var(--bg-tertiary);
427
- border-color: var(--text-secondary);
428
- color: var(--text-primary);
429
- }
430
-
431
- .minimap {
432
- position: fixed;
433
- bottom: 20px;
434
- right: 20px;
435
- width: 220px;
436
- max-height: 400px;
437
- background: var(--bg-secondary);
438
- border: 1px solid var(--border-primary);
439
- border-radius: 2px;
440
- padding: 0.5rem;
441
- font-size: 0.7rem;
442
- overflow-y: auto;
443
- z-index: 100;
444
- opacity: 0.9;
445
- transition: opacity 0.2s ease;
446
- }
447
- /* Hide widgets and controls when disabled via frontmatter */
448
- :root[data-widgets="off"] .controls,
449
- :root[data-widgets="off"] .minimap,
450
- :root[data-widgets="off"] .file-explorer,
451
- :root[data-widgets="off"] .tools-widget,
452
- :root[data-widgets="off"] .status-widget { display: none !important; }
453
-
454
- .file-explorer {
455
- position: fixed;
456
- bottom: 20px; /* default; JS will stack */
457
- right: 20px;
458
- left: auto;
459
- top: auto;
460
- width: 220px;
461
- max-height: 400px;
462
- background: var(--bg-secondary);
463
- border: 1px solid var(--border-primary);
464
- border-radius: 2px;
465
- padding: 0.5rem;
466
- font-size: 0.7rem;
467
- overflow-y: auto;
468
- z-index: 100;
469
- opacity: 0.9;
470
- transition: opacity 0.2s ease;
471
- }
472
-
473
- /* Drawing overlay */
474
- .draw-overlay {
475
- position: fixed;
476
- top: 0;
477
- left: 0;
478
- width: 100vw;
479
- height: 100vh;
480
- z-index: 80; /* under widgets (100) and controls (1000) */
481
- display: block;
482
- pointer-events: none; /* enabled only when a tool is active */
483
- }
484
-
485
- /* Tools widget */
486
- .tools-widget {
487
- position: fixed;
488
- bottom: 20px; /* default; JS will stack */
489
- right: 20px;
490
- left: auto;
491
- top: auto;
492
- width: 220px;
493
- background: var(--bg-secondary);
494
- border: 1px solid var(--border-primary);
495
- border-radius: 2px;
496
- padding: 0.5rem;
497
- font-size: 0.7rem;
498
- z-index: 100;
499
- opacity: 0.95;
500
- }
501
- .tools-title {
502
- font-weight: bold;
503
- color: var(--text-secondary);
504
- margin-bottom: 0.5rem;
505
- padding-bottom: 0.25rem;
506
- border-bottom: 1px solid var(--border-primary);
507
- cursor: grab;
508
- user-select: none;
509
- }
510
- .tools-row { display: flex; gap: 0.4rem; flex-wrap: wrap; }
511
- .tool-button {
512
- background: var(--bg-tertiary);
513
- border: 1px solid var(--border-primary);
514
- border-radius: 2px;
515
- padding: 0.25rem 0.4rem;
516
- cursor: pointer;
517
- color: var(--text-secondary);
518
- font-family: inherit;
519
- font-size: 0.75rem;
520
- user-select: none;
521
- }
522
- .tool-button:hover { color: var(--text-primary); }
523
- .tool-button.active { color: var(--text-primary); border-color: var(--text-secondary); background: var(--bg-secondary); }
524
-
525
- .minimap:hover, .file-explorer:hover {
526
- opacity: 1;
527
- }
528
-
529
- .minimap-title {
530
- font-weight: bold;
531
- color: var(--text-secondary);
532
- margin-bottom: 0.5rem;
533
- padding-bottom: 0.25rem;
534
- border-bottom: 1px solid var(--border-primary);
535
- cursor: grab; /* drag handle */
536
- user-select: none;
537
- }
538
-
539
- .minimap-item {
540
- display: block;
541
- color: var(--text-secondary);
542
- text-decoration: none;
543
- padding: 0.15rem 0;
544
- border-left: 2px solid transparent;
545
- padding-left: 0.5rem;
546
- transition: all 0.2s ease;
547
- cursor: pointer;
548
- }
549
-
550
- .minimap-item:hover {
551
- color: var(--text-primary);
552
- border-left-color: var(--text-secondary);
553
- }
554
-
555
- .minimap-item.active {
556
- color: var(--text-primary);
557
- border-left-color: var(--text-link);
558
- }
559
-
560
- .minimap-heading {
561
- font-weight: normal;
562
- }
563
-
564
- .minimap-heading.h1 { padding-left: 0.5rem; }
565
- .minimap-heading.h2 { padding-left: 1rem; }
566
- .minimap-heading.h3 { padding-left: 1.5rem; }
567
- .minimap-heading.h4 { padding-left: 2rem; }
568
- .minimap-heading.h5 { padding-left: 2.5rem; }
569
- .minimap-heading.h6 { padding-left: 3rem; }
570
-
571
- .minimap-cell {
572
- color: var(--text-link);
573
- opacity: 0.8;
574
- font-style: italic;
575
- }
576
-
577
- .minimap-cell:hover {
578
- opacity: 1;
579
- }
580
-
581
- .file-explorer-title {
582
- font-weight: bold;
583
- color: var(--text-secondary);
584
- margin-bottom: 0.5rem;
585
- padding-bottom: 0.25rem;
586
- border-bottom: 1px solid var(--border-primary);
587
- cursor: grab; /* drag handle */
588
- user-select: none;
589
- }
590
-
591
- .file-explorer-section {
592
- margin-bottom: 0.75rem;
593
- }
594
-
595
- .file-explorer-section-title {
596
- font-weight: bold;
597
- color: var(--text-secondary);
598
- font-size: 0.65rem;
599
- margin-bottom: 0.25rem;
600
- text-transform: uppercase;
601
- letter-spacing: 0.5px;
602
- }
603
-
604
- .file-explorer-item {
605
- display: block;
606
- color: var(--text-secondary);
607
- text-decoration: none;
608
- padding: 0.1rem 0;
609
- margin-left: 0.5rem;
610
- transition: color 0.2s ease;
611
- cursor: pointer;
612
- font-family: monospace;
613
- }
614
-
615
- .file-explorer-item:hover {
616
- color: var(--text-primary);
617
- }
618
-
619
- .file-explorer-item.script {
620
- color: var(--text-link);
621
- }
622
-
623
- .file-explorer-item.artifact {
624
- color: var(--text-secondary);
625
- opacity: 0.8;
626
- }
627
-
628
-
629
- /* Hide widgets on smaller screens */
630
- @media (max-width: 768px) {
631
- .minimap, .file-explorer, .tools-widget {
632
- display: none;
633
- }
634
- }
635
-
636
- .cell {
637
- margin: 1rem 0;
638
- border: 1px solid var(--border-primary);
639
- border-radius: 2px;
640
- overflow: hidden;
641
- background: var(--bg-secondary);
642
- }
643
- :root[data-ui="none"] .cell { margin: 1em 0; border: none; background: transparent; }
644
- .cell-header {
645
- background: var(--bg-secondary);
646
- padding: 0.5rem 1rem;
647
- border-bottom: 1px solid var(--border-primary);
648
- font-family: inherit;
649
- font-size: 0.85rem;
650
- }
651
- :root[data-ui="none"] .cell-header { background: transparent; border: none; padding: 0; font-weight: bold; }
652
- :root[data-ui="none"] .cell-content { padding: 0; }
653
- :root[data-ui="none"] .copy-button,
654
- :root[data-ui="none"] .collapse-indicators,
655
- :root[data-ui="none"] .cell-meta,
656
- :root[data-ui="none"] .cell-outputs-header { display: none !important; }
657
- :root[data-ui="none"] pre, :root[data-ui="none"] code { font-family: Menlo, Monaco, 'Courier New', monospace; }
658
- :root[data-ui="none"] .code-content pre { background: #f9f9f9; border: 1px solid #ddd; padding: 8px; }
659
- :root[data-ui="none"] .output { background: transparent; border: none; padding: 0.25em 0; }
660
- color: var(--text-secondary);
661
- cursor: pointer;
662
- user-select: none;
663
- transition: background-color 0.2s ease;
664
- }
665
- .cell-header:hover {
666
- background: var(--bg-tertiary);
667
- }
668
- .collapse-indicators {
669
- color: var(--text-secondary);
670
- font-size: 0.8rem;
671
- opacity: 0.7;
672
- }
673
- .collapse-indicators span:hover {
674
- color: var(--text-primary);
675
- opacity: 1;
676
- }
677
- .cell-code {
678
- display: block;
679
- background: var(--bg-code);
680
- }
681
- .cell-code.collapsed {
682
- display: none;
683
- }
684
- .cell-code pre {
685
- margin: 0;
686
- padding: 0.75rem;
687
- background: var(--bg-code);
688
- overflow-x: auto;
689
- color: var(--text-primary);
690
- }
691
- .cell-output {
692
- padding: 0.75rem;
693
- /* background: var(--bg-primary); */
694
- background: var(--bg-secondary);
695
- }
696
- .cell-output.collapsed {
697
- display: none;
698
- }
699
- .cell-stdout {
700
- background: var(--bg-tertiary);
701
- padding: 0.75rem;
702
- border-radius: 1px;
703
- /* margin: 0.25rem 0; */
704
- font-family: inherit;
705
- font-size: 0.9rem;
706
- white-space: pre-wrap;
707
- color: var(--text-primary);
708
- }
709
-
710
- .cell-stdout {
711
- background: var(--bg-tertiary);
712
- padding: 0.75rem;
713
- border-radius: 1px;
714
- font-family: inherit;
715
- font-size: 0.9rem;
716
- color: var(--text-primary);
717
-
718
- /* key bits */
719
- overflow: auto; /* show scrollbars when needed */
720
- max-width: 100%; /* respects whatever layout width you give it */
721
- }
722
-
723
- .cell-stdout .stdout-text {
724
- margin: 0; /* reset pre default margin */
725
- white-space: pre; /* keep line breaks, NO wrapping */
726
- display: inline-block; /* shrink-to-content */
727
- min-width: max-content; /* allow very long lines to define intrinsic width */
728
- font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
729
- tab-size: 2;
730
- }
731
-
732
- .cell-stderr {
733
- background: var(--bg-error);
734
- border-left: 2px solid var(--border-error);
735
- padding: 1rem;
736
- margin: 0.5rem 0;
737
- font-family: inherit;
738
- font-size: 0.9rem;
739
- color: var(--text-error);
740
- white-space: pre-wrap;
741
- }
742
- .uv-install-logs {
743
- margin: 0.5rem 0;
744
- }
745
- .uv-logs-header {
746
- cursor: pointer;
747
- padding: 0.75rem;
748
- border-left: 3px solid var(--border-color);
749
- font-family: inherit;
750
- font-size: 0.85rem;
751
- color: var(--text-secondary);
752
- user-select: none;
753
- }
754
- .uv-logs-content {
755
- background: var(--bg-secondary);
756
- padding: 1rem;
757
- border-left: 3px solid var(--border-color);
758
- white-space: pre-wrap;
759
- font-family: monospace;
760
- font-size: 0.85rem;
761
- color: var(--text-secondary);
762
- overflow-x: auto;
763
- }
764
- .cell-artifacts {
765
- margin: 1rem 0;
766
- }
767
- .cell-artifacts h4 {
768
- margin: 0 0 0.5rem 0;
769
- color: var(--text-secondary);
770
- font-size: 0.9rem;
771
- }
772
- .artifact {
773
- display: inline-block;
774
- background: var(--bg-artifact);
775
- padding: 0.25rem 0.5rem;
776
- border-radius: 1px;
777
- margin: 0.25rem 0.5rem 0.25rem 0;
778
- font-family: inherit;
779
- font-size: 0.8rem;
780
- color: var(--text-link);
781
- text-decoration: none;
782
- transition: background-color 0.2s ease;
783
- border: 1px solid var(--border-primary);
784
- }
785
- .artifact:hover {
786
- background: var(--bg-artifact-hover);
787
- }
788
- .artifact-preview {
789
- margin-top: 1rem;
790
- }
791
- .artifact-preview img {
792
- max-width: 100%;
793
- height: auto;
794
- border: 1px solid var(--border-primary);
795
- border-radius: 1px;
796
- }
797
- .artifact-preview svg {
798
- max-width: 100%;
799
- height: auto;
800
- border: 1px solid var(--border-primary);
801
- border-radius: 1px;
802
- display: block;
803
- }
804
- /* Style SVG text elements */
805
- .artifact-preview svg g {
806
- fill: var(--text-primary) !important;
807
- }
808
- /* Auto-theme SVG elements */
809
- .artifact-preview svg {
810
- background: transparent;
811
- }
812
- /* Invert SVG images in dark mode */
813
- :root[data-theme="dark"] .artifact-preview img[src$=".svg"] {
814
- filter: invert(0.9) hue-rotate(180deg);
815
- }
816
- /* Keep SVG images readable in monocolor mode */
817
- :root[data-ui="monocolor"] .artifact-preview img[src$=".svg"] {
818
- filter: none;
819
- }
820
- /* CSV table styling */
821
- .artifact-csv {
822
- margin-top: 1rem;
823
- overflow-x: auto;
824
- }
825
- .csv-table {
826
- width: 100%;
827
- border-collapse: collapse;
828
- font-size: 0.9rem;
829
- background: var(--bg-secondary);
830
- border: 1px solid var(--border-primary);
831
- border-radius: 1px;
832
- }
833
- .csv-table th,
834
- .csv-table td {
835
- padding: 0.5rem 0.75rem;
836
- text-align: left;
837
- border: 1px solid var(--border-primary);
838
- }
839
- .csv-table th {
840
- background: var(--bg-tertiary);
841
- font-weight: 600;
842
- color: var(--text-primary);
843
- }
844
- .csv-table tbody tr:hover {
845
- background: var(--bg-artifact-hover);
846
- }
847
- .artifact-csv-error {
848
- margin-top: 1rem;
849
- padding: 1rem;
850
- background: var(--bg-error);
851
- color: var(--text-error);
852
- border: 1px solid var(--border-error);
853
- border-radius: 1px;
854
- }
855
- .cell-failed {
856
- border-color: var(--border-cell-failed);
857
- }
858
- .cell-failed .cell-header {
859
- background: var(--bg-error);
860
- color: var(--text-error);
861
- }
862
- .cell-commented {
863
- opacity: 0.6;
864
- border-style: dashed;
865
- }
866
- .cell-commented .cell-header {
867
- background: var(--bg-secondary);
868
- color: var(--text-secondary);
869
- font-style: italic;
870
- }
871
- .run-btn {
872
- background: var(--bg-tertiary);
873
- border: 1px solid var(--border-primary);
874
- padding: 2px 6px;
875
- border-radius: 2px;
876
- color: var(--text-secondary);
877
- cursor: pointer;
878
- font-size: 0.75em;
879
- font-family: inherit;
880
- margin-left: 4px;
881
- }
882
- .run-btn:hover {
883
- color: var(--text-primary);
884
- background: var(--bg-primary);
885
- }
886
- .run-btn:disabled {
887
- opacity: 0.6;
888
- cursor: not-allowed;
889
- }
890
- .copy-btn {
891
- background: var(--bg-tertiary);
892
- border: 1px solid var(--border-primary);
893
- padding: 2px 6px;
894
- border-radius: 2px;
895
- color: var(--text-secondary);
896
- cursor: pointer;
897
- font-size: 0.75em;
898
- font-family: inherit;
899
- margin-left: 4px;
900
- }
901
- .copy-btn:hover {
902
- color: var(--text-primary);
903
- background: var(--bg-primary);
904
- }
905
- .copy-btn:disabled {
906
- opacity: 0.6;
907
- cursor: not-allowed;
908
- }
909
- .copy-btn.copied {
910
- color: #4caf50;
911
- background: var(--bg-primary);
912
- border-color: #4caf50;
913
- transition: all 0.2s ease;
914
- }
915
- .raw-btn {
916
- background: var(--bg-tertiary);
917
- border: 1px solid var(--border-primary);
918
- padding: 2px 6px;
919
- border-radius: 2px;
920
- color: var(--text-secondary);
921
- cursor: pointer;
922
- font-size: 0.75em;
923
- font-family: inherit;
924
- margin-left: 4px;
925
- text-decoration: none;
926
- display: inline-block;
927
- }
928
- .raw-btn:hover {
929
- color: var(--text-primary);
930
- background: var(--bg-primary);
931
- text-decoration: none;
932
- }
933
- .github-btn {
934
- background: var(--bg-tertiary);
935
- border: 1px solid var(--border-primary);
936
- padding: 2px 6px;
937
- border-radius: 2px;
938
- color: var(--text-secondary);
939
- cursor: pointer;
940
- font-size: 0.75em;
941
- font-family: inherit;
942
- margin-left: 4px;
943
- text-decoration: none;
944
- display: inline-block;
945
- }
946
- .github-btn:hover {
947
- color: var(--text-primary);
948
- background: var(--bg-primary);
949
- text-decoration: none;
950
- }
951
- .hf-btn {
952
- background: var(--bg-tertiary);
953
- border: 1px solid var(--border-primary);
954
- padding: 2px 6px;
955
- border-radius: 2px;
956
- color: var(--text-secondary);
957
- cursor: pointer;
958
- font-size: 0.75em;
959
- font-family: inherit;
960
- margin-left: 4px;
961
- text-decoration: none;
962
- display: inline-block;
963
- }
964
- .hf-btn:hover {
965
- color: var(--text-primary);
966
- background: var(--bg-primary);
967
- text-decoration: none;
968
- }
969
- .output-stale {
970
- opacity: 0.5;
971
- position: relative;
972
- }
973
- .output-stale::after {
974
- content: '⏳ updating...';
975
- position: absolute;
976
- top: 8px;
977
- right: 8px;
978
- background: var(--bg-secondary);
979
- padding: 4px 8px;
980
- border-radius: 2px;
981
- font-size: 0.75em;
982
- color: var(--text-secondary);
983
- border: 1px solid var(--border-primary);
984
- }
985
- h1, h2, h3, h4, h5, h6 {
986
- margin-top: 1.5rem;
987
- margin-bottom: 0.75rem;
988
- color: var(--text-primary);
989
- }
990
- h1 {
991
- margin-top: 0;
992
- margin-bottom: 1rem;
993
- }
994
- p {
995
- margin: 0.75rem 0;
996
- color: var(--text-primary);
997
- }
998
- a {
999
- color: var(--text-link);
1000
- }
1001
- img {
1002
- max-width: 100%;
1003
- height: auto;
1004
- border-radius: 1px;
1005
- box-shadow: none;
1006
- }
1007
- pre, code {
1008
- font-family: 'Cascadia Mono', 'Cascadia Code', 'JetBrains Mono', 'SF Mono', Monaco, 'Consolas', monospace;
1009
- font-size: var(--code-font-size);
1010
- }
1011
- .code-wrap { position: relative; }
1012
- .code-line-highlight { display: none; position: absolute; left: 0; right: 0; height: 1.5em; background: rgba(255, 235, 170, 0.35); pointer-events: none; border-left: 3px solid #f4c542; }
1013
- .line-number { cursor: pointer; text-decoration: none; color: var(--text-secondary); padding: 0 0.25rem; }
1014
- .line-number.selected { background: rgba(255, 235, 170, 0.4); color: var(--text-primary); }
1015
-
1016
- /* Line numbers */
1017
- .highlight-with-lines {
1018
- display: flex;
1019
- }
1020
- .line-numbers {
1021
- background: var(--bg-tertiary);
1022
- padding: var(--code-pad-y) 0.5rem;
1023
- font-family: 'Cascadia Mono', 'Cascadia Code', 'JetBrains Mono', 'SF Mono', Monaco, 'Consolas', monospace;
1024
- font-size: var(--code-font-size);
1025
- line-height: var(--code-line-height);
1026
- color: var(--text-secondary);
1027
- user-select: none;
1028
- text-align: right;
1029
- border-right: 1px solid var(--border-primary);
1030
- }
1031
- .line-numbers .line-number {
1032
- display: block;
1033
- line-height: var(--code-line-height);
1034
- }
1035
- .highlight-with-lines .highlight {
1036
- flex: 1;
1037
- }
1038
- .highlight .hll { background-color: transparent; } /* don't conflict with our highlight */
1039
- .highlight pre {
1040
- white-space: pre;
1041
- margin: 0;
1042
- padding: var(--code-pad-y) 0.75rem;
1043
- line-height: var(--code-line-height);
1044
- }
1045
-
1046
- /* Collapsed code styling */
1047
- .cell-code.collapsed {
1048
- display: none;
1049
- }
1050
- .cell-code.expanded {
1051
- display: block;
1052
- }
1053
-
1054
- .cell-code {
1055
- display: block;
1056
- border-bottom: 1px solid var(--border-primary);
1057
- }
1058
-
1059
-
1060
- pre { line-height: 125%; }
1061
- td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
1062
- span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
1063
- td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
1064
- span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
1065
- [data-theme="light"] .highlight .hll { background-color: #ffffcc }
1066
- [data-theme="light"] .highlight { background: #f8f8f8; }
1067
- [data-theme="light"] .highlight .c { color: #3D7B7B; font-style: italic } /* Comment */
1068
- [data-theme="light"] .highlight .err { border: 1px solid #F00 } /* Error */
1069
- [data-theme="light"] .highlight .k { color: #008000; font-weight: bold } /* Keyword */
1070
- [data-theme="light"] .highlight .o { color: #666 } /* Operator */
1071
- [data-theme="light"] .highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */
1072
- [data-theme="light"] .highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */
1073
- [data-theme="light"] .highlight .cp { color: #9C6500 } /* Comment.Preproc */
1074
- [data-theme="light"] .highlight .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */
1075
- [data-theme="light"] .highlight .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */
1076
- [data-theme="light"] .highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */
1077
- [data-theme="light"] .highlight .gd { color: #A00000 } /* Generic.Deleted */
1078
- [data-theme="light"] .highlight .ge { font-style: italic } /* Generic.Emph */
1079
- [data-theme="light"] .highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
1080
- [data-theme="light"] .highlight .gr { color: #E40000 } /* Generic.Error */
1081
- [data-theme="light"] .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
1082
- [data-theme="light"] .highlight .gi { color: #008400 } /* Generic.Inserted */
1083
- [data-theme="light"] .highlight .go { color: #717171 } /* Generic.Output */
1084
- [data-theme="light"] .highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
1085
- [data-theme="light"] .highlight .gs { font-weight: bold } /* Generic.Strong */
1086
- [data-theme="light"] .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
1087
- [data-theme="light"] .highlight .gt { color: #04D } /* Generic.Traceback */
1088
- [data-theme="light"] .highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
1089
- [data-theme="light"] .highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
1090
- [data-theme="light"] .highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
1091
- [data-theme="light"] .highlight .kp { color: #008000 } /* Keyword.Pseudo */
1092
- [data-theme="light"] .highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
1093
- [data-theme="light"] .highlight .kt { color: #B00040 } /* Keyword.Type */
1094
- [data-theme="light"] .highlight .m { color: #666 } /* Literal.Number */
1095
- [data-theme="light"] .highlight .s { color: #BA2121 } /* Literal.String */
1096
- [data-theme="light"] .highlight .na { color: #687822 } /* Name.Attribute */
1097
- [data-theme="light"] .highlight .nb { color: #008000 } /* Name.Builtin */
1098
- [data-theme="light"] .highlight .nc { color: #00F; font-weight: bold } /* Name.Class */
1099
- [data-theme="light"] .highlight .no { color: #800 } /* Name.Constant */
1100
- [data-theme="light"] .highlight .nd { color: #A2F } /* Name.Decorator */
1101
- [data-theme="light"] .highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */
1102
- [data-theme="light"] .highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */
1103
- [data-theme="light"] .highlight .nf { color: #00F } /* Name.Function */
1104
- [data-theme="light"] .highlight .nl { color: #767600 } /* Name.Label */
1105
- [data-theme="light"] .highlight .nn { color: #00F; font-weight: bold } /* Name.Namespace */
1106
- [data-theme="light"] .highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
1107
- [data-theme="light"] .highlight .nv { color: #19177C } /* Name.Variable */
1108
- [data-theme="light"] .highlight .ow { color: #A2F; font-weight: bold } /* Operator.Word */
1109
- [data-theme="light"] .highlight .w { color: #BBB } /* Text.Whitespace */
1110
- [data-theme="light"] .highlight .mb { color: #666 } /* Literal.Number.Bin */
1111
- [data-theme="light"] .highlight .mf { color: #666 } /* Literal.Number.Float */
1112
- [data-theme="light"] .highlight .mh { color: #666 } /* Literal.Number.Hex */
1113
- [data-theme="light"] .highlight .mi { color: #666 } /* Literal.Number.Integer */
1114
- [data-theme="light"] .highlight .mo { color: #666 } /* Literal.Number.Oct */
1115
- [data-theme="light"] .highlight .sa { color: #BA2121 } /* Literal.String.Affix */
1116
- [data-theme="light"] .highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
1117
- [data-theme="light"] .highlight .sc { color: #BA2121 } /* Literal.String.Char */
1118
- [data-theme="light"] .highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */
1119
- [data-theme="light"] .highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
1120
- [data-theme="light"] .highlight .s2 { color: #BA2121 } /* Literal.String.Double */
1121
- [data-theme="light"] .highlight .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */
1122
- [data-theme="light"] .highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */
1123
- [data-theme="light"] .highlight .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */
1124
- [data-theme="light"] .highlight .sx { color: #008000 } /* Literal.String.Other */
1125
- [data-theme="light"] .highlight .sr { color: #A45A77 } /* Literal.String.Regex */
1126
- [data-theme="light"] .highlight .s1 { color: #BA2121 } /* Literal.String.Single */
1127
- [data-theme="light"] .highlight .ss { color: #19177C } /* Literal.String.Symbol */
1128
- [data-theme="light"] .highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
1129
- [data-theme="light"] .highlight .fm { color: #00F } /* Name.Function.Magic */
1130
- [data-theme="light"] .highlight .vc { color: #19177C } /* Name.Variable.Class */
1131
- [data-theme="light"] .highlight .vg { color: #19177C } /* Name.Variable.Global */
1132
- [data-theme="light"] .highlight .vi { color: #19177C } /* Name.Variable.Instance */
1133
- [data-theme="light"] .highlight .vm { color: #19177C } /* Name.Variable.Magic */
1134
- [data-theme="light"] .highlight .il { color: #666 } /* Literal.Number.Integer.Long */
1135
-
1136
- pre { line-height: 125%; }
1137
- td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
1138
- span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
1139
- td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
1140
- span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
1141
- [data-theme="dark"] .highlight .hll { background-color: #49483e }
1142
- [data-theme="dark"] .highlight { background: #272822; color: #F8F8F2 }
1143
- [data-theme="dark"] .highlight .c { color: #959077 } /* Comment */
1144
- [data-theme="dark"] .highlight .err { color: #ED007E; background-color: #1E0010 } /* Error */
1145
- [data-theme="dark"] .highlight .esc { color: #F8F8F2 } /* Escape */
1146
- [data-theme="dark"] .highlight .g { color: #F8F8F2 } /* Generic */
1147
- [data-theme="dark"] .highlight .k { color: #66D9EF } /* Keyword */
1148
- [data-theme="dark"] .highlight .l { color: #AE81FF } /* Literal */
1149
- [data-theme="dark"] .highlight .n { color: #F8F8F2 } /* Name */
1150
- [data-theme="dark"] .highlight .o { color: #FF4689 } /* Operator */
1151
- [data-theme="dark"] .highlight .x { color: #F8F8F2 } /* Other */
1152
- [data-theme="dark"] .highlight .p { color: #F8F8F2 } /* Punctuation */
1153
- [data-theme="dark"] .highlight .ch { color: #959077 } /* Comment.Hashbang */
1154
- [data-theme="dark"] .highlight .cm { color: #959077 } /* Comment.Multiline */
1155
- [data-theme="dark"] .highlight .cp { color: #959077 } /* Comment.Preproc */
1156
- [data-theme="dark"] .highlight .cpf { color: #959077 } /* Comment.PreprocFile */
1157
- [data-theme="dark"] .highlight .c1 { color: #959077 } /* Comment.Single */
1158
- [data-theme="dark"] .highlight .cs { color: #959077 } /* Comment.Special */
1159
- [data-theme="dark"] .highlight .gd { color: #FF4689 } /* Generic.Deleted */
1160
- [data-theme="dark"] .highlight .ge { color: #F8F8F2; font-style: italic } /* Generic.Emph */
1161
- [data-theme="dark"] .highlight .ges { color: #F8F8F2; font-weight: bold; font-style: italic } /* Generic.EmphStrong */
1162
- [data-theme="dark"] .highlight .gr { color: #F8F8F2 } /* Generic.Error */
1163
- [data-theme="dark"] .highlight .gh { color: #F8F8F2 } /* Generic.Heading */
1164
- [data-theme="dark"] .highlight .gi { color: #A6E22E } /* Generic.Inserted */
1165
- [data-theme="dark"] .highlight .go { color: #66D9EF } /* Generic.Output */
1166
- [data-theme="dark"] .highlight .gp { color: #FF4689; font-weight: bold } /* Generic.Prompt */
1167
- [data-theme="dark"] .highlight .gs { color: #F8F8F2; font-weight: bold } /* Generic.Strong */
1168
- [data-theme="dark"] .highlight .gu { color: #959077 } /* Generic.Subheading */
1169
- [data-theme="dark"] .highlight .gt { color: #F8F8F2 } /* Generic.Traceback */
1170
- [data-theme="dark"] .highlight .kc { color: #66D9EF } /* Keyword.Constant */
1171
- [data-theme="dark"] .highlight .kd { color: #66D9EF } /* Keyword.Declaration */
1172
- [data-theme="dark"] .highlight .kn { color: #FF4689 } /* Keyword.Namespace */
1173
- [data-theme="dark"] .highlight .kp { color: #66D9EF } /* Keyword.Pseudo */
1174
- [data-theme="dark"] .highlight .kr { color: #66D9EF } /* Keyword.Reserved */
1175
- [data-theme="dark"] .highlight .kt { color: #66D9EF } /* Keyword.Type */
1176
- [data-theme="dark"] .highlight .ld { color: #E6DB74 } /* Literal.Date */
1177
- [data-theme="dark"] .highlight .m { color: #AE81FF } /* Literal.Number */
1178
- [data-theme="dark"] .highlight .s { color: #E6DB74 } /* Literal.String */
1179
- [data-theme="dark"] .highlight .na { color: #A6E22E } /* Name.Attribute */
1180
- [data-theme="dark"] .highlight .nb { color: #F8F8F2 } /* Name.Builtin */
1181
- [data-theme="dark"] .highlight .nc { color: #A6E22E } /* Name.Class */
1182
- [data-theme="dark"] .highlight .no { color: #66D9EF } /* Name.Constant */
1183
- [data-theme="dark"] .highlight .nd { color: #A6E22E } /* Name.Decorator */
1184
- [data-theme="dark"] .highlight .ni { color: #F8F8F2 } /* Name.Entity */
1185
- [data-theme="dark"] .highlight .ne { color: #A6E22E } /* Name.Exception */
1186
- [data-theme="dark"] .highlight .nf { color: #A6E22E } /* Name.Function */
1187
- [data-theme="dark"] .highlight .nl { color: #F8F8F2 } /* Name.Label */
1188
- [data-theme="dark"] .highlight .nn { color: #F8F8F2 } /* Name.Namespace */
1189
- [data-theme="dark"] .highlight .nx { color: #A6E22E } /* Name.Other */
1190
- [data-theme="dark"] .highlight .py { color: #F8F8F2 } /* Name.Property */
1191
- [data-theme="dark"] .highlight .nt { color: #FF4689 } /* Name.Tag */
1192
- [data-theme="dark"] .highlight .nv { color: #F8F8F2 } /* Name.Variable */
1193
- [data-theme="dark"] .highlight .ow { color: #FF4689 } /* Operator.Word */
1194
- [data-theme="dark"] .highlight .pm { color: #F8F8F2 } /* Punctuation.Marker */
1195
- [data-theme="dark"] .highlight .w { color: #F8F8F2 } /* Text.Whitespace */
1196
- [data-theme="dark"] .highlight .mb { color: #AE81FF } /* Literal.Number.Bin */
1197
- [data-theme="dark"] .highlight .mf { color: #AE81FF } /* Literal.Number.Float */
1198
- [data-theme="dark"] .highlight .mh { color: #AE81FF } /* Literal.Number.Hex */
1199
- [data-theme="dark"] .highlight .mi { color: #AE81FF } /* Literal.Number.Integer */
1200
- [data-theme="dark"] .highlight .mo { color: #AE81FF } /* Literal.Number.Oct */
1201
- [data-theme="dark"] .highlight .sa { color: #E6DB74 } /* Literal.String.Affix */
1202
- [data-theme="dark"] .highlight .sb { color: #E6DB74 } /* Literal.String.Backtick */
1203
- [data-theme="dark"] .highlight .sc { color: #E6DB74 } /* Literal.String.Char */
1204
- [data-theme="dark"] .highlight .dl { color: #E6DB74 } /* Literal.String.Delimiter */
1205
- [data-theme="dark"] .highlight .sd { color: #E6DB74 } /* Literal.String.Doc */
1206
- [data-theme="dark"] .highlight .s2 { color: #E6DB74 } /* Literal.String.Double */
1207
- [data-theme="dark"] .highlight .se { color: #AE81FF } /* Literal.String.Escape */
1208
- [data-theme="dark"] .highlight .sh { color: #E6DB74 } /* Literal.String.Heredoc */
1209
- [data-theme="dark"] .highlight .si { color: #E6DB74 } /* Literal.String.Interpol */
1210
- [data-theme="dark"] .highlight .sx { color: #E6DB74 } /* Literal.String.Other */
1211
- [data-theme="dark"] .highlight .sr { color: #E6DB74 } /* Literal.String.Regex */
1212
- [data-theme="dark"] .highlight .s1 { color: #E6DB74 } /* Literal.String.Single */
1213
- [data-theme="dark"] .highlight .ss { color: #E6DB74 } /* Literal.String.Symbol */
1214
- [data-theme="dark"] .highlight .bp { color: #F8F8F2 } /* Name.Builtin.Pseudo */
1215
- [data-theme="dark"] .highlight .fm { color: #A6E22E } /* Name.Function.Magic */
1216
- [data-theme="dark"] .highlight .vc { color: #F8F8F2 } /* Name.Variable.Class */
1217
- [data-theme="dark"] .highlight .vg { color: #F8F8F2 } /* Name.Variable.Global */
1218
- [data-theme="dark"] .highlight .vi { color: #F8F8F2 } /* Name.Variable.Instance */
1219
- [data-theme="dark"] .highlight .vm { color: #F8F8F2 } /* Name.Variable.Magic */
1220
- [data-theme="dark"] .highlight .il { color: #AE81FF } /* Literal.Number.Integer.Long */
1221
-
1222
- /* Ensure our code metrics override Pygments defaults */
1223
- .highlight pre {
1224
- white-space: pre;
1225
- margin: 0;
1226
- padding: var(--code-pad-y) 0.75rem !important;
1227
- line-height: var(--code-line-height) !important;
1228
- font-size: var(--code-font-size) !important;
1229
- font-family: 'Cascadia Mono', 'Cascadia Code', 'JetBrains Mono', 'SF Mono', Monaco, 'Consolas', monospace !important;
1230
- border: none;
1231
- }
1232
- .line-numbers { line-height: var(--code-line-height) !important; }
1233
- .line-numbers .line-number { line-height: var(--code-line-height) !important; }
1234
-
1235
- /* Custom CSS from frontmatter */
1236
-
1237
-
1238
-
1239
-
1240
-
1241
- /* Cursor for tools */
1242
- body[data-tool="arrow"] .main-content {
1243
- cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23e53935" stroke-width="2"><path d="M12 19l7-7 3 3-7 7-3-3z"/><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"/><path d="M2 2l7.586 7.586"/><circle cx="11" cy="11" r="2"/></svg>') 12 12, crosshair;
1244
- }
1245
- body[data-tool="pen"] .main-content {
1246
- cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23e53935" stroke-width="2"><path d="M12 19l7-7 3 3-7 7-3-3z"/><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"/><circle cx="4" cy="20" r="2" fill="%23e53935"/></svg>') 4 20, pointer;
1247
- }
1248
- body[data-tool="eraser"] .main-content {
1249
- cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23e53935" stroke-width="2"><path d="M20 20H7l-7-7 7-7h13v14z"/><path d="M13 13l7-7"/><path d="M13 13L9 9"/></svg>') 12 12, auto;
1250
- }
1251
-
1252
- /* Color picker styles */
1253
- .tools-section-title {
1254
- font-weight: bold;
1255
- color: var(--text-secondary);
1256
- font-size: 0.65rem;
1257
- margin: 0.75rem 0 0.5rem 0;
1258
- text-transform: uppercase;
1259
- letter-spacing: 0.5px;
1260
- }
1261
- .color-row {
1262
- display: grid;
1263
- grid-template-columns: repeat(6, 1fr);
1264
- gap: 0.25rem;
1265
- margin-bottom: 0.5rem;
1266
- }
1267
- .color-swatch {
1268
- width: 18px;
1269
- height: 18px;
1270
- border: 2px solid var(--border-primary);
1271
- border-radius: 3px;
1272
- cursor: pointer;
1273
- transition: all 0.2s ease;
1274
- position: relative;
1275
- }
1276
- .color-swatch:hover {
1277
- transform: scale(1.1);
1278
- border-color: var(--text-secondary);
1279
- }
1280
- .color-swatch.selected {
1281
- border-color: var(--text-primary);
1282
- box-shadow: 0 0 0 2px var(--text-link);
1283
- }
1284
- .color-swatch.selected::after {
1285
- content: '✓';
1286
- position: absolute;
1287
- top: 50%;
1288
- left: 50%;
1289
- transform: translate(-50%, -50%);
1290
- color: white;
1291
- font-size: 10px;
1292
- font-weight: bold;
1293
- text-shadow: 1px 1px 1px black;
1294
- }
1295
- .color-input {
1296
- width: 24px;
1297
- height: 24px;
1298
- border: 2px solid var(--border-primary);
1299
- border-radius: 3px;
1300
- cursor: pointer;
1301
- background: none;
1302
- padding: 0;
1303
- grid-column: span 2;
1304
- justify-self: center;
1305
- }
1306
- .color-input:hover {
1307
- border-color: var(--text-secondary);
1308
- }
1309
-
1310
- /* Thickness slider styles */
1311
- .thickness-row {
1312
- display: flex;
1313
- align-items: center;
1314
- gap: 0.5rem;
1315
- margin-top: 0.75rem;
1316
- }
1317
- .thickness-slider {
1318
- flex: 1;
1319
- -webkit-appearance: none;
1320
- appearance: none;
1321
- height: 4px;
1322
- background: var(--border-primary);
1323
- border-radius: 2px;
1324
- outline: none;
1325
- opacity: 0.7;
1326
- transition: opacity 0.2s;
1327
- }
1328
- .thickness-slider:hover {
1329
- opacity: 1;
1330
- }
1331
- .thickness-slider::-webkit-slider-thumb {
1332
- -webkit-appearance: none;
1333
- appearance: none;
1334
- width: 12px;
1335
- height: 12px;
1336
- background: var(--text-link);
1337
- border-radius: 50%;
1338
- cursor: pointer;
1339
- }
1340
- .thickness-slider::-moz-range-thumb {
1341
- width: 12px;
1342
- height: 12px;
1343
- background: var(--text-link);
1344
- border-radius: 50%;
1345
- cursor: pointer;
1346
- border: none;
1347
- }
1348
- .thickness-value {
1349
- font-size: 0.7rem;
1350
- color: var(--text-secondary);
1351
- min-width: 20px;
1352
- text-align: right;
1353
- }
1354
-
1355
- .highlight {
1356
- background: none !important;
1357
- }
1358
-
1359
- /* Loading animations */
1360
- .loading-spinner {
1361
- display: inline-block;
1362
- width: 16px;
1363
- height: 16px;
1364
- border: 2px solid var(--border-primary);
1365
- border-radius: 50%;
1366
- border-top-color: var(--text-link);
1367
- animation: spin 1s linear infinite;
1368
- margin-right: 8px;
1369
- vertical-align: middle;
1370
- }
1371
-
1372
- @keyframes spin {
1373
- to { transform: rotate(360deg); }
1374
- }
1375
-
1376
- .loading-skeleton {
1377
- display: inline-block;
1378
- background: var(--bg-tertiary);
1379
- background: linear-gradient(
1380
- 90deg,
1381
- var(--bg-tertiary) 25%,
1382
- var(--bg-secondary) 50%,
1383
- var(--bg-tertiary) 75%
1384
- );
1385
- background-size: 200% 100%;
1386
- animation: loading-shimmer 2s ease-in-out infinite;
1387
- border-radius: 2px;
1388
- height: 1em;
1389
- width: 80px;
1390
- vertical-align: middle;
1391
- }
1392
-
1393
- @keyframes loading-shimmer {
1394
- 0% { background-position: -200% 0; }
1395
- 100% { background-position: 200% 0; }
1396
- }
1397
-
1398
- /* Loading state for cell output */
1399
- .cell-output:has(.loading-spinner) {
1400
- opacity: 0.7;
1401
- background: var(--bg-secondary);
1402
- /* border-left: 3px solid var(--text-link); */
1403
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1404
  </style>
1405
  <script>
1406
  // --- Drag utilities ---
 
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>index</title>
7
+
8
+ <link rel="preconnect" href="https://fonts.googleapis.com">
9
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
+ <link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap" rel="stylesheet">
11
+
12
  <script>
13
  // Iframe-friendly navigation router
14
  (function() {
 
92
  </script>
93
  <style>
94
  :root[data-theme="light"] {
95
+ --bg-primary: #ffffff;
96
+ --bg-secondary: #f6f8fa;
97
+ --bg-tertiary: #f8f9fa;
98
+ --bg-code: #f8f9fa;
99
+ --bg-error: #fdf2f2;
100
+ --bg-artifact: #e6f3ff;
101
+ --bg-artifact-hover: #d0e7ff;
102
+
103
+ --text-primary: #333;
104
+ --text-secondary: #656d76;
105
+ --text-error: #c53030;
106
+ --text-link: #0969da;
107
+
108
+ --border-primary: #e1e5e9;
109
+ --border-error: #e53e3e;
110
+ --border-cell-failed: #d73a49;
111
+
112
+ --shadow: rgba(0, 0, 0, 0.1);
113
+ }
114
+
115
+ :root[data-theme="dark"] {
116
+ --bg-primary: #0a0a0a;
117
+ --bg-secondary: #121212;
118
+ --bg-tertiary: #181818;
119
+ --bg-code: #0d0d0d;
120
+ --bg-error: #1a0f0f;
121
+ --bg-artifact: #151515;
122
+ --bg-artifact-hover: #1a1a1a;
123
+
124
+ --text-primary: #e0e0e0;
125
+ --text-secondary: #888888;
126
+ --text-error: #ff6b6b;
127
+ --text-link: #64b5f6;
128
+
129
+ --border-primary: #2a2a2a;
130
+ --border-error: #ff6b6b;
131
+ --border-cell-failed: #ff6b6b;
132
+
133
+ --shadow: rgba(255, 255, 255, 0.05);
134
+ }
135
+
136
+ /* Monocolor UI theme: black/white background, all text/borders single blue */
137
+ :root[data-ui="monocolor"] {
138
+ --mono-color: #0a66ff;
139
+ }
140
+
141
+ :root[data-ui="monocolor"][data-theme="light"] {
142
+ --bg-primary: #ffffff;
143
+ }
144
+
145
+ :root[data-ui="monocolor"][data-theme="dark"] {
146
+ --bg-primary: #000000;
147
+ }
148
+
149
+ :root[data-ui="monocolor"] {
150
+ --bg-secondary: var(--bg-primary);
151
+ --bg-tertiary: var(--bg-primary);
152
+ --bg-code: var(--bg-primary);
153
+ --bg-error: var(--bg-primary);
154
+ --bg-artifact: var(--bg-primary);
155
+ --bg-artifact-hover: var(--bg-primary);
156
+
157
+ --text-primary: var(--mono-color);
158
+ --text-secondary: var(--mono-color);
159
+ --text-error: var(--mono-color);
160
+ --text-link: var(--mono-color);
161
+
162
+ --border-primary: var(--mono-color);
163
+ --border-error: var(--mono-color);
164
+ --border-cell-failed: var(--mono-color);
165
+
166
+ --shadow: none;
167
+ }
168
+
169
+ :root[data-ui="monocolor"] a {
170
+ color: var(--mono-color);
171
+ }
172
+
173
+ :root[data-ui="monocolor"] .menu-button,
174
+ :root[data-ui="monocolor"] .theme-toggle,
175
+ :root[data-ui="monocolor"] .reset-toggle,
176
+ :root[data-ui="monocolor"] .back-button {
177
+ background: var(--bg-primary);
178
+ color: var(--mono-color);
179
+ border-color: var(--mono-color);
180
+ }
181
+
182
+ :root[data-ui="monocolor"] .menu-button:hover,
183
+ :root[data-ui="monocolor"] .theme-toggle:hover,
184
+ :root[data-ui="monocolor"] .reset-toggle:hover,
185
+ :root[data-ui="monocolor"] .back-button:hover {
186
+ background: var(--bg-primary);
187
+ color: var(--mono-color);
188
+ border-color: var(--mono-color);
189
+ }
190
+
191
+ :root[data-ui="monocolor"] .menu-dropdown {
192
+ background: var(--bg-primary);
193
+ border-color: var(--mono-color);
194
+ box-shadow: none;
195
+ }
196
+
197
+ :root[data-ui="monocolor"] .menu-item {
198
+ color: var(--mono-color);
199
+ border-bottom-color: var(--mono-color);
200
+ }
201
+
202
+ :root[data-ui="monocolor"] .system-info {
203
+ background: var(--bg-primary);
204
+ border-color: var(--mono-color);
205
+ }
206
+
207
+ :root[data-ui="monocolor"] .cell {
208
+ border-color: var(--mono-color);
209
+ background: var(--bg-primary);
210
+ }
211
+
212
+ :root[data-ui="monocolor"] .cell-header {
213
+ background: var(--bg-primary);
214
+ border-bottom-color: var(--mono-color);
215
+ }
216
+
217
+ :root[data-ui="monocolor"] .artifact {
218
+ background: var(--bg-primary);
219
+ border-color: var(--mono-color);
220
+ color: var(--mono-color);
221
+ }
222
+
223
+ :root[data-ui="monocolor"] .artifact:hover {
224
+ background: var(--bg-primary);
225
+ }
226
+
227
+ :root[data-ui="monocolor"] .artifact-preview img,
228
+ :root[data-ui="monocolor"] .artifact-preview svg {
229
+ border-color: var(--mono-color);
230
+ }
231
+
232
+ :root[data-ui="monocolor"] .status-widget {
233
+ background: var(--bg-primary);
234
+ border-color: var(--mono-color);
235
+ color: var(--mono-color);
236
+ }
237
+
238
+ :root[data-ui="monocolor"] .minimap,
239
+ :root[data-ui="monocolor"] .file-explorer,
240
+ :root[data-ui="monocolor"] .tools-widget {
241
+ background: var(--bg-primary);
242
+ border-color: var(--mono-color);
243
+ color: var(--mono-color);
244
+ }
245
+
246
+ :root[data-ui="monocolor"] .cell-code {
247
+ background: var(--bg-primary);
248
+ border-bottom-color: var(--mono-color);
249
+ }
250
+
251
+ :root[data-ui="monocolor"] .tools-title,
252
+ :root[data-ui="monocolor"] .file-explorer-section-title,
253
+ :root[data-ui="monocolor"] .minimap-title {
254
+ color: var(--mono-color);
255
+ border-bottom-color: var(--mono-color);
256
+ }
257
+
258
+ :root[data-ui="monocolor"] .tool-button {
259
+ background: var(--bg-primary);
260
+ border-color: var(--mono-color);
261
+ color: var(--mono-color);
262
+ }
263
+
264
+ :root[data-ui="monocolor"] .tool-button.active {
265
+ border-color: var(--mono-color);
266
+ }
267
+
268
+ :root[data-ui="monocolor"] .file-explorer-item,
269
+ :root[data-ui="monocolor"] .minimap-item {
270
+ color: var(--mono-color);
271
+ }
272
+
273
+ /* Force Pygments code to mono blue on mono bg */
274
+ :root[data-ui="monocolor"] .highlight {
275
+ background: var(--bg-primary) !important;
276
+ color: var(--mono-color) !important;
277
+ }
278
+
279
+ :root[data-ui="monocolor"] .highlight *,
280
+ :root[data-ui="monocolor"] .highlight .hll {
281
+ color: var(--mono-color) !important;
282
+ background: transparent !important;
283
+ border-color: var(--mono-color) !important;
284
+ }
285
+
286
+ /* Default code font + metrics (overridable via frontmatter) */
287
+ :root {
288
+ --code-font-size: 0.95rem;
289
+ --code-line-height: 1.5;
290
+ --code-pad-y: 0.75rem;
291
+ }
292
+
293
+ /* Minimal UI theme overrides base variables for a flatter, 90s look */
294
+ :root[data-ui="none"] {
295
+ --bg-primary: #ffffff;
296
+ --bg-secondary: transparent;
297
+ --bg-tertiary: transparent;
298
+ --bg-code: #f9f9f9;
299
+ --bg-error: #fff0f0;
300
+ --bg-artifact: #f0f7ff;
301
+ --bg-artifact-hover: #e5f1ff;
302
+
303
+ --text-primary: #000000;
304
+ --text-secondary: #222222;
305
+ --text-error: #a00000;
306
+ --text-link: #0000ee;
307
+
308
+ --border-primary: #cccccc;
309
+ --border-error: #cc0000;
310
+ --border-cell-failed: #cc0000;
311
+
312
+ --shadow: none;
313
+ }
314
+
315
+ html {
316
+ overscroll-behavior: none;
317
+ }
318
+
319
+ body {
320
+ font-family: 'Cascadia Mono', 'Cascadia Code', 'JetBrains Mono', 'SF Mono', Monaco, 'Consolas', monospace;
321
+ line-height: 1.4;
322
+ max-width: 1000px;
323
+ margin: 0 auto;
324
+ padding: 15px;
325
+ color: var(--text-primary);
326
+ background: var(--bg-primary);
327
+ transition: background-color 0.2s ease, color 0.2s ease;
328
+ overscroll-behavior: none;
329
+ }
330
+
331
+ /* Minimal "none" UI theme overrides */
332
+ :root[data-ui="none"] body {
333
+ font-family: 'Times New Roman', Times, serif;
334
+ line-height: 1.5;
335
+ max-width: 860px;
336
+ padding: 12px;
337
+ background: #ffffff;
338
+ color: #000000;
339
+ transition: none;
340
+ }
341
+
342
+ /* Two panel layout removed */
343
+
344
+ .controls {
345
+ position: fixed;
346
+ top: 20px;
347
+ right: 20px;
348
+ display: flex;
349
+ flex-direction: column;
350
+ align-items: flex-end;
351
+ gap: 0.25rem;
352
+ z-index: 1000;
353
+ }
354
+
355
+ .controls-buttons {
356
+ display: flex;
357
+ gap: 0.5rem;
358
+ }
359
+
360
+ .menu-button {
361
+ position: relative;
362
+ background: var(--bg-secondary);
363
+ border: 1px solid var(--border-primary);
364
+ padding: 8px 12px;
365
+ border-radius: 2px;
366
+ color: var(--text-secondary);
367
+ cursor: pointer;
368
+ font-family: inherit;
369
+ font-size: 0.9rem;
370
+ user-select: none;
371
+ }
372
+
373
+ /* Keep default control styling when widgets are enabled, even in minimal UI */
374
+ :root[data-ui="none"][data-widgets="on"] .menu-button,
375
+ :root[data-ui="none"][data-widgets="on"] .theme-toggle,
376
+ :root[data-ui="none"][data-widgets="on"] .reset-toggle,
377
+ :root[data-ui="none"][data-widgets="on"] .back-button {
378
+ background: #f6f6f6;
379
+ border: 1px solid #cccccc;
380
+ color: #222222;
381
+ }
382
+
383
+ .menu-button:hover {
384
+ color: var(--text-primary);
385
+ background: var(--bg-tertiary);
386
+ }
387
+
388
+ /* Controls state indicator (top-right) */
389
+ /* Status widget (bottom-right) */
390
+ .status-widget {
391
+ position: fixed;
392
+ right: 20px;
393
+ bottom: 20px;
394
+ width: auto;
395
+ max-width: 260px;
396
+ background: var(--bg-secondary);
397
+ border: 1px solid var(--border-primary);
398
+ border-radius: 2px;
399
+ padding: 6px 8px;
400
+ font-size: 0.8rem;
401
+ color: var(--text-secondary);
402
+ z-index: 100;
403
+ }
404
+
405
+ .status-widget strong {
406
+ color: var(--text-primary);
407
+ }
408
+
409
+ :root[data-ui="none"][data-widgets="on"] .status-widget {
410
+ background: #f6f6f6;
411
+ border-color: #ccc;
412
+ color: #222;
413
+ }
414
+
415
+ :root[data-ui="none"][data-widgets="on"] .menu-button:hover,
416
+ :root[data-ui="none"][data-widgets="on"] .theme-toggle:hover,
417
+ :root[data-ui="none"][data-widgets="on"] .reset-toggle:hover,
418
+ :root[data-ui="none"][data-widgets="on"] .back-button:hover {
419
+ background: #ededed;
420
+ border-color: #bbbbbb;
421
+ color: #000000;
422
+ }
423
+
424
+ .menu-dropdown {
425
+ position: absolute;
426
+ top: 100%;
427
+ right: 0;
428
+ background: var(--bg-secondary);
429
+ border: 1px solid var(--border-primary);
430
+ border-radius: 4px;
431
+ box-shadow: 0 4px 12px var(--shadow);
432
+ min-width: 160px;
433
+ opacity: 0;
434
+ visibility: hidden;
435
+ transform: translateY(-8px);
436
+ transition: all 0.2s ease;
437
+ z-index: 1001;
438
+ margin-top: 4px;
439
+ }
440
+
441
+ :root[data-ui="none"][data-widgets="on"] .menu-dropdown {
442
+ background: #ffffff;
443
+ border: 1px solid #cccccc;
444
+ box-shadow: none;
445
+ }
446
+
447
+ .menu-button.active .menu-dropdown {
448
+ opacity: 1;
449
+ visibility: visible;
450
+ transform: translateY(0);
451
+ }
452
+
453
+ .menu-item {
454
+ display: block;
455
+ padding: 8px 12px;
456
+ color: var(--text-secondary);
457
+ text-decoration: none;
458
+ font-size: 0.85rem;
459
+ border-bottom: 1px solid var(--border-primary);
460
+ cursor: pointer;
461
+ }
462
+
463
+ :root[data-ui="none"] .menu-item {
464
+ color: #000;
465
+ border-bottom: 1px solid #eee;
466
+ }
467
+
468
+ .menu-item:last-child {
469
+ border-bottom: none;
470
+ }
471
+
472
+ .menu-item:hover {
473
+ background: var(--bg-tertiary);
474
+ color: var(--text-primary);
475
+ }
476
+
477
+ .menu-checkbox {
478
+ display: inline-block;
479
+ width: 16px;
480
+ font-family: monospace;
481
+ color: var(--text-link);
482
+ }
483
+
484
+ .theme-toggle,
485
+ .reset-toggle,
486
+ .back-button {
487
+ background: var(--bg-secondary);
488
+ border: 1px solid var(--border-primary);
489
+ padding: 8px 12px;
490
+ border-radius: 4px;
491
+ color: var(--text-secondary);
492
+ cursor: pointer;
493
+ font-family: inherit;
494
+ font-size: 0.9rem;
495
+ user-select: none;
496
+ }
497
+
498
+ .back-button {
499
+ text-decoration: none;
500
+ display: inline-block;
501
+ }
502
+
503
+ .theme-toggle:hover,
504
+ .reset-toggle:hover,
505
+ .back-button:hover {
506
+ color: var(--text-primary);
507
+ background: var(--bg-tertiary);
508
+ }
509
+
510
+ .system-info {
511
+ background: var(--bg-secondary);
512
+ border: 1px solid var(--border-primary);
513
+ border-radius: 4px;
514
+ padding: 8px 12px;
515
+ margin-bottom: 16px;
516
+ font-size: 0.85em;
517
+ color: var(--text-secondary);
518
+ }
519
+
520
+ .system-info-header {
521
+ font-weight: 600;
522
+ color: var(--text-primary);
523
+ margin-bottom: 2px;
524
+ }
525
+
526
+ .system-info-content {
527
+ font-family: monospace;
528
+ }
529
+
530
+ .theme-toggle,
531
+ .reset-toggle {
532
+ background: var(--bg-secondary);
533
+ border: 1px solid var(--border-primary);
534
+ border-radius: 2px;
535
+ /* padding: 0.4rem 0.6rem; */
536
+ cursor: pointer;
537
+ font-family: inherit;
538
+ font-size: 0.8rem;
539
+ color: var(--text-secondary);
540
+ user-select: none;
541
+ transition: all 0.2s ease;
542
+ text-transform: lowercase;
543
+ letter-spacing: 0;
544
+ }
545
+
546
+ .theme-toggle:hover,
547
+ .reset-toggle:hover {
548
+ background: var(--bg-tertiary);
549
+ border-color: var(--text-secondary);
550
+ color: var(--text-primary);
551
+ }
552
+
553
+ .minimap {
554
+ position: fixed;
555
+ bottom: 20px;
556
+ right: 20px;
557
+ width: 220px;
558
+ max-height: 400px;
559
+ background: var(--bg-secondary);
560
+ border: 1px solid var(--border-primary);
561
+ border-radius: 2px;
562
+ padding: 0.5rem;
563
+ font-size: 0.7rem;
564
+ overflow-y: auto;
565
+ z-index: 100;
566
+ opacity: 0.9;
567
+ transition: opacity 0.2s ease;
568
+ }
569
+
570
+ /* Hide widgets and controls when disabled via frontmatter */
571
+ :root[data-widgets="off"] .controls,
572
+ :root[data-widgets="off"] .minimap,
573
+ :root[data-widgets="off"] .file-explorer,
574
+ :root[data-widgets="off"] .tools-widget,
575
+ :root[data-widgets="off"] .status-widget {
576
+ display: none !important;
577
+ }
578
+
579
+ .file-explorer {
580
+ position: fixed;
581
+ bottom: 20px;
582
+ /* default; JS will stack */
583
+ right: 20px;
584
+ left: auto;
585
+ top: auto;
586
+ width: 220px;
587
+ max-height: 400px;
588
+ background: var(--bg-secondary);
589
+ border: 1px solid var(--border-primary);
590
+ border-radius: 2px;
591
+ padding: 0.5rem;
592
+ font-size: 0.7rem;
593
+ overflow-y: auto;
594
+ z-index: 100;
595
+ opacity: 0.9;
596
+ transition: opacity 0.2s ease;
597
+ }
598
+
599
+ /* Drawing overlay */
600
+ .draw-overlay {
601
+ position: fixed;
602
+ top: 0;
603
+ left: 0;
604
+ width: 100vw;
605
+ height: 100vh;
606
+ z-index: 80;
607
+ /* under widgets (100) and controls (1000) */
608
+ display: block;
609
+ pointer-events: none;
610
+ /* enabled only when a tool is active */
611
+ }
612
+
613
+ /* Tools widget */
614
+ .tools-widget {
615
+ position: fixed;
616
+ bottom: 20px;
617
+ /* default; JS will stack */
618
+ right: 20px;
619
+ left: auto;
620
+ top: auto;
621
+ width: 220px;
622
+ background: var(--bg-secondary);
623
+ border: 1px solid var(--border-primary);
624
+ border-radius: 2px;
625
+ padding: 0.5rem;
626
+ font-size: 0.7rem;
627
+ z-index: 100;
628
+ opacity: 0.95;
629
+ }
630
+
631
+ .tools-title {
632
+ font-weight: bold;
633
+ color: var(--text-secondary);
634
+ margin-bottom: 0.5rem;
635
+ padding-bottom: 0.25rem;
636
+ border-bottom: 1px solid var(--border-primary);
637
+ cursor: grab;
638
+ user-select: none;
639
+ }
640
+
641
+ .tools-row {
642
+ display: flex;
643
+ gap: 0.4rem;
644
+ flex-wrap: wrap;
645
+ }
646
+
647
+ .tool-button {
648
+ background: var(--bg-tertiary);
649
+ border: 1px solid var(--border-primary);
650
+ border-radius: 2px;
651
+ padding: 0.25rem 0.4rem;
652
+ cursor: pointer;
653
+ color: var(--text-secondary);
654
+ font-family: inherit;
655
+ font-size: 0.75rem;
656
+ user-select: none;
657
+ }
658
+
659
+ .tool-button:hover {
660
+ color: var(--text-primary);
661
+ }
662
+
663
+ .tool-button.active {
664
+ color: var(--text-primary);
665
+ border-color: var(--text-secondary);
666
+ background: var(--bg-secondary);
667
+ }
668
+
669
+ .minimap:hover,
670
+ .file-explorer:hover {
671
+ opacity: 1;
672
+ }
673
+
674
+ .minimap-title {
675
+ font-weight: bold;
676
+ color: var(--text-secondary);
677
+ margin-bottom: 0.5rem;
678
+ padding-bottom: 0.25rem;
679
+ border-bottom: 1px solid var(--border-primary);
680
+ cursor: grab;
681
+ /* drag handle */
682
+ user-select: none;
683
+ }
684
+
685
+ .minimap-item {
686
+ display: block;
687
+ color: var(--text-secondary);
688
+ text-decoration: none;
689
+ padding: 0.15rem 0;
690
+ border-left: 2px solid transparent;
691
+ padding-left: 0.5rem;
692
+ transition: all 0.2s ease;
693
+ cursor: pointer;
694
+ }
695
+
696
+ .minimap-item:hover {
697
+ color: var(--text-primary);
698
+ border-left-color: var(--text-secondary);
699
+ }
700
+
701
+ .minimap-item.active {
702
+ color: var(--text-primary);
703
+ border-left-color: var(--text-link);
704
+ }
705
+
706
+ .minimap-heading {
707
+ font-weight: normal;
708
+ }
709
+
710
+ .minimap-heading.h1 {
711
+ padding-left: 0.5rem;
712
+ }
713
+
714
+ .minimap-heading.h2 {
715
+ padding-left: 1rem;
716
+ }
717
+
718
+ .minimap-heading.h3 {
719
+ padding-left: 1.5rem;
720
+ }
721
+
722
+ .minimap-heading.h4 {
723
+ padding-left: 2rem;
724
+ }
725
+
726
+ .minimap-heading.h5 {
727
+ padding-left: 2.5rem;
728
+ }
729
+
730
+ .minimap-heading.h6 {
731
+ padding-left: 3rem;
732
+ }
733
+
734
+ .minimap-cell {
735
+ color: var(--text-link);
736
+ opacity: 0.8;
737
+ font-style: italic;
738
+ }
739
+
740
+ .minimap-cell:hover {
741
+ opacity: 1;
742
+ }
743
+
744
+ .file-explorer-title {
745
+ font-weight: bold;
746
+ color: var(--text-secondary);
747
+ margin-bottom: 0.5rem;
748
+ padding-bottom: 0.25rem;
749
+ border-bottom: 1px solid var(--border-primary);
750
+ cursor: grab;
751
+ /* drag handle */
752
+ user-select: none;
753
+ }
754
+
755
+ .file-explorer-section {
756
+ margin-bottom: 0.75rem;
757
+ }
758
+
759
+ .file-explorer-section-title {
760
+ font-weight: bold;
761
+ color: var(--text-secondary);
762
+ font-size: 0.65rem;
763
+ margin-bottom: 0.25rem;
764
+ text-transform: uppercase;
765
+ letter-spacing: 0.5px;
766
+ }
767
+
768
+ .file-explorer-item {
769
+ display: block;
770
+ color: var(--text-secondary);
771
+ text-decoration: none;
772
+ padding: 0.1rem 0;
773
+ margin-left: 0.5rem;
774
+ transition: color 0.2s ease;
775
+ cursor: pointer;
776
+ font-family: monospace;
777
+ }
778
+
779
+ .file-explorer-item:hover {
780
+ color: var(--text-primary);
781
+ }
782
+
783
+ .file-explorer-item.script {
784
+ color: var(--text-link);
785
+ }
786
+
787
+ .file-explorer-item.artifact {
788
+ color: var(--text-secondary);
789
+ opacity: 0.8;
790
+ }
791
+
792
+
793
+ /* Hide widgets on smaller screens */
794
+ @media (max-width: 768px) {
795
+
796
+ .minimap,
797
+ .file-explorer,
798
+ .tools-widget {
799
+ display: none;
800
+ }
801
+ }
802
+
803
+ .cell {
804
+ margin: 1rem 0;
805
+ border: 1px solid var(--border-primary);
806
+ border-radius: 2px;
807
+ overflow: hidden;
808
+ background: var(--bg-secondary);
809
+ }
810
+
811
+ :root[data-ui="none"] .cell {
812
+ margin: 1em 0;
813
+ border: none;
814
+ background: transparent;
815
+ }
816
+
817
+ .cell-header {
818
+ background: var(--bg-secondary);
819
+ padding: 0.5rem 1rem;
820
+ border-bottom: 1px solid var(--border-primary);
821
+ font-family: inherit;
822
+ font-size: 0.85rem;
823
+ }
824
+
825
+ :root[data-ui="none"] .cell-header {
826
+ background: transparent;
827
+ border: none;
828
+ padding: 0;
829
+ font-weight: bold;
830
+ }
831
+
832
+ :root[data-ui="none"] .cell-content {
833
+ padding: 0;
834
+ }
835
+
836
+ :root[data-ui="none"] .copy-button,
837
+ :root[data-ui="none"] .collapse-indicators,
838
+ :root[data-ui="none"] .cell-meta,
839
+ :root[data-ui="none"] .cell-outputs-header {
840
+ display: none !important;
841
+ }
842
+
843
+ :root[data-ui="none"] pre,
844
+ :root[data-ui="none"] code {
845
+ font-family: Menlo, Monaco, 'Courier New', monospace;
846
+ }
847
+
848
+ :root[data-ui="none"] .code-content pre {
849
+ background: #f9f9f9;
850
+ border: 1px solid #ddd;
851
+ padding: 8px;
852
+ }
853
+
854
+ :root[data-ui="none"] .output {
855
+ background: transparent;
856
+ border: none;
857
+ padding: 0.25em 0;
858
+ }
859
+
860
+ color: var(--text-secondary);
861
+ cursor: pointer;
862
+ user-select: none;
863
+ transition: background-color 0.2s ease;
864
+ }
865
+
866
+ .cell-header:hover {
867
+ background: var(--bg-tertiary);
868
+ }
869
+
870
+ .collapse-indicators {
871
+ color: var(--text-secondary);
872
+ font-size: 0.8rem;
873
+ opacity: 0.7;
874
+ }
875
+
876
+ .collapse-indicators span:hover {
877
+ color: var(--text-primary);
878
+ opacity: 1;
879
+ }
880
+
881
+ .cell-code {
882
+ display: block;
883
+ background: var(--bg-code);
884
+ }
885
+
886
+ .cell-code.collapsed {
887
+ display: none;
888
+ }
889
+
890
+ .cell-code pre {
891
+ margin: 0;
892
+ padding: 0.75rem;
893
+ background: var(--bg-code);
894
+ overflow-x: auto;
895
+ color: var(--text-primary);
896
+ }
897
+
898
+ .cell-output {
899
+ padding: 0.75rem;
900
+ /* background: var(--bg-primary); */
901
+ background: var(--bg-secondary);
902
+ }
903
+
904
+ .cell-output.collapsed {
905
+ display: none;
906
+ }
907
+
908
+ .cell-stdout {
909
+ background: var(--bg-tertiary);
910
+ padding: 0.75rem;
911
+ border-radius: 1px;
912
+ /* margin: 0.25rem 0; */
913
+ font-family: inherit;
914
+ font-size: 0.9rem;
915
+ white-space: pre-wrap;
916
+ color: var(--text-primary);
917
+ }
918
+
919
+ .cell-stdout {
920
+ background: var(--bg-tertiary);
921
+ padding: 0.75rem;
922
+ border-radius: 1px;
923
+ font-family: inherit;
924
+ font-size: 0.9rem;
925
+ color: var(--text-primary);
926
+
927
+ /* key bits */
928
+ overflow: auto;
929
+ /* show scrollbars when needed */
930
+ max-width: 100%;
931
+ /* respects whatever layout width you give it */
932
+ }
933
+
934
+ .cell-stdout .stdout-text {
935
+ margin: 0;
936
+ /* reset pre default margin */
937
+ white-space: pre;
938
+ /* keep line breaks, NO wrapping */
939
+ display: inline-block;
940
+ /* shrink-to-content */
941
+ min-width: max-content;
942
+ /* allow very long lines to define intrinsic width */
943
+ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
944
+ tab-size: 2;
945
+ }
946
+
947
+ .cell-stderr {
948
+ background: var(--bg-error);
949
+ border-left: 2px solid var(--border-error);
950
+ padding: 1rem;
951
+ margin: 0.5rem 0;
952
+ font-family: inherit;
953
+ font-size: 0.9rem;
954
+ color: var(--text-error);
955
+ white-space: pre-wrap;
956
+ }
957
+
958
+ .uv-install-logs {
959
+ margin: 0.5rem 0;
960
+ }
961
+
962
+ .uv-logs-header {
963
+ cursor: pointer;
964
+ padding: 0.75rem;
965
+ border-left: 3px solid var(--border-color);
966
+ font-family: inherit;
967
+ font-size: 0.85rem;
968
+ color: var(--text-secondary);
969
+ user-select: none;
970
+ }
971
+
972
+ .uv-logs-content {
973
+ background: var(--bg-secondary);
974
+ padding: 1rem;
975
+ border-left: 3px solid var(--border-color);
976
+ white-space: pre-wrap;
977
+ font-family: monospace;
978
+ font-size: 0.85rem;
979
+ color: var(--text-secondary);
980
+ overflow-x: auto;
981
+ }
982
+
983
+ .cell-artifacts {
984
+ margin: 1rem 0;
985
+ }
986
+
987
+ .cell-artifacts h4 {
988
+ margin: 0 0 0.5rem 0;
989
+ color: var(--text-secondary);
990
+ font-size: 0.9rem;
991
+ }
992
+
993
+ .artifact {
994
+ display: inline-block;
995
+ background: var(--bg-artifact);
996
+ padding: 0.25rem 0.5rem;
997
+ border-radius: 1px;
998
+ margin: 0.25rem 0.5rem 0.25rem 0;
999
+ font-family: inherit;
1000
+ font-size: 0.8rem;
1001
+ color: var(--text-link);
1002
+ text-decoration: none;
1003
+ transition: background-color 0.2s ease;
1004
+ border: 1px solid var(--border-primary);
1005
+ }
1006
+
1007
+ .artifact:hover {
1008
+ background: var(--bg-artifact-hover);
1009
+ }
1010
+
1011
+ .artifact-preview {
1012
+ margin-top: 1rem;
1013
+ }
1014
+
1015
+ .artifact-preview img {
1016
+ max-width: 100%;
1017
+ height: auto;
1018
+ border: 1px solid var(--border-primary);
1019
+ border-radius: 1px;
1020
+ }
1021
+
1022
+ .artifact-preview svg {
1023
+ max-width: 100%;
1024
+ height: auto;
1025
+ border: 1px solid var(--border-primary);
1026
+ border-radius: 1px;
1027
+ display: block;
1028
+ }
1029
+
1030
+ /* Style SVG text elements */
1031
+ .artifact-preview svg g {
1032
+ fill: var(--text-primary) !important;
1033
+ }
1034
+
1035
+ /* Auto-theme SVG elements */
1036
+ .artifact-preview svg {
1037
+ background: transparent;
1038
+ }
1039
+
1040
+ /* Invert SVG images in dark mode */
1041
+ :root[data-theme="dark"] .artifact-preview img[src$=".svg"] {
1042
+ filter: invert(0.9) hue-rotate(180deg);
1043
+ }
1044
+
1045
+ /* Keep SVG images readable in monocolor mode */
1046
+ :root[data-ui="monocolor"] .artifact-preview img[src$=".svg"] {
1047
+ filter: none;
1048
+ }
1049
+
1050
+ /* CSV table styling */
1051
+ .artifact-csv {
1052
+ margin-top: 1rem;
1053
+ overflow-x: auto;
1054
+ }
1055
+
1056
+ .csv-table {
1057
+ width: 100%;
1058
+ border-collapse: collapse;
1059
+ font-size: 0.9rem;
1060
+ background: var(--bg-secondary);
1061
+ border: 1px solid var(--border-primary);
1062
+ border-radius: 1px;
1063
+ }
1064
+
1065
+ .csv-table th,
1066
+ .csv-table td {
1067
+ padding: 0.5rem 0.75rem;
1068
+ text-align: left;
1069
+ border: 1px solid var(--border-primary);
1070
+ }
1071
+
1072
+ .csv-table th {
1073
+ background: var(--bg-tertiary);
1074
+ font-weight: 600;
1075
+ color: var(--text-primary);
1076
+ }
1077
+
1078
+ .csv-table tbody tr:hover {
1079
+ background: var(--bg-artifact-hover);
1080
+ }
1081
+
1082
+ .artifact-csv-error {
1083
+ margin-top: 1rem;
1084
+ padding: 1rem;
1085
+ background: var(--bg-error);
1086
+ color: var(--text-error);
1087
+ border: 1px solid var(--border-error);
1088
+ border-radius: 1px;
1089
+ }
1090
+
1091
+ .cell-failed {
1092
+ border-color: var(--border-cell-failed);
1093
+ }
1094
+
1095
+ .cell-failed .cell-header {
1096
+ background: var(--bg-error);
1097
+ color: var(--text-error);
1098
+ }
1099
+
1100
+ .cell-commented {
1101
+ opacity: 0.6;
1102
+ border-style: dashed;
1103
+ }
1104
+
1105
+ .cell-commented .cell-header {
1106
+ background: var(--bg-secondary);
1107
+ color: var(--text-secondary);
1108
+ font-style: italic;
1109
+ }
1110
+
1111
+ .run-btn {
1112
+ background: var(--bg-tertiary);
1113
+ border: 1px solid var(--border-primary);
1114
+ padding: 2px 6px;
1115
+ border-radius: 2px;
1116
+ color: var(--text-secondary);
1117
+ cursor: pointer;
1118
+ font-size: 0.75em;
1119
+ font-family: inherit;
1120
+ margin-left: 4px;
1121
+ }
1122
+
1123
+ .run-btn:hover {
1124
+ color: var(--text-primary);
1125
+ background: var(--bg-primary);
1126
+ }
1127
+
1128
+ .run-btn:disabled {
1129
+ opacity: 0.6;
1130
+ cursor: not-allowed;
1131
+ }
1132
+
1133
+ .copy-btn {
1134
+ background: var(--bg-tertiary);
1135
+ border: 1px solid var(--border-primary);
1136
+ padding: 2px 6px;
1137
+ border-radius: 2px;
1138
+ color: var(--text-secondary);
1139
+ cursor: pointer;
1140
+ font-size: 0.75em;
1141
+ font-family: inherit;
1142
+ margin-left: 4px;
1143
+ }
1144
+
1145
+ .copy-btn:hover {
1146
+ color: var(--text-primary);
1147
+ background: var(--bg-primary);
1148
+ }
1149
+
1150
+ .copy-btn:disabled {
1151
+ opacity: 0.6;
1152
+ cursor: not-allowed;
1153
+ }
1154
+
1155
+ .copy-btn.copied {
1156
+ color: #4caf50;
1157
+ background: var(--bg-primary);
1158
+ border-color: #4caf50;
1159
+ transition: all 0.2s ease;
1160
+ }
1161
+
1162
+ .raw-btn {
1163
+ background: var(--bg-tertiary);
1164
+ border: 1px solid var(--border-primary);
1165
+ padding: 2px 6px;
1166
+ border-radius: 2px;
1167
+ color: var(--text-secondary);
1168
+ cursor: pointer;
1169
+ font-size: 0.75em;
1170
+ font-family: inherit;
1171
+ margin-left: 4px;
1172
+ text-decoration: none;
1173
+ display: inline-block;
1174
+ }
1175
+
1176
+ .raw-btn:hover {
1177
+ color: var(--text-primary);
1178
+ background: var(--bg-primary);
1179
+ text-decoration: none;
1180
+ }
1181
+
1182
+ .github-btn {
1183
+ background: var(--bg-tertiary);
1184
+ border: 1px solid var(--border-primary);
1185
+ padding: 2px 6px;
1186
+ border-radius: 2px;
1187
+ color: var(--text-secondary);
1188
+ cursor: pointer;
1189
+ font-size: 0.75em;
1190
+ font-family: inherit;
1191
+ margin-left: 4px;
1192
+ text-decoration: none;
1193
+ display: inline-block;
1194
+ }
1195
+
1196
+ .github-btn:hover {
1197
+ color: var(--text-primary);
1198
+ background: var(--bg-primary);
1199
+ text-decoration: none;
1200
+ }
1201
+
1202
+ .hf-btn {
1203
+ background: var(--bg-tertiary);
1204
+ border: 1px solid var(--border-primary);
1205
+ padding: 2px 6px;
1206
+ border-radius: 2px;
1207
+ color: var(--text-secondary);
1208
+ cursor: pointer;
1209
+ font-size: 0.75em;
1210
+ font-family: inherit;
1211
+ margin-left: 4px;
1212
+ text-decoration: none;
1213
+ display: inline-block;
1214
+ }
1215
+
1216
+ .hf-btn:hover {
1217
+ color: var(--text-primary);
1218
+ background: var(--bg-primary);
1219
+ text-decoration: none;
1220
+ }
1221
+
1222
+ .output-stale {
1223
+ opacity: 0.5;
1224
+ position: relative;
1225
+ }
1226
+
1227
+ .output-stale::after {
1228
+ content: '⏳ updating...';
1229
+ position: absolute;
1230
+ top: 8px;
1231
+ right: 8px;
1232
+ background: var(--bg-secondary);
1233
+ padding: 4px 8px;
1234
+ border-radius: 2px;
1235
+ font-size: 0.75em;
1236
+ color: var(--text-secondary);
1237
+ border: 1px solid var(--border-primary);
1238
+ }
1239
+
1240
+ h1,
1241
+ h2,
1242
+ h3,
1243
+ h4,
1244
+ h5,
1245
+ h6 {
1246
+ margin-top: 1.5rem;
1247
+ margin-bottom: 0.75rem;
1248
+ color: var(--text-primary);
1249
+ }
1250
+
1251
+ h1 {
1252
+ margin-top: 0;
1253
+ margin-bottom: 1rem;
1254
+ }
1255
+
1256
+ p {
1257
+ margin: 0.75rem 0;
1258
+ color: var(--text-primary);
1259
+ }
1260
+
1261
+ a {
1262
+ color: var(--text-link);
1263
+ }
1264
+
1265
+ img {
1266
+ max-width: 100%;
1267
+ height: auto;
1268
+ border-radius: 1px;
1269
+ box-shadow: none;
1270
+ }
1271
+
1272
+ pre,
1273
+ code {
1274
+ font-family: 'Cascadia Mono', 'Cascadia Code', 'JetBrains Mono', 'SF Mono', Monaco, 'Consolas', monospace;
1275
+ font-size: var(--code-font-size);
1276
+ }
1277
+
1278
+ .code-wrap {
1279
+ position: relative;
1280
+ }
1281
+
1282
+ .code-line-highlight {
1283
+ display: none;
1284
+ position: absolute;
1285
+ left: 0;
1286
+ right: 0;
1287
+ height: 1.5em;
1288
+ background: rgba(255, 235, 170, 0.35);
1289
+ pointer-events: none;
1290
+ border-left: 3px solid #f4c542;
1291
+ }
1292
+
1293
+ .line-number {
1294
+ cursor: pointer;
1295
+ text-decoration: none;
1296
+ color: var(--text-secondary);
1297
+ padding: 0 0.25rem;
1298
+ }
1299
+
1300
+ .line-number.selected {
1301
+ background: rgba(255, 235, 170, 0.4);
1302
+ color: var(--text-primary);
1303
+ }
1304
+
1305
+ /* Line numbers */
1306
+ .highlight-with-lines {
1307
+ display: flex;
1308
+ }
1309
+
1310
+ .line-numbers {
1311
+ background: var(--bg-tertiary);
1312
+ padding: var(--code-pad-y) 0.5rem;
1313
+ font-family: 'Cascadia Mono', 'Cascadia Code', 'JetBrains Mono', 'SF Mono', Monaco, 'Consolas', monospace;
1314
+ font-size: var(--code-font-size);
1315
+ line-height: var(--code-line-height);
1316
+ color: var(--text-secondary);
1317
+ user-select: none;
1318
+ text-align: right;
1319
+ border-right: 1px solid var(--border-primary);
1320
+ }
1321
+
1322
+ .line-numbers .line-number {
1323
+ display: block;
1324
+ line-height: var(--code-line-height);
1325
+ }
1326
+
1327
+ .highlight-with-lines .highlight {
1328
+ flex: 1;
1329
+ }
1330
+
1331
+ .highlight .hll {
1332
+ background-color: transparent;
1333
+ }
1334
+
1335
+ /* don't conflict with our highlight */
1336
+ .highlight pre {
1337
+ white-space: pre;
1338
+ margin: 0;
1339
+ padding: var(--code-pad-y) 0.75rem;
1340
+ line-height: var(--code-line-height);
1341
+ }
1342
+
1343
+ /* Collapsed code styling */
1344
+ .cell-code.collapsed {
1345
+ display: none;
1346
+ }
1347
+
1348
+ .cell-code.expanded {
1349
+ display: block;
1350
+ }
1351
+
1352
+ {
1353
+ % if config.collapse_code %
1354
+ }
1355
+
1356
+ .cell-code {
1357
+ display: none;
1358
+ }
1359
+
1360
+ {
1361
+ % else %
1362
+ }
1363
+
1364
+ .cell-code {
1365
+ display: block;
1366
+ border-bottom: 1px solid var(--border-primary);
1367
+ }
1368
+
1369
+ {
1370
+ % endif %
1371
+ }
1372
+
1373
+ {
1374
+ {
1375
+ pygments_css
1376
+ }
1377
+ }
1378
+
1379
+ /* Ensure our code metrics override Pygments defaults */
1380
+ .highlight pre {
1381
+ white-space: pre;
1382
+ margin: 0;
1383
+ padding: var(--code-pad-y) 0.75rem !important;
1384
+ line-height: var(--code-line-height) !important;
1385
+ font-size: var(--code-font-size) !important;
1386
+ font-family: 'Cascadia Mono', 'Cascadia Code', 'JetBrains Mono', 'SF Mono', Monaco, 'Consolas', monospace !important;
1387
+ border: none;
1388
+ }
1389
+
1390
+ .line-numbers {
1391
+ line-height: var(--code-line-height) !important;
1392
+ }
1393
+
1394
+ .line-numbers .line-number {
1395
+ line-height: var(--code-line-height) !important;
1396
+ }
1397
+
1398
+ /* Custom CSS from frontmatter */
1399
+ {
1400
+ {
1401
+ config.custom_css
1402
+ }
1403
+ }
1404
+
1405
+ {
1406
+ # Override code font size from frontmatter (accept number as px) #
1407
+ }
1408
+
1409
+ {
1410
+ % if config.code_font_size is not none %
1411
+ }
1412
+
1413
+ {
1414
+ % if config.code_font_size is string %
1415
+ }
1416
+
1417
+ :root {
1418
+ --code-font-size: {
1419
+ {
1420
+ config.code_font_size
1421
+ }
1422
+ }
1423
+
1424
+ ;
1425
+ }
1426
+
1427
+ {
1428
+ % else %
1429
+ }
1430
+
1431
+ :root {
1432
+ --code-font-size: {
1433
+ {
1434
+ config.code_font_size
1435
+ }
1436
+ }
1437
+
1438
+ px;
1439
+ }
1440
+
1441
+ {
1442
+ % endif %
1443
+ }
1444
+
1445
+ {
1446
+ % endif %
1447
+ }
1448
+
1449
+ /* Cursor for tools */
1450
+ body[data-tool="arrow"] .main-content {
1451
+ cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23e53935" stroke-width="2"><path d="M12 19l7-7 3 3-7 7-3-3z"/><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"/><path d="M2 2l7.586 7.586"/><circle cx="11" cy="11" r="2"/></svg>') 12 12, crosshair;
1452
+ }
1453
+
1454
+ body[data-tool="pen"] .main-content {
1455
+ cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23e53935" stroke-width="2"><path d="M12 19l7-7 3 3-7 7-3-3z"/><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"/><circle cx="4" cy="20" r="2" fill="%23e53935"/></svg>') 4 20, pointer;
1456
+ }
1457
+
1458
+ body[data-tool="eraser"] .main-content {
1459
+ cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23e53935" stroke-width="2"><path d="M20 20H7l-7-7 7-7h13v14z"/><path d="M13 13l7-7"/><path d="M13 13L9 9"/></svg>') 12 12, auto;
1460
+ }
1461
+
1462
+ /* Color picker styles */
1463
+ .tools-section-title {
1464
+ font-weight: bold;
1465
+ color: var(--text-secondary);
1466
+ font-size: 0.65rem;
1467
+ margin: 0.75rem 0 0.5rem 0;
1468
+ text-transform: uppercase;
1469
+ letter-spacing: 0.5px;
1470
+ }
1471
+
1472
+ .color-row {
1473
+ display: grid;
1474
+ grid-template-columns: repeat(6, 1fr);
1475
+ gap: 0.25rem;
1476
+ margin-bottom: 0.5rem;
1477
+ }
1478
+
1479
+ .color-swatch {
1480
+ width: 18px;
1481
+ height: 18px;
1482
+ border: 2px solid var(--border-primary);
1483
+ border-radius: 3px;
1484
+ cursor: pointer;
1485
+ transition: all 0.2s ease;
1486
+ position: relative;
1487
+ }
1488
+
1489
+ .color-swatch:hover {
1490
+ transform: scale(1.1);
1491
+ border-color: var(--text-secondary);
1492
+ }
1493
+
1494
+ .color-swatch.selected {
1495
+ border-color: var(--text-primary);
1496
+ box-shadow: 0 0 0 2px var(--text-link);
1497
+ }
1498
+
1499
+ .color-swatch.selected::after {
1500
+ content: '✓';
1501
+ position: absolute;
1502
+ top: 50%;
1503
+ left: 50%;
1504
+ transform: translate(-50%, -50%);
1505
+ color: white;
1506
+ font-size: 10px;
1507
+ font-weight: bold;
1508
+ text-shadow: 1px 1px 1px black;
1509
+ }
1510
+
1511
+ .color-input {
1512
+ width: 24px;
1513
+ height: 24px;
1514
+ border: 2px solid var(--border-primary);
1515
+ border-radius: 3px;
1516
+ cursor: pointer;
1517
+ background: none;
1518
+ padding: 0;
1519
+ grid-column: span 2;
1520
+ justify-self: center;
1521
+ }
1522
+
1523
+ .color-input:hover {
1524
+ border-color: var(--text-secondary);
1525
+ }
1526
+
1527
+ /* Thickness slider styles */
1528
+ .thickness-row {
1529
+ display: flex;
1530
+ align-items: center;
1531
+ gap: 0.5rem;
1532
+ margin-top: 0.75rem;
1533
+ }
1534
+
1535
+ .thickness-slider {
1536
+ flex: 1;
1537
+ -webkit-appearance: none;
1538
+ appearance: none;
1539
+ height: 4px;
1540
+ background: var(--border-primary);
1541
+ border-radius: 2px;
1542
+ outline: none;
1543
+ opacity: 0.7;
1544
+ transition: opacity 0.2s;
1545
+ }
1546
+
1547
+ .thickness-slider:hover {
1548
+ opacity: 1;
1549
+ }
1550
+
1551
+ .thickness-slider::-webkit-slider-thumb {
1552
+ -webkit-appearance: none;
1553
+ appearance: none;
1554
+ width: 12px;
1555
+ height: 12px;
1556
+ background: var(--text-link);
1557
+ border-radius: 50%;
1558
+ cursor: pointer;
1559
+ }
1560
+
1561
+ .thickness-slider::-moz-range-thumb {
1562
+ width: 12px;
1563
+ height: 12px;
1564
+ background: var(--text-link);
1565
+ border-radius: 50%;
1566
+ cursor: pointer;
1567
+ border: none;
1568
+ }
1569
+
1570
+ .thickness-value {
1571
+ font-size: 0.7rem;
1572
+ color: var(--text-secondary);
1573
+ min-width: 20px;
1574
+ text-align: right;
1575
+ }
1576
+
1577
+ .highlight {
1578
+ background: none !important;
1579
+ }
1580
+
1581
+ /* Loading animations */
1582
+ .loading-spinner {
1583
+ display: inline-block;
1584
+ width: 16px;
1585
+ height: 16px;
1586
+ border: 2px solid var(--border-primary);
1587
+ border-radius: 50%;
1588
+ border-top-color: var(--text-link);
1589
+ animation: spin 1s linear infinite;
1590
+ margin-right: 8px;
1591
+ vertical-align: middle;
1592
+ }
1593
+
1594
+ @keyframes spin {
1595
+ to {
1596
+ transform: rotate(360deg);
1597
+ }
1598
+ }
1599
+
1600
+ .loading-skeleton {
1601
+ display: inline-block;
1602
+ background: var(--bg-tertiary);
1603
+ background: linear-gradient(90deg,
1604
+ var(--bg-tertiary) 25%,
1605
+ var(--bg-secondary) 50%,
1606
+ var(--bg-tertiary) 75%);
1607
+ background-size: 200% 100%;
1608
+ animation: loading-shimmer 2s ease-in-out infinite;
1609
+ border-radius: 2px;
1610
+ height: 1em;
1611
+ width: 80px;
1612
+ vertical-align: middle;
1613
+ }
1614
+
1615
+ @keyframes loading-shimmer {
1616
+ 0% {
1617
+ background-position: -200% 0;
1618
+ }
1619
+
1620
+ 100% {
1621
+ background-position: 200% 0;
1622
+ }
1623
+ }
1624
+
1625
+ /* Loading state for cell output */
1626
+ .cell-output:has(.loading-spinner) {
1627
+ opacity: 0.7;
1628
+ background: var(--bg-secondary);
1629
+ /* border-left: 3px solid var(--text-link); */
1630
+ }
1631
  </style>
1632
  <script>
1633
  // --- Drag utilities ---
rotary/results/artifacts/combine/latency.svg CHANGED

Git LFS Details

  • SHA256: 1073fb7d2fda354b1fcc8c64879bfd105a9e36e75f5ab25c8a5cb53277099549
  • Pointer size: 130 Bytes
  • Size of remote file: 37.9 kB

Git LFS Details

  • SHA256: b5f227e4c6029d72861d1a351c2c4353a8589dfeadaaf2aa034c7c28ec49a733
  • Pointer size: 130 Bytes
  • Size of remote file: 37.9 kB
rotary/results/combined_results.html CHANGED
The diff for this file is too large to render. See raw diff