zsol-bench 1.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. zsol_bench-1.0.1/.git +1 -0
  2. zsol_bench-1.0.1/.gitignore +38 -0
  3. zsol_bench-1.0.1/.pre-commit-config.yaml +16 -0
  4. zsol_bench-1.0.1/.python-version +1 -0
  5. zsol_bench-1.0.1/CLAUDE.md +68 -0
  6. zsol_bench-1.0.1/CONTRIBUTING.md +111 -0
  7. zsol_bench-1.0.1/LICENSE +201 -0
  8. zsol_bench-1.0.1/PKG-INFO +157 -0
  9. zsol_bench-1.0.1/README.md +136 -0
  10. zsol_bench-1.0.1/SECURITY.md +24 -0
  11. zsol_bench-1.0.1/THIRD_PARTY_NOTICES.txt +339 -0
  12. zsol_bench-1.0.1/docker/Dockerfile +81 -0
  13. zsol_bench-1.0.1/docker/entrypoint.sh +61 -0
  14. zsol_bench-1.0.1/docs/definition.md +249 -0
  15. zsol_bench-1.0.1/docs/solution.md +294 -0
  16. zsol_bench-1.0.1/docs/trace.md +165 -0
  17. zsol_bench-1.0.1/docs/workload.md +184 -0
  18. zsol_bench-1.0.1/examples/cuda_cpp/flux_rope/definition.json +70 -0
  19. zsol_bench-1.0.1/examples/cuda_cpp/flux_rope/kernel.cu +49 -0
  20. zsol_bench-1.0.1/examples/cuda_cpp/flux_rope/reference.py +72 -0
  21. zsol_bench-1.0.1/examples/cuda_cpp/flux_rope/solution_cuda.json +22 -0
  22. zsol_bench-1.0.1/examples/cuda_cpp/flux_rope/workload.jsonl +3 -0
  23. zsol_bench-1.0.1/examples/cuda_cpp/rmsnorm/definition.json +45 -0
  24. zsol_bench-1.0.1/examples/cuda_cpp/rmsnorm/kernel.cu +166 -0
  25. zsol_bench-1.0.1/examples/cuda_cpp/rmsnorm/kernel.h +29 -0
  26. zsol_bench-1.0.1/examples/cuda_cpp/rmsnorm/main.cpp +65 -0
  27. zsol_bench-1.0.1/examples/cuda_cpp/rmsnorm/reference.py +14 -0
  28. zsol_bench-1.0.1/examples/cuda_cpp/rmsnorm/solution_cuda.json +31 -0
  29. zsol_bench-1.0.1/examples/cuda_cpp/rmsnorm/workload.jsonl +14 -0
  30. zsol_bench-1.0.1/examples/cudnn/softmax/definition.json +32 -0
  31. zsol_bench-1.0.1/examples/cudnn/softmax/main.cu +53 -0
  32. zsol_bench-1.0.1/examples/cudnn/softmax/reference.py +5 -0
  33. zsol_bench-1.0.1/examples/cudnn/softmax/solution_cudnn.json +25 -0
  34. zsol_bench-1.0.1/examples/cudnn/softmax/workload.jsonl +3 -0
  35. zsol_bench-1.0.1/examples/cute_dsl/jamba_attn_proj/definition.json +59 -0
  36. zsol_bench-1.0.1/examples/cute_dsl/jamba_attn_proj/kernel.py +81 -0
  37. zsol_bench-1.0.1/examples/cute_dsl/jamba_attn_proj/reference.py +37 -0
  38. zsol_bench-1.0.1/examples/cute_dsl/jamba_attn_proj/solution_cute_dsl.json +18 -0
  39. zsol_bench-1.0.1/examples/cute_dsl/jamba_attn_proj/workload.jsonl +3 -0
  40. zsol_bench-1.0.1/examples/cutile/jamba_attn_proj/definition.json +59 -0
  41. zsol_bench-1.0.1/examples/cutile/jamba_attn_proj/kernel.py +78 -0
  42. zsol_bench-1.0.1/examples/cutile/jamba_attn_proj/reference.py +37 -0
  43. zsol_bench-1.0.1/examples/cutile/jamba_attn_proj/solution_cutile.json +18 -0
  44. zsol_bench-1.0.1/examples/cutile/jamba_attn_proj/workload.jsonl +3 -0
  45. zsol_bench-1.0.1/examples/cutlass/gemm/definition.json +42 -0
  46. zsol_bench-1.0.1/examples/cutlass/gemm/kernel.cu +45 -0
  47. zsol_bench-1.0.1/examples/cutlass/gemm/kernel.h +9 -0
  48. zsol_bench-1.0.1/examples/cutlass/gemm/main.cpp +21 -0
  49. zsol_bench-1.0.1/examples/cutlass/gemm/reference.py +5 -0
  50. zsol_bench-1.0.1/examples/cutlass/gemm/solution_cutlass.json +33 -0
  51. zsol_bench-1.0.1/examples/cutlass/gemm/workload.jsonl +3 -0
  52. zsol_bench-1.0.1/examples/pytorch/gemma3_swiglu/definition.json +63 -0
  53. zsol_bench-1.0.1/examples/pytorch/gemma3_swiglu/kernel.py +8 -0
  54. zsol_bench-1.0.1/examples/pytorch/gemma3_swiglu/reference.py +40 -0
  55. zsol_bench-1.0.1/examples/pytorch/gemma3_swiglu/solution_python.json +18 -0
  56. zsol_bench-1.0.1/examples/pytorch/gemma3_swiglu/workload.jsonl +3 -0
  57. zsol_bench-1.0.1/examples/pytorch/linear_backward/definition.json +20 -0
  58. zsol_bench-1.0.1/examples/pytorch/linear_backward/kernel.py +7 -0
  59. zsol_bench-1.0.1/examples/pytorch/linear_backward/reference.py +16 -0
  60. zsol_bench-1.0.1/examples/pytorch/linear_backward/solution_python.json +18 -0
  61. zsol_bench-1.0.1/examples/pytorch/linear_backward/workload.jsonl +3 -0
  62. zsol_bench-1.0.1/examples/triton/nemotron_rms_norm/definition.json +63 -0
  63. zsol_bench-1.0.1/examples/triton/nemotron_rms_norm/kernel.py +40 -0
  64. zsol_bench-1.0.1/examples/triton/nemotron_rms_norm/reference.py +20 -0
  65. zsol_bench-1.0.1/examples/triton/nemotron_rms_norm/solution_triton.json +18 -0
  66. zsol_bench-1.0.1/examples/triton/nemotron_rms_norm/workload.jsonl +3 -0
  67. zsol_bench-1.0.1/examples/triton/olmo3_post_norm/definition.json +63 -0
  68. zsol_bench-1.0.1/examples/triton/olmo3_post_norm/kernel.py +36 -0
  69. zsol_bench-1.0.1/examples/triton/olmo3_post_norm/reference.py +46 -0
  70. zsol_bench-1.0.1/examples/triton/olmo3_post_norm/solution_triton.json +18 -0
  71. zsol_bench-1.0.1/examples/triton/olmo3_post_norm/workload.jsonl +3 -0
  72. zsol_bench-1.0.1/examples/triton/rmsnorm/definition.json +45 -0
  73. zsol_bench-1.0.1/examples/triton/rmsnorm/kernel.py +50 -0
  74. zsol_bench-1.0.1/examples/triton/rmsnorm/reference.py +14 -0
  75. zsol_bench-1.0.1/examples/triton/rmsnorm/solution_triton.json +26 -0
  76. zsol_bench-1.0.1/examples/triton/rmsnorm/workload.jsonl +14 -0
  77. zsol_bench-1.0.1/pyproject.toml +75 -0
  78. zsol_bench-1.0.1/scripts/download_data.sh +10 -0
  79. zsol_bench-1.0.1/scripts/download_solexecbench.py +73 -0
  80. zsol_bench-1.0.1/scripts/run_dataset.py +567 -0
  81. zsol_bench-1.0.1/scripts/run_docker.sh +90 -0
  82. zsol_bench-1.0.1/src/sol_execbench/__init__.py +89 -0
  83. zsol_bench-1.0.1/src/sol_execbench/cli/__init__.py +18 -0
  84. zsol_bench-1.0.1/src/sol_execbench/cli/main.py +394 -0
  85. zsol_bench-1.0.1/src/sol_execbench/core/__init__.py +75 -0
  86. zsol_bench-1.0.1/src/sol_execbench/core/bench/__init__.py +16 -0
  87. zsol_bench-1.0.1/src/sol_execbench/core/bench/clock_lock.py +240 -0
  88. zsol_bench-1.0.1/src/sol_execbench/core/bench/config/__init__.py +21 -0
  89. zsol_bench-1.0.1/src/sol_execbench/core/bench/config/benchmark_config.py +39 -0
  90. zsol_bench-1.0.1/src/sol_execbench/core/bench/config/device_config.py +57 -0
  91. zsol_bench-1.0.1/src/sol_execbench/core/bench/correctness.py +149 -0
  92. zsol_bench-1.0.1/src/sol_execbench/core/bench/io.py +656 -0
  93. zsol_bench-1.0.1/src/sol_execbench/core/bench/reward_hack.py +139 -0
  94. zsol_bench-1.0.1/src/sol_execbench/core/bench/timing.py +263 -0
  95. zsol_bench-1.0.1/src/sol_execbench/core/bench/utils.py +79 -0
  96. zsol_bench-1.0.1/src/sol_execbench/core/data/__init__.py +90 -0
  97. zsol_bench-1.0.1/src/sol_execbench/core/data/base_model.py +32 -0
  98. zsol_bench-1.0.1/src/sol_execbench/core/data/definition.py +575 -0
  99. zsol_bench-1.0.1/src/sol_execbench/core/data/dtypes.py +109 -0
  100. zsol_bench-1.0.1/src/sol_execbench/core/data/json_utils.py +157 -0
  101. zsol_bench-1.0.1/src/sol_execbench/core/data/shapes.py +82 -0
  102. zsol_bench-1.0.1/src/sol_execbench/core/data/solution.py +417 -0
  103. zsol_bench-1.0.1/src/sol_execbench/core/data/trace.py +218 -0
  104. zsol_bench-1.0.1/src/sol_execbench/core/data/workload.py +143 -0
  105. zsol_bench-1.0.1/src/sol_execbench/core/utils.py +113 -0
  106. zsol_bench-1.0.1/src/sol_execbench/driver/__init__.py +18 -0
  107. zsol_bench-1.0.1/src/sol_execbench/driver/problem_packager.py +227 -0
  108. zsol_bench-1.0.1/src/sol_execbench/driver/templates/build_ext.py +71 -0
  109. zsol_bench-1.0.1/src/sol_execbench/driver/templates/eval_driver.py +682 -0
  110. zsol_bench-1.0.1/src/sol_execbench/sol_score.py +24 -0
  111. zsol_bench-1.0.1/tests/conftest.py +66 -0
  112. zsol_bench-1.0.1/tests/docker/dependencies/_cutedsl_kernels.py +78 -0
  113. zsol_bench-1.0.1/tests/docker/dependencies/test_cuda.py +92 -0
  114. zsol_bench-1.0.1/tests/docker/dependencies/test_cudnn.py +95 -0
  115. zsol_bench-1.0.1/tests/docker/dependencies/test_cudnn_frontend.py +81 -0
  116. zsol_bench-1.0.1/tests/docker/dependencies/test_cutedsl.py +43 -0
  117. zsol_bench-1.0.1/tests/docker/dependencies/test_cutile.py +74 -0
  118. zsol_bench-1.0.1/tests/docker/dependencies/test_cutlass.py +95 -0
  119. zsol_bench-1.0.1/tests/docker/dependencies/test_triton.py +20 -0
  120. zsol_bench-1.0.1/tests/examples/test_examples.py +296 -0
  121. zsol_bench-1.0.1/tests/samples/rmsnorm/solution_hack_lazy_output.json +18 -0
  122. zsol_bench-1.0.1/tests/samples/rmsnorm/solution_hack_monkey_patch.json +18 -0
  123. zsol_bench-1.0.1/tests/samples/rmsnorm/solution_hack_stream_injection.json +18 -0
  124. zsol_bench-1.0.1/tests/samples/rmsnorm/solution_hack_thread_injection.json +18 -0
  125. zsol_bench-1.0.1/tests/sol_execbench/core/__init__.py +15 -0
  126. zsol_bench-1.0.1/tests/sol_execbench/core/bench/__init__.py +15 -0
  127. zsol_bench-1.0.1/tests/sol_execbench/core/bench/test_clock_lock.py +407 -0
  128. zsol_bench-1.0.1/tests/sol_execbench/core/bench/test_correctness.py +667 -0
  129. zsol_bench-1.0.1/tests/sol_execbench/core/bench/test_io.py +867 -0
  130. zsol_bench-1.0.1/tests/sol_execbench/core/bench/test_make_eval_clock_warn.py +102 -0
  131. zsol_bench-1.0.1/tests/sol_execbench/core/bench/test_reward_hack.py +170 -0
  132. zsol_bench-1.0.1/tests/sol_execbench/core/bench/test_timing.py +182 -0
  133. zsol_bench-1.0.1/tests/sol_execbench/core/bench/test_utils.py +17 -0
  134. zsol_bench-1.0.1/tests/sol_execbench/core/data/__init__.py +15 -0
  135. zsol_bench-1.0.1/tests/sol_execbench/core/data/test_definition.py +129 -0
  136. zsol_bench-1.0.1/tests/sol_execbench/core/data/test_dtypes.py +110 -0
  137. zsol_bench-1.0.1/tests/sol_execbench/core/data/test_solution.py +148 -0
  138. zsol_bench-1.0.1/tests/sol_execbench/core/data/test_workload.py +56 -0
  139. zsol_bench-1.0.1/tests/sol_execbench/driver/test_build_ext.py +283 -0
  140. zsol_bench-1.0.1/tests/sol_execbench/driver/test_eval_driver.py +624 -0
  141. zsol_bench-1.0.1/tests/sol_execbench/driver/test_problem_packager.py +339 -0
  142. zsol_bench-1.0.1/tests/sol_execbench/samples/custom_inputs_matmul/definition.json +18 -0
  143. zsol_bench-1.0.1/tests/sol_execbench/samples/custom_inputs_matmul/solution_python.json +18 -0
  144. zsol_bench-1.0.1/tests/sol_execbench/samples/custom_inputs_matmul/workload.jsonl +3 -0
  145. zsol_bench-1.0.1/tests/sol_execbench/samples/evil_lazy_output/kernel.py +30 -0
  146. zsol_bench-1.0.1/tests/sol_execbench/samples/evil_lazy_output/solution.json +15 -0
  147. zsol_bench-1.0.1/tests/sol_execbench/samples/evil_monkey_patch/kernel.py +31 -0
  148. zsol_bench-1.0.1/tests/sol_execbench/samples/evil_monkey_patch/solution.json +15 -0
  149. zsol_bench-1.0.1/tests/sol_execbench/samples/evil_thread_inject/kernel.py +29 -0
  150. zsol_bench-1.0.1/tests/sol_execbench/samples/evil_thread_inject/solution.json +15 -0
  151. zsol_bench-1.0.1/tests/sol_execbench/samples/flux_rope/definition.json +70 -0
  152. zsol_bench-1.0.1/tests/sol_execbench/samples/flux_rope/solution_cuda.json +22 -0
  153. zsol_bench-1.0.1/tests/sol_execbench/samples/flux_rope/workload.jsonl +3 -0
  154. zsol_bench-1.0.1/tests/sol_execbench/samples/gemma3_swiglu/definition.json +63 -0
  155. zsol_bench-1.0.1/tests/sol_execbench/samples/gemma3_swiglu/solution_python.json +18 -0
  156. zsol_bench-1.0.1/tests/sol_execbench/samples/gemma3_swiglu/workload.jsonl +3 -0
  157. zsol_bench-1.0.1/tests/sol_execbench/samples/gqa_paged_decode/config.json +1 -0
  158. zsol_bench-1.0.1/tests/sol_execbench/samples/gqa_paged_decode/definition.json +107 -0
  159. zsol_bench-1.0.1/tests/sol_execbench/samples/gqa_paged_decode/solution.json +19 -0
  160. zsol_bench-1.0.1/tests/sol_execbench/samples/gqa_paged_decode/workload.jsonl +2 -0
  161. zsol_bench-1.0.1/tests/sol_execbench/samples/jamba_attn_proj/definition.json +59 -0
  162. zsol_bench-1.0.1/tests/sol_execbench/samples/jamba_attn_proj/solution_cute_dsl.json +18 -0
  163. zsol_bench-1.0.1/tests/sol_execbench/samples/jamba_attn_proj/solution_cutile.json +18 -0
  164. zsol_bench-1.0.1/tests/sol_execbench/samples/jamba_attn_proj/workload.jsonl +3 -0
  165. zsol_bench-1.0.1/tests/sol_execbench/samples/linear_backward/definition.json +20 -0
  166. zsol_bench-1.0.1/tests/sol_execbench/samples/linear_backward/solution_python.json +18 -0
  167. zsol_bench-1.0.1/tests/sol_execbench/samples/linear_backward/workload.jsonl +3 -0
  168. zsol_bench-1.0.1/tests/sol_execbench/samples/nemotron_rms_norm/definition.json +63 -0
  169. zsol_bench-1.0.1/tests/sol_execbench/samples/nemotron_rms_norm/solution_triton.json +18 -0
  170. zsol_bench-1.0.1/tests/sol_execbench/samples/nemotron_rms_norm/workload.jsonl +3 -0
  171. zsol_bench-1.0.1/tests/sol_execbench/samples/olmo3_post_norm/definition.json +63 -0
  172. zsol_bench-1.0.1/tests/sol_execbench/samples/olmo3_post_norm/solution_triton.json +18 -0
  173. zsol_bench-1.0.1/tests/sol_execbench/samples/olmo3_post_norm/workload.jsonl +3 -0
  174. zsol_bench-1.0.1/tests/sol_execbench/samples/rmsnorm/definition.json +45 -0
  175. zsol_bench-1.0.1/tests/sol_execbench/samples/rmsnorm/solution_cuda.json +33 -0
  176. zsol_bench-1.0.1/tests/sol_execbench/samples/rmsnorm/solution_triton.json +26 -0
  177. zsol_bench-1.0.1/tests/sol_execbench/samples/rmsnorm/workload.jsonl +14 -0
  178. zsol_bench-1.0.1/tests/sol_execbench/samples/triton_ref_vecadd/definition.json +19 -0
  179. zsol_bench-1.0.1/tests/sol_execbench/samples/triton_ref_vecadd/solution_python.json +17 -0
  180. zsol_bench-1.0.1/tests/sol_execbench/samples/triton_ref_vecadd/workload.jsonl +3 -0
  181. zsol_bench-1.0.1/tests/sol_execbench/test_e2e.py +340 -0
  182. zsol_bench-1.0.1/uv.lock +2151 -0
zsol_bench-1.0.1/.git ADDED
@@ -0,0 +1 @@
1
+ gitdir: ../.git/modules/SOL-ExecBench
@@ -0,0 +1,38 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+ .ruff_cache
9
+ .pytest_cache
10
+
11
+ # Virtual environments
12
+ .venv
13
+
14
+ # Claude files
15
+ .claude
16
+ .bash_profile
17
+ .bashrc
18
+ .gitconfig
19
+ .gitmodules
20
+ .idea
21
+ .mcp.json
22
+ .profile
23
+ .ripgreprc
24
+ .vscode
25
+ .zprofile
26
+ .zshrc
27
+ HEAD
28
+ ./config
29
+ hooks
30
+ objects
31
+ refs
32
+ pytest*
33
+
34
+ # datasets
35
+ /data/*
36
+
37
+ # other
38
+ /out/
@@ -0,0 +1,16 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ rev: v0.9.2
4
+ hooks:
5
+ # Run the linter
6
+ - id: ruff
7
+ args: [--fix]
8
+ # Run the formatter
9
+ - id: ruff-format
10
+ - repo: local
11
+ hooks:
12
+ - id: dco-sign-off
13
+ name: DCO Sign-off Check
14
+ entry: "bash -c 'grep -q \"^Signed-off-by: \" \"$1\"' --"
15
+ language: system
16
+ stages: [commit-msg]
@@ -0,0 +1 @@
1
+ 3.12
@@ -0,0 +1,68 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Project Overview
6
+
7
+ SOL ExecBench is NVIDIA's GPU kernel evaluation and benchmarking framework. It evaluates custom GPU kernel solutions (PyTorch, Triton, CUTLASS, cuDNN, CuTe DSL, cuTile, CUDA C++) for correctness and performance by comparing them against reference implementations.
8
+
9
+ ## Build & Run Commands
10
+
11
+ ```bash
12
+ # Install dependencies (uses uv package manager)
13
+ uv sync --all-groups
14
+
15
+ # Run the CLI
16
+ uv run sol-execbench <problem_dir> --solution solution.json
17
+
18
+ # Run all tests
19
+ uv run pytest tests/
20
+
21
+ # Run a single test file
22
+ uv run pytest tests/sol_execbench/core/data/test_definition.py
23
+
24
+ # Run tests matching a keyword
25
+ uv run pytest tests/ -k "test_correctness"
26
+
27
+ # Run sample integration tests (requires CUDA GPU)
28
+ uv run pytest tests/sol_execbench/samples/
29
+
30
+ # Lint and format
31
+ uv run ruff check .
32
+ uv run ruff format .
33
+ ```
34
+
35
+ ## Architecture
36
+
37
+ The codebase has three layers:
38
+
39
+ 1. **CLI** (`cli/main.py`) — Click-based CLI entry point (`sol-execbench`). Parses args, invokes the driver, displays Rich tables with results.
40
+
41
+ 2. **Driver** (`driver/`) — Orchestrates evaluation. `ProblemPackager` stages problem files (definition, workloads, solution sources) into a temp directory, then runs compilation and evaluation as **subprocesses**. The eval driver template (`driver/templates/eval_driver.py`, ~800 lines) is the self-contained script that runs inside the subprocess — it imports torch/triton, loads inputs, executes kernels, computes correctness/performance, and emits JSONL traces to stdout.
42
+
43
+ 3. **Core** (`core/`) — Two sub-packages:
44
+ - `core/data/` — Pydantic v2 models for all data types: Definition (kernel specs, tensor shapes), Solution (source files, build specs), Workload (input generation), Trace (evaluation results with correctness/performance).
45
+ - `core/bench/` — Benchmarking utilities: CUDA event timing, numerical correctness computation, GPU clock locking, reward hack detection (detects timing manipulation, stream injection, monkey-patching).
46
+
47
+ ### Key execution flow
48
+
49
+ CLI → ProblemPackager stages files to temp dir → subprocess compiles C++/CUDA (if needed) → subprocess runs eval_driver.py → eval_driver outputs JSONL traces to stdout → CLI parses traces and displays results.
50
+
51
+ ### Two calling conventions
52
+
53
+ Kernel solutions use either **destination-passing style** (DPS, modifies pre-allocated outputs in-place) or **return-value style** (returns outputs directly). The eval driver handles both.
54
+
55
+ ## Test Markers & Fixtures
56
+
57
+ - `@pytest.mark.requires_torch_cuda` — auto-skipped when no CUDA GPU available
58
+ - `@pytest.mark.cpp` — compiles C++/CUDA extensions (slow)
59
+ - `@requires_sm100` — skips on GPUs below sm_100 (Blackwell). Use this for cuTile tests.
60
+ - `tmp_cache_dir` fixture — isolated build cache per test via `SOLEXECBENCH_CACHE_PATH`
61
+
62
+ ## Style
63
+
64
+ Ruff for linting and formatting. Rule E741 is ignored. Exclude `data/` and `tests/data/` from lint.
65
+
66
+ ## Commits
67
+
68
+ Format: `#<Issue> - <Title>` with DCO sign-off (`git commit -s`).
@@ -0,0 +1,111 @@
1
+
2
+ ## SOL ExecBench OSS Contribution Rules
3
+
4
+ #### Issue Tracking
5
+
6
+ * All enhancement, bugfix, or change requests must begin with the creation of a [SOL ExecBench Issue Request](https://github.com/NVIDIA/sol-execbench/issues).
7
+ * The issue request must be reviewed by SOL ExecBench engineers and approved prior to code review.
8
+
9
+
10
+ #### Coding Guidelines
11
+
12
+ - All source code contributions must adhere to the style enforced by [Ruff](https://docs.astral.sh/ruff/).
13
+
14
+ - In addition, please follow the existing conventions in the relevant file, submodule, module, and project when you add new code or when you extend/fix existing functionality.
15
+
16
+ - Avoid introducing unnecessary complexity into existing code so that maintainability and readability are preserved.
17
+
18
+ - Try to keep pull requests (PRs) as concise as possible:
19
+ - Avoid committing commented-out code.
20
+ - Wherever possible, each PR should address a single concern. If there are several otherwise-unrelated things that should be fixed to reach a desired endpoint, our recommendation is to open several PRs and indicate the dependencies in the description. The more complex the changes are in a single PR, the more time it will take to review those changes.
21
+
22
+ - Write commit titles using imperative mood and [these rules](https://chris.beams.io/posts/git-commit/), and reference the Issue number corresponding to the PR. Following is the recommended format for commit texts:
23
+ ```
24
+ #<Issue Number> - <Commit Title>
25
+
26
+ <Commit Body>
27
+ ```
28
+
29
+ - Ensure that the build log is clean, meaning no warnings or errors should be present.
30
+
31
+ - Ensure that all `sample_*` tests pass prior to submitting your code.
32
+
33
+ - All OSS components must contain accompanying documentation (READMEs) describing the functionality, dependencies, and known issues.
34
+
35
+ - See `README.md` for existing samples for reference.
36
+
37
+ - All OSS components must have an accompanying test.
38
+
39
+ - If introducing a new component, such as a plugin, provide a test sample to verify the functionality.
40
+
41
+ - Make sure that you can contribute your work to open source (no license and/or patent conflict is introduced by your code). You will need to [`sign`](#signing-your-work) your commit.
42
+
43
+ - Thanks in advance for your patience as we review your contributions; we do appreciate them!
44
+
45
+
46
+ #### Pull Requests
47
+ Developer workflow for code contributions is as follows:
48
+
49
+ 1. Developers must first [fork](https://help.github.com/en/articles/fork-a-repo) the [upstream](https://github.com/nvidia/TensorRT) TensorRT OSS repository.
50
+
51
+ 2. Git clone the forked repository and push changes to the personal fork.
52
+
53
+ ```bash
54
+ git clone https://github.com/YOUR_USERNAME/YOUR_FORK.git TensorRT
55
+ # Checkout the targeted branch and commit changes
56
+ # Push the commits to a branch on the fork (remote).
57
+ git push -u origin <local-branch>:<remote-branch>
58
+ ```
59
+
60
+ 3. Once the code changes are staged on the fork and ready for review, a [Pull Request](https://help.github.com/en/articles/about-pull-requests) (PR) can be [requested](https://help.github.com/en/articles/creating-a-pull-request) to merge the changes from a branch of the fork into a selected branch of upstream.
61
+ * Exercise caution when selecting the source and target branches for the PR.
62
+ Note that versioned releases of TensorRT OSS are posted to `release/` branches of the upstream repo.
63
+ * Creation of a PR creation kicks off the code review process.
64
+ * Atleast one TensorRT engineer will be assigned for the review.
65
+ * While under review, mark your PRs as work-in-progress by prefixing the PR title with [WIP].
66
+
67
+ 4. Since there is no CI/CD process in place yet, the PR will be accepted and the corresponding issue closed only after adequate testing has been completed, manually, by the developer and/or TensorRT engineer reviewing the code.
68
+
69
+
70
+ #### Signing Your Work
71
+
72
+ * We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license.
73
+
74
+ * Any contribution which contains commits that are not Signed-Off will not be accepted.
75
+
76
+ * To sign off on a commit you simply use the `--signoff` (or `-s`) option when committing your changes:
77
+ ```bash
78
+ $ git commit -s -m "Add cool feature."
79
+ ```
80
+ This will append the following to your commit message:
81
+ ```
82
+ Signed-off-by: Your Name <your@email.com>
83
+ ```
84
+
85
+ * Full text of the DCO:
86
+
87
+ ```
88
+ Developer Certificate of Origin
89
+ Version 1.1
90
+
91
+ Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
92
+ 1 Letterman Drive
93
+ Suite D4700
94
+ San Francisco, CA, 94129
95
+
96
+ Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
97
+ ```
98
+
99
+ ```
100
+ Developer's Certificate of Origin 1.1
101
+
102
+ By making a contribution to this project, I certify that:
103
+
104
+ (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or
105
+
106
+ (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or
107
+
108
+ (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.
109
+
110
+ (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.
111
+ ```
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,157 @@
1
+ Metadata-Version: 2.4
2
+ Name: zsol-bench
3
+ Version: 1.0.1
4
+ Summary: NVIDIA SOL ExecBench - GPU kernel evaluation framework
5
+ License-File: LICENSE
6
+ Requires-Python: >=3.12
7
+ Requires-Dist: apache-tvm-ffi>=0.1.9
8
+ Requires-Dist: click>=8.0
9
+ Requires-Dist: cuda-tile==1.1.0
10
+ Requires-Dist: datasets>=4.8.2
11
+ Requires-Dist: ninja>=1.13.0
12
+ Requires-Dist: nvidia-cudnn-frontend==1.18.0
13
+ Requires-Dist: nvidia-cutlass-dsl[cu13]==4.4.1
14
+ Requires-Dist: pydantic>=2.12.5
15
+ Requires-Dist: rich>=13.0
16
+ Requires-Dist: safetensors>=0.7.0
17
+ Requires-Dist: torch-c-dlpack-ext>=0.1.5
18
+ Requires-Dist: torch>=2.10.0
19
+ Requires-Dist: torchvision>=0.24.1
20
+ Description-Content-Type: text/markdown
21
+
22
+ # SOL ExecBench
23
+
24
+ <div align="center" id="top">
25
+
26
+ [![Docs](https://img.shields.io/badge/docs-latest-brightgreen.svg)](/docs/)
27
+ [![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](LICENSE)
28
+
29
+ [HuggingFace Dataset](https://huggingface.co/datasets/nvidia/SOL-ExecBench) | [Leaderboard](https://research.nvidia.com/benchmarks/sol-execbench)
30
+ | [Technical Report](https://arxiv.org/abs/2603.19173) </div>
31
+
32
+ **Speed-Of-Light ExecBench** is a rigorous GPU kernel evaluation and benchmarking framework built to benchmark AI-generated kernel solutions written with the variety of DSLs that NVIDIA hardware supports.
33
+
34
+ Kernels are:
35
+ * Checked for various forms of reward hacking
36
+ * Tested against a reference solution for numerical correctness
37
+ * Timed under reproducible conditions
38
+
39
+ Leaderboard submissions are ranked based on [SOL-Score](/src/sol_execbench/sol_score.py): a metric that grades custom kernel performance based on the theoretical roofline of a NVIDIA B200 GPU (obtained analytically with [SOLAR](https://github.com/NVlabs/SOLAR)).
40
+
41
+ Supported kernel languages: PyTorch, Triton, CUTLASS, cuDNN, CuTe DSL, cuTile, CUDA C++.
42
+
43
+ ## Prerequisites
44
+
45
+ - Docker with [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html)
46
+ - [Hugging Face CLI](https://huggingface.co/docs/huggingface_hub/guides/cli) (`pip install huggingface-hub[cli]`)
47
+ - NVIDIA driver version 580+
48
+
49
+ ## Setup
50
+
51
+ ### 1. Download benchmark data (one-time)
52
+
53
+ ```bash
54
+ ./scripts/download_data.sh
55
+ ```
56
+
57
+ This downloads the [SOL-ExecBench](https://huggingface.co/datasets/nvidia/SOL-ExecBench) and [FlashInfer Trace](https://huggingface.co/datasets/flashinfer-ai/flashinfer-trace) datasets into `data/`.
58
+
59
+ ### 2. Build and launch the Docker container
60
+
61
+ ```bash
62
+ ./scripts/run_docker.sh --build
63
+ ```
64
+
65
+ This builds the image and drops you into an interactive shell inside the container. The repo's `src/`, `tests/`, and downloaded data are mounted automatically.
66
+
67
+ ## Evaluating a Solution
68
+
69
+ Inside the container, use the `sol-execbench` CLI:
70
+
71
+ ```bash
72
+ # Evaluate using a problem directory (contains definition.json + workload.jsonl)
73
+ sol-execbench <problem_dir> --solution solution.json
74
+
75
+ # Or specify files explicitly
76
+ sol-execbench --definition def.json --workload wkl.jsonl --solution sol.json
77
+ ```
78
+
79
+ ### Example
80
+
81
+ ```bash
82
+ # From the host — build, launch, and evaluate in one command:
83
+ ./scripts/run_docker.sh --build -- \
84
+ sol-execbench examples/cute_dsl/jamba_attn_proj \
85
+ --solution examples/cute_dsl/jamba_attn_proj/solution_cute_dsl.json
86
+
87
+ # Or from inside the container:
88
+ sol-execbench examples/cute_dsl/jamba_attn_proj \
89
+ --solution examples/cute_dsl/jamba_attn_proj/solution_cute_dsl.json
90
+ ```
91
+
92
+ ### CLI Options
93
+
94
+ | Flag | Description |
95
+ |---|---|
96
+ | `--compile-timeout` | Compilation timeout in seconds (default: 120) |
97
+ | `--timeout` | Evaluation timeout in seconds (default: 600) |
98
+ | `-o, --output` | Write JSONL traces to file |
99
+ | `--json` | Print traces as JSON to stdout |
100
+ | `--lock-clocks` | Lock GPU clocks for stable benchmarks |
101
+ | `--keep-staging` | Preserve staging directory after run |
102
+ | `-v, --verbose` | Show subprocess output |
103
+
104
+ ## Running a Dataset
105
+
106
+ Use `scripts/run_dataset.py` to evaluate an entire dataset (or a single problem) in batch. By default it runs the definition's reference implementation as the solution unless `--solution-name` is specified. Saves to `./out/{subset}` by default.
107
+
108
+ ```bash
109
+ # Run all problems in the benchmark.
110
+ # Auto builds solution.json from a single code file
111
+ uv run scripts/run_dataset.py data/SOL-ExecBench/benchmark --solution-name solution.py
112
+
113
+ # Run specific categories with multiple solution code files
114
+ uv run scripts/run_dataset.py data/SOL-ExecBench/benchmark --category L1 L2 --solution-name solution.json
115
+
116
+ # Run a single problem
117
+ uv run scripts/run_dataset.py data/SOL-ExecBench/benchmark/L1/my_problem
118
+
119
+ # Limit number of problems and workloads
120
+ uv run scripts/run_dataset.py data/SOL-ExecBench/benchmark --limit 5 --max-workloads 3 -o ./results
121
+ ```
122
+
123
+ Results (traces and a summary JSON) are written to `out/run_dataset/` by default (override with `-o`). Problems that already passed are skipped on subsequent runs unless `--rerun` is specified.
124
+
125
+ ## Problem Format
126
+
127
+ A problem directory contains:
128
+
129
+ - **`definition.json`** — Kernel specification: function signature, tensor shapes, dtypes, reference implementation.
130
+ - **`workload.jsonl`** — One JSON object per line, each defining input shapes, values, and tolerance thresholds.
131
+
132
+ A solution is a separate JSON file referencing source files with the kernel implementation.
133
+
134
+ See the full schema docs:
135
+
136
+ - [Definition](docs/definition.md) — Kernel specification (function signature, tensor shapes, dtypes, reference code)
137
+ - [Workload](docs/workload.md) — Concrete input configurations and tolerance thresholds
138
+ - [Solution](docs/solution.md) — Source files and build specs for a kernel implementation
139
+ - [Trace](docs/trace.md) — Evaluation output (correctness and performance results)
140
+
141
+ ## Citation
142
+
143
+ ```bibtex
144
+ @misc{lin2026solexecbench,
145
+ title={SOL-ExecBench: Speed-of-Light Benchmarking for Real-World GPU Kernels Against Hardware Limits},
146
+ author={Edward Lin, Sahil Modi, Siva Kumar Sastry Hari, Qijing Huang, Zhifan Ye, Nestor Qin, Fengzhe Zhou, Yuan Zhang, Jingquan Wang, Sana Damani, Dheeraj Peri, Ouye Xie, Aditya Kane, Moshe Maor, Michael Behar, Triston Cao, Rishabh Mehta, Vartika Singh, Vikram Sharma Mailthody, Terry Chen, Zihao Ye, Hanfeng Chen, Tianqi Chen, Vinod Grover, Wei Chen, Wei Liu, Eric Chung, Luis Ceze, Roger Bringmann, Cyril Zeller, Michael Lightstone, Christos Kozyrakis, Humphrey Shi},
147
+ year={2026},
148
+ eprint={2603.19173},
149
+ archivePrefix={arXiv},
150
+ primaryClass={cs.LG},
151
+ url={https://arxiv.org/abs/2603.19173},
152
+ }
153
+ ```
154
+
155
+ ## License
156
+
157
+ Apache-2.0. See [LICENSE](LICENSE). Contributions require DCO sign-off — see [CONTRIBUTING.md](CONTRIBUTING.md).