Skip to content

Commit 034fda3

Browse files
committed
Focus PCH results on load_inline submissions
1 parent e226b86 commit 034fda3

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

‎docs/modal-pch-cache.md‎

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
The runner sets `CXX` to a GCC wrapper that loads a precompiled
44
`torch/extension.h` from a Modal Volume. Ordinary `load_inline()` calls need no
55
changes. Leave `use_pch=False`; PyTorch's separate native PCH option is unnecessary.
6-
File-based `load()` also benefits when its C++ source starts with the same include.
6+
The submission path assumes `load_inline()`.
77

88
Only the Torch host header is cached. CUDA/CUTLASS templates, user headers, kernel
99
objects, and shared libraries still compile in each submission container.
@@ -59,8 +59,9 @@ PYTHONPATH=src:src/runners KERNELBOT_PCH_VOLUME=kernelbot-pch-test \
5959
Every build runs in a fresh T4 container (4 CPU cores, 16 GiB), with normal Ninja
6060
parallelism. The baseline uses `/usr/bin/g++`; both modes use the same timing
6161
instrumentation. GCC header tracing verifies actual PCH use in a separate,
62-
untimed compilation. The tests check changed headers and source, including
63-
file-based `load()` with the same extension name, against distinct expected outputs.
62+
untimed compilation. The tests check changed headers and source against distinct
63+
expected outputs. The script also retains file-based and plain C++ diagnostics;
64+
these are not representative submission paths.
6465

6566
The CUTLASS case instantiates SM75 tensor-core GEMMs with FP16 inputs, FP32
6667
accumulation/output, 128×128×32 and 128×64×32 threadblock tiles. It checks
@@ -72,15 +73,13 @@ time, not GEMM execution speed.
7273

7374
Measured on CUDA 13.3 / PyTorch 2.12.0+cu130, T4. Values are medians from separate
7475
baseline and cached containers; two variants per case, with two repetitions for
75-
CUTLASS. The plain C++ row measures object compilation only.
76+
CUTLASS. The table covers `load_inline()` builds.
7677

7778
| Build | Baseline | Cached |
7879
| --- | ---: | ---: |
7980
| Minimal CUDA headers | 18.85s | 10.00s |
8081
| CUTLASS GEMM, default implicit CUDA headers | 48.08s | 45.61s |
8182
| CUTLASS GEMM, `no_implicit_headers=True` | 19.95s | 12.58s |
82-
| File-based `load()` | 18.30s | 8.77s |
83-
| Plain C++ | 0.202s | 0.287s |
8483
| Unwarmed host flags | 18.08s | 20.30s |
8584

8685
With default implicit CUDA headers, the CUTLASS GEMM improved only **1.05×**,
@@ -92,10 +91,12 @@ the CUDA translation unit produces the larger gain for this GEMM; the fixture
9291
keeps Tensor handling in C++ and explicitly includes its required headers.
9392

9493
All 160 GEMM checks passed, with maximum absolute error 8.53e-6. The remaining
95-
cases passed another 76 checks. All eight warmup profiles also completed and
94+
cases, including the supplemental diagnostics, passed another 76 checks.
95+
All eight warmup profiles also completed and
9696
committed on this image.
9797

98-
The plain C++ wrapper added about 85ms; the miss case was also slower in this
99-
sample. Separate containers introduce timing variability, and larger CUDA
100-
builds may hide the host-side savings entirely.
98+
The `load_inline()` case with unwarmed host flags was slower in this sample.
99+
Separate containers introduce timing variability, so the measured difference
100+
does not isolate wrapper overhead. Larger CUDA builds may hide the host-side
101+
savings entirely.
101102
[Per-container results and Modal runs](benchmarks/modal-pch.json).

0 commit comments

Comments
 (0)