Uploaded using `kernel-builder`.
Browse files- .gitattributes +9 -0
- build/torch211-cxx11-cu126-x86_64-linux/__init__.py +49 -2
- build/torch211-cxx11-cu126-x86_64-linux/{_metakernel_cuda_1f7e92c.abi3.so → _metakernel_cuda_917bc5f.abi3.so} +2 -2
- build/torch211-cxx11-cu126-x86_64-linux/_ops.py +3 -3
- build/torch211-cxx11-cu126-x86_64-linux/_pinned.py +61 -58
- build/torch211-cxx11-cu126-x86_64-linux/metadata.json +6 -6
- build/torch211-cxx11-cu128-x86_64-linux/__init__.py +49 -2
- build/torch211-cxx11-cu128-x86_64-linux/{_metakernel_cuda_1f7e92c.abi3.so → _metakernel_cuda_917bc5f.abi3.so} +2 -2
- build/torch211-cxx11-cu128-x86_64-linux/_ops.py +3 -3
- build/torch211-cxx11-cu128-x86_64-linux/_pinned.py +61 -58
- build/torch211-cxx11-cu128-x86_64-linux/metadata.json +6 -6
- build/torch211-cxx11-cu130-x86_64-linux/__init__.py +49 -2
- build/torch211-cxx11-cu130-x86_64-linux/{_metakernel_cuda_1f7e92c.abi3.so → _metakernel_cuda_917bc5f.abi3.so} +2 -2
- build/torch211-cxx11-cu130-x86_64-linux/_ops.py +3 -3
- build/torch211-cxx11-cu130-x86_64-linux/_pinned.py +61 -58
- build/torch211-cxx11-cu130-x86_64-linux/metadata.json +6 -6
- build/torch212-cxx11-cu126-x86_64-linux/__init__.py +49 -2
- build/{torch213-cxx11-cu126-x86_64-linux/_metakernel_cuda_1f7e92c.abi3.so → torch212-cxx11-cu126-x86_64-linux/_metakernel_cuda_917bc5f.abi3.so} +2 -2
- build/torch212-cxx11-cu126-x86_64-linux/_ops.py +3 -3
- build/torch212-cxx11-cu126-x86_64-linux/_pinned.py +61 -58
- build/torch212-cxx11-cu126-x86_64-linux/metadata.json +6 -6
- build/torch212-cxx11-cu130-x86_64-linux/__init__.py +49 -2
- build/torch212-cxx11-cu130-x86_64-linux/_metakernel_cuda_1f7e92c.abi3.so +0 -3
- build/torch212-cxx11-cu130-x86_64-linux/_metakernel_cuda_917bc5f.abi3.so +3 -0
- build/torch212-cxx11-cu130-x86_64-linux/_ops.py +3 -3
- build/torch212-cxx11-cu130-x86_64-linux/_pinned.py +61 -58
- build/torch212-cxx11-cu130-x86_64-linux/metadata.json +6 -6
- build/torch212-cxx11-cu132-x86_64-linux/__init__.py +49 -2
- build/torch212-cxx11-cu132-x86_64-linux/_metakernel_cuda_1f7e92c.abi3.so +0 -3
- build/torch212-cxx11-cu132-x86_64-linux/_metakernel_cuda_917bc5f.abi3.so +3 -0
- build/torch212-cxx11-cu132-x86_64-linux/_ops.py +3 -3
- build/torch212-cxx11-cu132-x86_64-linux/_pinned.py +61 -58
- build/torch212-cxx11-cu132-x86_64-linux/metadata.json +6 -6
- build/torch213-cxx11-cu126-x86_64-linux/__init__.py +49 -2
- build/{torch212-cxx11-cu126-x86_64-linux/_metakernel_cuda_1f7e92c.abi3.so → torch213-cxx11-cu126-x86_64-linux/_metakernel_cuda_917bc5f.abi3.so} +2 -2
- build/torch213-cxx11-cu126-x86_64-linux/_ops.py +3 -3
- build/torch213-cxx11-cu126-x86_64-linux/_pinned.py +61 -58
- build/torch213-cxx11-cu126-x86_64-linux/metadata.json +6 -6
- build/torch213-cxx11-cu130-x86_64-linux/__init__.py +49 -2
- build/torch213-cxx11-cu130-x86_64-linux/_metakernel_cuda_1f7e92c.abi3.so +0 -3
- build/torch213-cxx11-cu130-x86_64-linux/_metakernel_cuda_917bc5f.abi3.so +3 -0
- build/torch213-cxx11-cu130-x86_64-linux/_ops.py +3 -3
- build/torch213-cxx11-cu130-x86_64-linux/_pinned.py +61 -58
- build/torch213-cxx11-cu130-x86_64-linux/metadata.json +6 -6
- build/torch213-cxx11-cu132-x86_64-linux/__init__.py +49 -2
- build/torch213-cxx11-cu132-x86_64-linux/_metakernel_cuda_1f7e92c.abi3.so +0 -3
- build/torch213-cxx11-cu132-x86_64-linux/_metakernel_cuda_917bc5f.abi3.so +3 -0
- build/torch213-cxx11-cu132-x86_64-linux/_ops.py +3 -3
- build/torch213-cxx11-cu132-x86_64-linux/_pinned.py +61 -58
- build/torch213-cxx11-cu132-x86_64-linux/metadata.json +6 -6
.gitattributes
CHANGED
|
@@ -78,3 +78,12 @@ build/torch212-cxx11-cu132-x86_64-linux/_metakernel_cuda_1f7e92c.abi3.so filter=
|
|
| 78 |
build/torch213-cxx11-cu126-x86_64-linux/_metakernel_cuda_1f7e92c.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 79 |
build/torch213-cxx11-cu130-x86_64-linux/_metakernel_cuda_1f7e92c.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 80 |
build/torch213-cxx11-cu132-x86_64-linux/_metakernel_cuda_1f7e92c.abi3.so filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
build/torch213-cxx11-cu126-x86_64-linux/_metakernel_cuda_1f7e92c.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 79 |
build/torch213-cxx11-cu130-x86_64-linux/_metakernel_cuda_1f7e92c.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 80 |
build/torch213-cxx11-cu132-x86_64-linux/_metakernel_cuda_1f7e92c.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 81 |
+
build/torch211-cxx11-cu126-x86_64-linux/_metakernel_cuda_917bc5f.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 82 |
+
build/torch211-cxx11-cu128-x86_64-linux/_metakernel_cuda_917bc5f.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 83 |
+
build/torch211-cxx11-cu130-x86_64-linux/_metakernel_cuda_917bc5f.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 84 |
+
build/torch212-cxx11-cu126-x86_64-linux/_metakernel_cuda_917bc5f.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 85 |
+
build/torch212-cxx11-cu130-x86_64-linux/_metakernel_cuda_917bc5f.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 86 |
+
build/torch212-cxx11-cu132-x86_64-linux/_metakernel_cuda_917bc5f.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 87 |
+
build/torch213-cxx11-cu126-x86_64-linux/_metakernel_cuda_917bc5f.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 88 |
+
build/torch213-cxx11-cu130-x86_64-linux/_metakernel_cuda_917bc5f.abi3.so filter=lfs diff=lfs merge=lfs -text
|
| 89 |
+
build/torch213-cxx11-cu132-x86_64-linux/_metakernel_cuda_917bc5f.abi3.so filter=lfs diff=lfs merge=lfs -text
|
build/torch211-cxx11-cu126-x86_64-linux/__init__.py
CHANGED
|
@@ -141,6 +141,49 @@ def _sattolo_ring(n, device, generator=None):
|
|
| 141 |
return ring.to(device)
|
| 142 |
|
| 143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
def probe_device(device="cuda", quick=False):
|
| 145 |
"""Empirical device dossier. Each entry is measured by a dedicated
|
| 146 |
probe kernel and carries units, method, the SM clock it ran under, and
|
|
@@ -157,6 +200,9 @@ def probe_device(device="cuda", quick=False):
|
|
| 157 |
"vram_bytes": props.total_memory,
|
| 158 |
"torch": torch.__version__,
|
| 159 |
"cuda_runtime": torch.version.cuda,
|
|
|
|
|
|
|
|
|
|
| 160 |
}
|
| 161 |
}
|
| 162 |
sink = torch.zeros(2, dtype=torch.float32, device=device)
|
|
@@ -332,8 +378,9 @@ def probe_device(device="cuda", quick=False):
|
|
| 332 |
"register-fragment mma_sync loops (wmma; fp8 and "
|
| 333 |
"2:4-sparse fp16 via inline PTX m16n8k32; sparse "
|
| 334 |
"counted dense-equivalent, the vendor convention); "
|
| 335 |
-
"flops
|
| 336 |
-
"
|
|
|
|
| 337 |
clk, "medium",
|
| 338 |
"dense-tile rate without memory traffic; real "
|
| 339 |
"kernels see this only when staging hides behind it")
|
|
|
|
| 141 |
return ring.to(device)
|
| 142 |
|
| 143 |
|
| 144 |
+
def _smi_settings(index):
|
| 145 |
+
"""ECC mode, driver, and power limit via nvidia-smi; None fields
|
| 146 |
+
when the tool is unavailable."""
|
| 147 |
+
import subprocess
|
| 148 |
+
try:
|
| 149 |
+
out = subprocess.run(
|
| 150 |
+
["nvidia-smi", "-i", str(index),
|
| 151 |
+
"--query-gpu=ecc.mode.current,driver_version,power.limit",
|
| 152 |
+
"--format=csv,noheader,nounits"],
|
| 153 |
+
capture_output=True, text=True, timeout=10)
|
| 154 |
+
parts = [p.strip() for p in out.stdout.strip().split(",")]
|
| 155 |
+
if out.returncode == 0 and len(parts) == 3:
|
| 156 |
+
return {
|
| 157 |
+
"ecc": parts[0],
|
| 158 |
+
"driver": parts[1],
|
| 159 |
+
"power_limit_w": float(parts[2]),
|
| 160 |
+
}
|
| 161 |
+
except (OSError, ValueError, subprocess.TimeoutExpired):
|
| 162 |
+
pass
|
| 163 |
+
return {"ecc": None, "driver": None, "power_limit_w": None}
|
| 164 |
+
|
| 165 |
+
|
| 166 |
+
def mma_tile_check(device="cuda", trials=8):
|
| 167 |
+
"""Random small-integer m16n16k16 tiles through the wmma fragment
|
| 168 |
+
path, compared exactly to the reference GEMM; pins M, N, K, and
|
| 169 |
+
operand mapping (integer operands make fp32 accumulation exact)."""
|
| 170 |
+
worst = 0.0
|
| 171 |
+
for t in range(trials):
|
| 172 |
+
g = torch.Generator(device=device).manual_seed(1000 + t)
|
| 173 |
+
a = torch.randint(-3, 4, (16, 16), device=device,
|
| 174 |
+
generator=g).to(torch.float16)
|
| 175 |
+
b = torch.randint(-3, 4, (16, 16), device=device,
|
| 176 |
+
generator=g).to(torch.float16)
|
| 177 |
+
c = torch.zeros(16, 16, device=device, dtype=torch.float32)
|
| 178 |
+
ops.mk_mma_tile(a.contiguous(), b.t().contiguous(), c)
|
| 179 |
+
_sync()
|
| 180 |
+
ref = a.float() @ b.float()
|
| 181 |
+
if not torch.equal(c, ref):
|
| 182 |
+
worst = max(worst, float((c - ref).abs().max().item()))
|
| 183 |
+
return {"exact": worst == 0.0, "max_abs_error": worst,
|
| 184 |
+
"trials": trials}
|
| 185 |
+
|
| 186 |
+
|
| 187 |
def probe_device(device="cuda", quick=False):
|
| 188 |
"""Empirical device dossier. Each entry is measured by a dedicated
|
| 189 |
probe kernel and carries units, method, the SM clock it ran under, and
|
|
|
|
| 200 |
"vram_bytes": props.total_memory,
|
| 201 |
"torch": torch.__version__,
|
| 202 |
"cuda_runtime": torch.version.cuda,
|
| 203 |
+
# instrument settings: readings depend on them, so the
|
| 204 |
+
# dossier records them (None when nvidia-smi is unavailable)
|
| 205 |
+
**_smi_settings(torch.device(device).index or 0),
|
| 206 |
}
|
| 207 |
}
|
| 208 |
sink = torch.zeros(2, dtype=torch.float32, device=device)
|
|
|
|
| 378 |
"register-fragment mma_sync loops (wmma; fp8 and "
|
| 379 |
"2:4-sparse fp16 via inline PTX m16n8k32; sparse "
|
| 380 |
"counted dense-equivalent, the vendor convention); "
|
| 381 |
+
"flops derive from the mean accumulator read-back "
|
| 382 |
+
"with every fragment element observed, never the "
|
| 383 |
+
"declared loop shape",
|
| 384 |
clk, "medium",
|
| 385 |
"dense-tile rate without memory traffic; real "
|
| 386 |
"kernels see this only when staging hides behind it")
|
build/torch211-cxx11-cu126-x86_64-linux/{_metakernel_cuda_1f7e92c.abi3.so → _metakernel_cuda_917bc5f.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:14872ea64c85244a774945e3561e406435cb1a9c34027bfe0a48cc68eb074411
|
| 3 |
+
size 737920
|
build/torch211-cxx11-cu126-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _metakernel_cuda_917bc5f
|
| 3 |
+
ops = torch.ops._metakernel_cuda_917bc5f
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_metakernel_cuda_917bc5f::{op_name}"
|
build/torch211-cxx11-cu126-x86_64-linux/_pinned.py
CHANGED
|
@@ -209,83 +209,86 @@ PINNED = {
|
|
| 209 |
},
|
| 210 |
"sm89_nvidiartx6000adagenerati": {
|
| 211 |
"atomics_f32": {
|
| 212 |
-
"clock_ghz": 2.
|
| 213 |
"confidence": "high",
|
| 214 |
"method": "atomicAdd hammer; curve sweeps the number of distinct global addresses from 1 (full contention) to one per thread",
|
| 215 |
"units": "Gop/s",
|
| 216 |
"value": {
|
| 217 |
"curve_slots": {
|
| 218 |
-
"1": 0.
|
| 219 |
-
"145408":
|
| 220 |
-
"4096":
|
| 221 |
-
"512": 55.
|
| 222 |
-
"64": 13.
|
| 223 |
-
"8": 5.
|
| 224 |
},
|
| 225 |
-
"shared_same_addr": 12.
|
| 226 |
}
|
| 227 |
},
|
| 228 |
"clock": {
|
| 229 |
"confidence": "high",
|
| 230 |
-
"final_ghz": 2.
|
| 231 |
-
"max_ghz": 2.
|
| 232 |
"method": "24 back-to-back FMA spin windows of 30M ticks; wall/ticks per window",
|
| 233 |
-
"min_ghz": 2.
|
| 234 |
"sag_pct": 0.3,
|
| 235 |
"units": "GHz"
|
| 236 |
},
|
| 237 |
"device": {
|
| 238 |
"cuda_runtime": "12.6",
|
|
|
|
|
|
|
| 239 |
"l2_bytes": 100663296,
|
| 240 |
"name": "NVIDIA RTX 6000 Ada Generation",
|
|
|
|
| 241 |
"sm_arch": "sm89",
|
| 242 |
"sms": 142,
|
| 243 |
"torch": "2.10.0+cu126",
|
| 244 |
"vram_bytes": 48305274880
|
| 245 |
},
|
| 246 |
"dram_bw": {
|
| 247 |
-
"clock_ghz": 2.
|
| 248 |
"confidence": "high",
|
| 249 |
"method": "streaming triad c=a+s*b per access width; read-only fold; write-only fill; random float4 gather (16B granules, nominal traffic)",
|
| 250 |
"note": "gather moves full cache lines per 16B granule, so its nominal number is the achievable rate for random access, not a line-efficiency claim",
|
| 251 |
"units": "GB/s",
|
| 252 |
"value": {
|
| 253 |
-
"random_gather_16B":
|
| 254 |
-
"read_only":
|
| 255 |
-
"triad_16B":
|
| 256 |
-
"triad_4B":
|
| 257 |
-
"triad_8B":
|
| 258 |
-
"write_only":
|
| 259 |
}
|
| 260 |
},
|
| 261 |
"fma_f32": {
|
| 262 |
-
"clock_ghz": 2.
|
| 263 |
"confidence": "high",
|
| 264 |
"method": "register-resident FMA chains",
|
| 265 |
"units": "TFLOP/s",
|
| 266 |
-
"value":
|
| 267 |
},
|
| 268 |
"fma_f64": {
|
| 269 |
-
"clock_ghz": 2.
|
| 270 |
"confidence": "high",
|
| 271 |
"method": "register-resident double FMA chains (the DFMA pipe)",
|
| 272 |
"units": "TFLOP/s",
|
| 273 |
-
"value": 1.
|
| 274 |
},
|
| 275 |
"grid_barrier": {
|
| 276 |
-
"clock_ghz": 2.
|
| 277 |
"confidence": "high",
|
| 278 |
"method": "cooperative kernel, 142 blocks x 256 threads",
|
| 279 |
"units": "us per grid.sync",
|
| 280 |
"value": 0.54
|
| 281 |
},
|
| 282 |
"l2_bw": {
|
| 283 |
-
"clock_ghz": 2.
|
| 284 |
"confidence": "medium",
|
| 285 |
"method": "in-kernel repeated triad passes over 72 MB resident working set",
|
| 286 |
"note": "first pass streams from HBM; amortized over 64 passes",
|
| 287 |
"units": "GB/s",
|
| 288 |
-
"value":
|
| 289 |
},
|
| 290 |
"latency": {
|
| 291 |
"clock_ghz": 2.687,
|
|
@@ -294,37 +297,37 @@ PINNED = {
|
|
| 294 |
"note": "smem includes index arithmetic; HBM includes residual TLB effects at large footprints",
|
| 295 |
"units": "cycles (single-lane dependent loads)",
|
| 296 |
"value": {
|
| 297 |
-
"dram_cycles":
|
| 298 |
-
"l1_cycles": 45.
|
| 299 |
-
"l2_cycles":
|
| 300 |
"ns_per_cycle": 0.372,
|
| 301 |
"smem_cycles": 30.0
|
| 302 |
}
|
| 303 |
},
|
| 304 |
"launch_overhead": {
|
| 305 |
-
"clock_ghz": 2.
|
| 306 |
"confidence": "high",
|
| 307 |
"method": "empty-kernel trains, queued vs launch+sync",
|
| 308 |
"note": "host-dependent: includes torch op dispatch",
|
| 309 |
"units": "us",
|
| 310 |
"value": {
|
| 311 |
-
"queued_us": 5.
|
| 312 |
-
"round_trip_us": 14.
|
| 313 |
}
|
| 314 |
},
|
| 315 |
"mma": {
|
| 316 |
-
"clock_ghz": 2.
|
| 317 |
"confidence": "medium",
|
| 318 |
-
"method": "register-fragment mma_sync loops (wmma; fp8 and 2:4-sparse fp16 via inline PTX m16n8k32; sparse counted dense-equivalent, the vendor convention); flops
|
| 319 |
"note": "dense-tile rate without memory traffic; real kernels see this only when staging hides behind it",
|
| 320 |
"units": "TFLOP/s (TOP/s for int8)",
|
| 321 |
"value": {
|
| 322 |
-
"bf16":
|
| 323 |
-
"fp16":
|
| 324 |
-
"fp16_sparse_2_4":
|
| 325 |
-
"fp8_e4m3":
|
| 326 |
-
"int8":
|
| 327 |
-
"tf32":
|
| 328 |
},
|
| 329 |
"verified_k_lanes": {
|
| 330 |
"bf16": {
|
|
@@ -354,7 +357,7 @@ PINNED = {
|
|
| 354 |
}
|
| 355 |
},
|
| 356 |
"occupancy_blocks_per_sm": {
|
| 357 |
-
"clock_ghz": 2.
|
| 358 |
"confidence": "high",
|
| 359 |
"method": "occupancy API on the float4 triad kernel",
|
| 360 |
"note": "API-derived, not timing-derived",
|
|
@@ -387,49 +390,49 @@ PINNED = {
|
|
| 387 |
}
|
| 388 |
},
|
| 389 |
"occupancy_knees_fma_tflops": {
|
| 390 |
-
"clock_ghz": 2.
|
| 391 |
"confidence": "high",
|
| 392 |
"method": "a single dependent FMA chain per thread, timed at forced (threads, dyn smem) occupancies over fixed total work; throughput is proportional to resident threads until the pipe saturates, so the cliff marks where occupancy stops covering latency",
|
| 393 |
"note": "timing-derived counterpart to the API table above",
|
| 394 |
"units": "TFLOP/s",
|
| 395 |
"value": {
|
| 396 |
"t1024": {
|
| 397 |
-
"0KB":
|
| 398 |
-
"32KB":
|
| 399 |
-
"48KB":
|
| 400 |
},
|
| 401 |
"t128": {
|
| 402 |
-
"0KB":
|
| 403 |
-
"32KB": 60.
|
| 404 |
-
"48KB":
|
| 405 |
},
|
| 406 |
"t256": {
|
| 407 |
-
"0KB":
|
| 408 |
-
"32KB":
|
| 409 |
-
"48KB":
|
| 410 |
}
|
| 411 |
}
|
| 412 |
},
|
| 413 |
"smem_bw": {
|
| 414 |
-
"clock_ghz": 2.
|
| 415 |
"confidence": "medium",
|
| 416 |
"method": "block-resident read+write streaming (8 B per thread-iteration), aggregated across SMs",
|
| 417 |
"note": "bank-conflict-light access pattern; a conflicted pattern can be far lower",
|
| 418 |
"units": "GB/s",
|
| 419 |
-
"value":
|
| 420 |
},
|
| 421 |
"transfer_bw": {
|
| 422 |
-
"clock_ghz": 2.
|
| 423 |
"confidence": "high",
|
| 424 |
"method": "256 MB torch copies, cudaEvent-timed",
|
| 425 |
"note": "pageable numbers include the staging copy; d2d counts one direction of traffic",
|
| 426 |
"units": "GB/s",
|
| 427 |
"value": {
|
| 428 |
-
"d2d":
|
| 429 |
-
"d2h_pageable":
|
| 430 |
-
"d2h_pinned": 26.
|
| 431 |
-
"h2d_pageable":
|
| 432 |
-
"h2d_pinned":
|
| 433 |
}
|
| 434 |
}
|
| 435 |
}
|
|
|
|
| 209 |
},
|
| 210 |
"sm89_nvidiartx6000adagenerati": {
|
| 211 |
"atomics_f32": {
|
| 212 |
+
"clock_ghz": 2.706,
|
| 213 |
"confidence": "high",
|
| 214 |
"method": "atomicAdd hammer; curve sweeps the number of distinct global addresses from 1 (full contention) to one per thread",
|
| 215 |
"units": "Gop/s",
|
| 216 |
"value": {
|
| 217 |
"curve_slots": {
|
| 218 |
+
"1": 0.72,
|
| 219 |
+
"145408": 483.54,
|
| 220 |
+
"4096": 209.84,
|
| 221 |
+
"512": 55.6,
|
| 222 |
+
"64": 13.82,
|
| 223 |
+
"8": 5.77
|
| 224 |
},
|
| 225 |
+
"shared_same_addr": 12.88
|
| 226 |
}
|
| 227 |
},
|
| 228 |
"clock": {
|
| 229 |
"confidence": "high",
|
| 230 |
+
"final_ghz": 2.699,
|
| 231 |
+
"max_ghz": 2.706,
|
| 232 |
"method": "24 back-to-back FMA spin windows of 30M ticks; wall/ticks per window",
|
| 233 |
+
"min_ghz": 2.501,
|
| 234 |
"sag_pct": 0.3,
|
| 235 |
"units": "GHz"
|
| 236 |
},
|
| 237 |
"device": {
|
| 238 |
"cuda_runtime": "12.6",
|
| 239 |
+
"driver": "595.97",
|
| 240 |
+
"ecc": "Enabled",
|
| 241 |
"l2_bytes": 100663296,
|
| 242 |
"name": "NVIDIA RTX 6000 Ada Generation",
|
| 243 |
+
"power_limit_w": 300.0,
|
| 244 |
"sm_arch": "sm89",
|
| 245 |
"sms": 142,
|
| 246 |
"torch": "2.10.0+cu126",
|
| 247 |
"vram_bytes": 48305274880
|
| 248 |
},
|
| 249 |
"dram_bw": {
|
| 250 |
+
"clock_ghz": 2.706,
|
| 251 |
"confidence": "high",
|
| 252 |
"method": "streaming triad c=a+s*b per access width; read-only fold; write-only fill; random float4 gather (16B granules, nominal traffic)",
|
| 253 |
"note": "gather moves full cache lines per 16B granule, so its nominal number is the achievable rate for random access, not a line-efficiency claim",
|
| 254 |
"units": "GB/s",
|
| 255 |
"value": {
|
| 256 |
+
"random_gather_16B": 218.5,
|
| 257 |
+
"read_only": 771.0,
|
| 258 |
+
"triad_16B": 663.1,
|
| 259 |
+
"triad_4B": 638.3,
|
| 260 |
+
"triad_8B": 705.3,
|
| 261 |
+
"write_only": 766.5
|
| 262 |
}
|
| 263 |
},
|
| 264 |
"fma_f32": {
|
| 265 |
+
"clock_ghz": 2.706,
|
| 266 |
"confidence": "high",
|
| 267 |
"method": "register-resident FMA chains",
|
| 268 |
"units": "TFLOP/s",
|
| 269 |
+
"value": 90.85
|
| 270 |
},
|
| 271 |
"fma_f64": {
|
| 272 |
+
"clock_ghz": 2.706,
|
| 273 |
"confidence": "high",
|
| 274 |
"method": "register-resident double FMA chains (the DFMA pipe)",
|
| 275 |
"units": "TFLOP/s",
|
| 276 |
+
"value": 1.282
|
| 277 |
},
|
| 278 |
"grid_barrier": {
|
| 279 |
+
"clock_ghz": 2.706,
|
| 280 |
"confidence": "high",
|
| 281 |
"method": "cooperative kernel, 142 blocks x 256 threads",
|
| 282 |
"units": "us per grid.sync",
|
| 283 |
"value": 0.54
|
| 284 |
},
|
| 285 |
"l2_bw": {
|
| 286 |
+
"clock_ghz": 2.706,
|
| 287 |
"confidence": "medium",
|
| 288 |
"method": "in-kernel repeated triad passes over 72 MB resident working set",
|
| 289 |
"note": "first pass streams from HBM; amortized over 64 passes",
|
| 290 |
"units": "GB/s",
|
| 291 |
+
"value": 9325.3
|
| 292 |
},
|
| 293 |
"latency": {
|
| 294 |
"clock_ghz": 2.687,
|
|
|
|
| 297 |
"note": "smem includes index arithmetic; HBM includes residual TLB effects at large footprints",
|
| 298 |
"units": "cycles (single-lane dependent loads)",
|
| 299 |
"value": {
|
| 300 |
+
"dram_cycles": 649.4,
|
| 301 |
+
"l1_cycles": 45.8,
|
| 302 |
+
"l2_cycles": 291.5,
|
| 303 |
"ns_per_cycle": 0.372,
|
| 304 |
"smem_cycles": 30.0
|
| 305 |
}
|
| 306 |
},
|
| 307 |
"launch_overhead": {
|
| 308 |
+
"clock_ghz": 2.706,
|
| 309 |
"confidence": "high",
|
| 310 |
"method": "empty-kernel trains, queued vs launch+sync",
|
| 311 |
"note": "host-dependent: includes torch op dispatch",
|
| 312 |
"units": "us",
|
| 313 |
"value": {
|
| 314 |
+
"queued_us": 5.55,
|
| 315 |
+
"round_trip_us": 14.1
|
| 316 |
}
|
| 317 |
},
|
| 318 |
"mma": {
|
| 319 |
+
"clock_ghz": 2.706,
|
| 320 |
"confidence": "medium",
|
| 321 |
+
"method": "register-fragment mma_sync loops (wmma; fp8 and 2:4-sparse fp16 via inline PTX m16n8k32; sparse counted dense-equivalent, the vendor convention); flops derive from the mean accumulator read-back with every fragment element observed, never the declared loop shape",
|
| 322 |
"note": "dense-tile rate without memory traffic; real kernels see this only when staging hides behind it",
|
| 323 |
"units": "TFLOP/s (TOP/s for int8)",
|
| 324 |
"value": {
|
| 325 |
+
"bf16": 365.5,
|
| 326 |
+
"fp16": 375.9,
|
| 327 |
+
"fp16_sparse_2_4": 713.4,
|
| 328 |
+
"fp8_e4m3": 193.7,
|
| 329 |
+
"int8": 770.4,
|
| 330 |
+
"tf32": 177.1
|
| 331 |
},
|
| 332 |
"verified_k_lanes": {
|
| 333 |
"bf16": {
|
|
|
|
| 357 |
}
|
| 358 |
},
|
| 359 |
"occupancy_blocks_per_sm": {
|
| 360 |
+
"clock_ghz": 2.706,
|
| 361 |
"confidence": "high",
|
| 362 |
"method": "occupancy API on the float4 triad kernel",
|
| 363 |
"note": "API-derived, not timing-derived",
|
|
|
|
| 390 |
}
|
| 391 |
},
|
| 392 |
"occupancy_knees_fma_tflops": {
|
| 393 |
+
"clock_ghz": 2.706,
|
| 394 |
"confidence": "high",
|
| 395 |
"method": "a single dependent FMA chain per thread, timed at forced (threads, dyn smem) occupancies over fixed total work; throughput is proportional to resident threads until the pipe saturates, so the cliff marks where occupancy stops covering latency",
|
| 396 |
"note": "timing-derived counterpart to the API table above",
|
| 397 |
"units": "TFLOP/s",
|
| 398 |
"value": {
|
| 399 |
"t1024": {
|
| 400 |
+
"0KB": 75.5,
|
| 401 |
+
"32KB": 73.66,
|
| 402 |
+
"48KB": 74.95
|
| 403 |
},
|
| 404 |
"t128": {
|
| 405 |
+
"0KB": 79.86,
|
| 406 |
+
"32KB": 60.31,
|
| 407 |
+
"48KB": 44.57
|
| 408 |
},
|
| 409 |
"t256": {
|
| 410 |
+
"0KB": 81.69,
|
| 411 |
+
"32KB": 79.48,
|
| 412 |
+
"48KB": 71.47
|
| 413 |
}
|
| 414 |
}
|
| 415 |
},
|
| 416 |
"smem_bw": {
|
| 417 |
+
"clock_ghz": 2.706,
|
| 418 |
"confidence": "medium",
|
| 419 |
"method": "block-resident read+write streaming (8 B per thread-iteration), aggregated across SMs",
|
| 420 |
"note": "bank-conflict-light access pattern; a conflicted pattern can be far lower",
|
| 421 |
"units": "GB/s",
|
| 422 |
+
"value": 21250.0
|
| 423 |
},
|
| 424 |
"transfer_bw": {
|
| 425 |
+
"clock_ghz": 2.706,
|
| 426 |
"confidence": "high",
|
| 427 |
"method": "256 MB torch copies, cudaEvent-timed",
|
| 428 |
"note": "pageable numbers include the staging copy; d2d counts one direction of traffic",
|
| 429 |
"units": "GB/s",
|
| 430 |
"value": {
|
| 431 |
+
"d2d": 330.7,
|
| 432 |
+
"d2h_pageable": 15.6,
|
| 433 |
+
"d2h_pinned": 26.2,
|
| 434 |
+
"h2d_pageable": 16.6,
|
| 435 |
+
"h2d_pinned": 24.0
|
| 436 |
}
|
| 437 |
}
|
| 438 |
}
|
build/torch211-cxx11-cu126-x86_64-linux/metadata.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"name": "metakernel",
|
| 3 |
-
"id": "
|
| 4 |
"version": 1,
|
| 5 |
"license": "Apache-2.0",
|
| 6 |
"python-depends": [],
|
|
@@ -16,10 +16,10 @@
|
|
| 16 |
"digest": {
|
| 17 |
"algorithm": "sha256",
|
| 18 |
"files": {
|
| 19 |
-
"__init__.py": "
|
| 20 |
-
"
|
| 21 |
-
"_ops.py": "
|
| 22 |
-
"_pinned.py": "
|
| 23 |
"metakernel/__init__.py": "DFYPlrhXwYjEqCl/8n0SmWGZV8NFml5DPhMjKfv98GY="
|
| 24 |
}
|
| 25 |
},
|
|
@@ -30,7 +30,7 @@
|
|
| 30 |
"dirty": false
|
| 31 |
},
|
| 32 |
"kernel": {
|
| 33 |
-
"sha": "
|
| 34 |
"dirty": false
|
| 35 |
}
|
| 36 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"name": "metakernel",
|
| 3 |
+
"id": "_metakernel_cuda_917bc5f",
|
| 4 |
"version": 1,
|
| 5 |
"license": "Apache-2.0",
|
| 6 |
"python-depends": [],
|
|
|
|
| 16 |
"digest": {
|
| 17 |
"algorithm": "sha256",
|
| 18 |
"files": {
|
| 19 |
+
"__init__.py": "j+f09TbMQC/dkaD/Ls5Ig7CHJ/yTI1syrDZhJVpz4rA=",
|
| 20 |
+
"_metakernel_cuda_917bc5f.abi3.so": "FIcupkyFJEp3SUXjVh5AZDXLGpw0Anv+CkjMaOsHRBE=",
|
| 21 |
+
"_ops.py": "HaN7LmS0+rYVmkKdGje8u4il8c3tQT0x4w4iwQvC8qY=",
|
| 22 |
+
"_pinned.py": "cRCc88scJyKco8+sKHXkGFaeXl07lvtC4hrfO/gQ1HU=",
|
| 23 |
"metakernel/__init__.py": "DFYPlrhXwYjEqCl/8n0SmWGZV8NFml5DPhMjKfv98GY="
|
| 24 |
}
|
| 25 |
},
|
|
|
|
| 30 |
"dirty": false
|
| 31 |
},
|
| 32 |
"kernel": {
|
| 33 |
+
"sha": "917bc5f20b9abdcd0f8afec590cc2eaa27764e8c",
|
| 34 |
"dirty": false
|
| 35 |
}
|
| 36 |
}
|
build/torch211-cxx11-cu128-x86_64-linux/__init__.py
CHANGED
|
@@ -141,6 +141,49 @@ def _sattolo_ring(n, device, generator=None):
|
|
| 141 |
return ring.to(device)
|
| 142 |
|
| 143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
def probe_device(device="cuda", quick=False):
|
| 145 |
"""Empirical device dossier. Each entry is measured by a dedicated
|
| 146 |
probe kernel and carries units, method, the SM clock it ran under, and
|
|
@@ -157,6 +200,9 @@ def probe_device(device="cuda", quick=False):
|
|
| 157 |
"vram_bytes": props.total_memory,
|
| 158 |
"torch": torch.__version__,
|
| 159 |
"cuda_runtime": torch.version.cuda,
|
|
|
|
|
|
|
|
|
|
| 160 |
}
|
| 161 |
}
|
| 162 |
sink = torch.zeros(2, dtype=torch.float32, device=device)
|
|
@@ -332,8 +378,9 @@ def probe_device(device="cuda", quick=False):
|
|
| 332 |
"register-fragment mma_sync loops (wmma; fp8 and "
|
| 333 |
"2:4-sparse fp16 via inline PTX m16n8k32; sparse "
|
| 334 |
"counted dense-equivalent, the vendor convention); "
|
| 335 |
-
"flops
|
| 336 |
-
"
|
|
|
|
| 337 |
clk, "medium",
|
| 338 |
"dense-tile rate without memory traffic; real "
|
| 339 |
"kernels see this only when staging hides behind it")
|
|
|
|
| 141 |
return ring.to(device)
|
| 142 |
|
| 143 |
|
| 144 |
+
def _smi_settings(index):
|
| 145 |
+
"""ECC mode, driver, and power limit via nvidia-smi; None fields
|
| 146 |
+
when the tool is unavailable."""
|
| 147 |
+
import subprocess
|
| 148 |
+
try:
|
| 149 |
+
out = subprocess.run(
|
| 150 |
+
["nvidia-smi", "-i", str(index),
|
| 151 |
+
"--query-gpu=ecc.mode.current,driver_version,power.limit",
|
| 152 |
+
"--format=csv,noheader,nounits"],
|
| 153 |
+
capture_output=True, text=True, timeout=10)
|
| 154 |
+
parts = [p.strip() for p in out.stdout.strip().split(",")]
|
| 155 |
+
if out.returncode == 0 and len(parts) == 3:
|
| 156 |
+
return {
|
| 157 |
+
"ecc": parts[0],
|
| 158 |
+
"driver": parts[1],
|
| 159 |
+
"power_limit_w": float(parts[2]),
|
| 160 |
+
}
|
| 161 |
+
except (OSError, ValueError, subprocess.TimeoutExpired):
|
| 162 |
+
pass
|
| 163 |
+
return {"ecc": None, "driver": None, "power_limit_w": None}
|
| 164 |
+
|
| 165 |
+
|
| 166 |
+
def mma_tile_check(device="cuda", trials=8):
|
| 167 |
+
"""Random small-integer m16n16k16 tiles through the wmma fragment
|
| 168 |
+
path, compared exactly to the reference GEMM; pins M, N, K, and
|
| 169 |
+
operand mapping (integer operands make fp32 accumulation exact)."""
|
| 170 |
+
worst = 0.0
|
| 171 |
+
for t in range(trials):
|
| 172 |
+
g = torch.Generator(device=device).manual_seed(1000 + t)
|
| 173 |
+
a = torch.randint(-3, 4, (16, 16), device=device,
|
| 174 |
+
generator=g).to(torch.float16)
|
| 175 |
+
b = torch.randint(-3, 4, (16, 16), device=device,
|
| 176 |
+
generator=g).to(torch.float16)
|
| 177 |
+
c = torch.zeros(16, 16, device=device, dtype=torch.float32)
|
| 178 |
+
ops.mk_mma_tile(a.contiguous(), b.t().contiguous(), c)
|
| 179 |
+
_sync()
|
| 180 |
+
ref = a.float() @ b.float()
|
| 181 |
+
if not torch.equal(c, ref):
|
| 182 |
+
worst = max(worst, float((c - ref).abs().max().item()))
|
| 183 |
+
return {"exact": worst == 0.0, "max_abs_error": worst,
|
| 184 |
+
"trials": trials}
|
| 185 |
+
|
| 186 |
+
|
| 187 |
def probe_device(device="cuda", quick=False):
|
| 188 |
"""Empirical device dossier. Each entry is measured by a dedicated
|
| 189 |
probe kernel and carries units, method, the SM clock it ran under, and
|
|
|
|
| 200 |
"vram_bytes": props.total_memory,
|
| 201 |
"torch": torch.__version__,
|
| 202 |
"cuda_runtime": torch.version.cuda,
|
| 203 |
+
# instrument settings: readings depend on them, so the
|
| 204 |
+
# dossier records them (None when nvidia-smi is unavailable)
|
| 205 |
+
**_smi_settings(torch.device(device).index or 0),
|
| 206 |
}
|
| 207 |
}
|
| 208 |
sink = torch.zeros(2, dtype=torch.float32, device=device)
|
|
|
|
| 378 |
"register-fragment mma_sync loops (wmma; fp8 and "
|
| 379 |
"2:4-sparse fp16 via inline PTX m16n8k32; sparse "
|
| 380 |
"counted dense-equivalent, the vendor convention); "
|
| 381 |
+
"flops derive from the mean accumulator read-back "
|
| 382 |
+
"with every fragment element observed, never the "
|
| 383 |
+
"declared loop shape",
|
| 384 |
clk, "medium",
|
| 385 |
"dense-tile rate without memory traffic; real "
|
| 386 |
"kernels see this only when staging hides behind it")
|
build/torch211-cxx11-cu128-x86_64-linux/{_metakernel_cuda_1f7e92c.abi3.so → _metakernel_cuda_917bc5f.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:665c40a07c282536e1d1204719ec0b221b548d1bbc18b6989014afdc171f0b82
|
| 3 |
+
size 1155640
|
build/torch211-cxx11-cu128-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _metakernel_cuda_917bc5f
|
| 3 |
+
ops = torch.ops._metakernel_cuda_917bc5f
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_metakernel_cuda_917bc5f::{op_name}"
|
build/torch211-cxx11-cu128-x86_64-linux/_pinned.py
CHANGED
|
@@ -209,83 +209,86 @@ PINNED = {
|
|
| 209 |
},
|
| 210 |
"sm89_nvidiartx6000adagenerati": {
|
| 211 |
"atomics_f32": {
|
| 212 |
-
"clock_ghz": 2.
|
| 213 |
"confidence": "high",
|
| 214 |
"method": "atomicAdd hammer; curve sweeps the number of distinct global addresses from 1 (full contention) to one per thread",
|
| 215 |
"units": "Gop/s",
|
| 216 |
"value": {
|
| 217 |
"curve_slots": {
|
| 218 |
-
"1": 0.
|
| 219 |
-
"145408":
|
| 220 |
-
"4096":
|
| 221 |
-
"512": 55.
|
| 222 |
-
"64": 13.
|
| 223 |
-
"8": 5.
|
| 224 |
},
|
| 225 |
-
"shared_same_addr": 12.
|
| 226 |
}
|
| 227 |
},
|
| 228 |
"clock": {
|
| 229 |
"confidence": "high",
|
| 230 |
-
"final_ghz": 2.
|
| 231 |
-
"max_ghz": 2.
|
| 232 |
"method": "24 back-to-back FMA spin windows of 30M ticks; wall/ticks per window",
|
| 233 |
-
"min_ghz": 2.
|
| 234 |
"sag_pct": 0.3,
|
| 235 |
"units": "GHz"
|
| 236 |
},
|
| 237 |
"device": {
|
| 238 |
"cuda_runtime": "12.6",
|
|
|
|
|
|
|
| 239 |
"l2_bytes": 100663296,
|
| 240 |
"name": "NVIDIA RTX 6000 Ada Generation",
|
|
|
|
| 241 |
"sm_arch": "sm89",
|
| 242 |
"sms": 142,
|
| 243 |
"torch": "2.10.0+cu126",
|
| 244 |
"vram_bytes": 48305274880
|
| 245 |
},
|
| 246 |
"dram_bw": {
|
| 247 |
-
"clock_ghz": 2.
|
| 248 |
"confidence": "high",
|
| 249 |
"method": "streaming triad c=a+s*b per access width; read-only fold; write-only fill; random float4 gather (16B granules, nominal traffic)",
|
| 250 |
"note": "gather moves full cache lines per 16B granule, so its nominal number is the achievable rate for random access, not a line-efficiency claim",
|
| 251 |
"units": "GB/s",
|
| 252 |
"value": {
|
| 253 |
-
"random_gather_16B":
|
| 254 |
-
"read_only":
|
| 255 |
-
"triad_16B":
|
| 256 |
-
"triad_4B":
|
| 257 |
-
"triad_8B":
|
| 258 |
-
"write_only":
|
| 259 |
}
|
| 260 |
},
|
| 261 |
"fma_f32": {
|
| 262 |
-
"clock_ghz": 2.
|
| 263 |
"confidence": "high",
|
| 264 |
"method": "register-resident FMA chains",
|
| 265 |
"units": "TFLOP/s",
|
| 266 |
-
"value":
|
| 267 |
},
|
| 268 |
"fma_f64": {
|
| 269 |
-
"clock_ghz": 2.
|
| 270 |
"confidence": "high",
|
| 271 |
"method": "register-resident double FMA chains (the DFMA pipe)",
|
| 272 |
"units": "TFLOP/s",
|
| 273 |
-
"value": 1.
|
| 274 |
},
|
| 275 |
"grid_barrier": {
|
| 276 |
-
"clock_ghz": 2.
|
| 277 |
"confidence": "high",
|
| 278 |
"method": "cooperative kernel, 142 blocks x 256 threads",
|
| 279 |
"units": "us per grid.sync",
|
| 280 |
"value": 0.54
|
| 281 |
},
|
| 282 |
"l2_bw": {
|
| 283 |
-
"clock_ghz": 2.
|
| 284 |
"confidence": "medium",
|
| 285 |
"method": "in-kernel repeated triad passes over 72 MB resident working set",
|
| 286 |
"note": "first pass streams from HBM; amortized over 64 passes",
|
| 287 |
"units": "GB/s",
|
| 288 |
-
"value":
|
| 289 |
},
|
| 290 |
"latency": {
|
| 291 |
"clock_ghz": 2.687,
|
|
@@ -294,37 +297,37 @@ PINNED = {
|
|
| 294 |
"note": "smem includes index arithmetic; HBM includes residual TLB effects at large footprints",
|
| 295 |
"units": "cycles (single-lane dependent loads)",
|
| 296 |
"value": {
|
| 297 |
-
"dram_cycles":
|
| 298 |
-
"l1_cycles": 45.
|
| 299 |
-
"l2_cycles":
|
| 300 |
"ns_per_cycle": 0.372,
|
| 301 |
"smem_cycles": 30.0
|
| 302 |
}
|
| 303 |
},
|
| 304 |
"launch_overhead": {
|
| 305 |
-
"clock_ghz": 2.
|
| 306 |
"confidence": "high",
|
| 307 |
"method": "empty-kernel trains, queued vs launch+sync",
|
| 308 |
"note": "host-dependent: includes torch op dispatch",
|
| 309 |
"units": "us",
|
| 310 |
"value": {
|
| 311 |
-
"queued_us": 5.
|
| 312 |
-
"round_trip_us": 14.
|
| 313 |
}
|
| 314 |
},
|
| 315 |
"mma": {
|
| 316 |
-
"clock_ghz": 2.
|
| 317 |
"confidence": "medium",
|
| 318 |
-
"method": "register-fragment mma_sync loops (wmma; fp8 and 2:4-sparse fp16 via inline PTX m16n8k32; sparse counted dense-equivalent, the vendor convention); flops
|
| 319 |
"note": "dense-tile rate without memory traffic; real kernels see this only when staging hides behind it",
|
| 320 |
"units": "TFLOP/s (TOP/s for int8)",
|
| 321 |
"value": {
|
| 322 |
-
"bf16":
|
| 323 |
-
"fp16":
|
| 324 |
-
"fp16_sparse_2_4":
|
| 325 |
-
"fp8_e4m3":
|
| 326 |
-
"int8":
|
| 327 |
-
"tf32":
|
| 328 |
},
|
| 329 |
"verified_k_lanes": {
|
| 330 |
"bf16": {
|
|
@@ -354,7 +357,7 @@ PINNED = {
|
|
| 354 |
}
|
| 355 |
},
|
| 356 |
"occupancy_blocks_per_sm": {
|
| 357 |
-
"clock_ghz": 2.
|
| 358 |
"confidence": "high",
|
| 359 |
"method": "occupancy API on the float4 triad kernel",
|
| 360 |
"note": "API-derived, not timing-derived",
|
|
@@ -387,49 +390,49 @@ PINNED = {
|
|
| 387 |
}
|
| 388 |
},
|
| 389 |
"occupancy_knees_fma_tflops": {
|
| 390 |
-
"clock_ghz": 2.
|
| 391 |
"confidence": "high",
|
| 392 |
"method": "a single dependent FMA chain per thread, timed at forced (threads, dyn smem) occupancies over fixed total work; throughput is proportional to resident threads until the pipe saturates, so the cliff marks where occupancy stops covering latency",
|
| 393 |
"note": "timing-derived counterpart to the API table above",
|
| 394 |
"units": "TFLOP/s",
|
| 395 |
"value": {
|
| 396 |
"t1024": {
|
| 397 |
-
"0KB":
|
| 398 |
-
"32KB":
|
| 399 |
-
"48KB":
|
| 400 |
},
|
| 401 |
"t128": {
|
| 402 |
-
"0KB":
|
| 403 |
-
"32KB": 60.
|
| 404 |
-
"48KB":
|
| 405 |
},
|
| 406 |
"t256": {
|
| 407 |
-
"0KB":
|
| 408 |
-
"32KB":
|
| 409 |
-
"48KB":
|
| 410 |
}
|
| 411 |
}
|
| 412 |
},
|
| 413 |
"smem_bw": {
|
| 414 |
-
"clock_ghz": 2.
|
| 415 |
"confidence": "medium",
|
| 416 |
"method": "block-resident read+write streaming (8 B per thread-iteration), aggregated across SMs",
|
| 417 |
"note": "bank-conflict-light access pattern; a conflicted pattern can be far lower",
|
| 418 |
"units": "GB/s",
|
| 419 |
-
"value":
|
| 420 |
},
|
| 421 |
"transfer_bw": {
|
| 422 |
-
"clock_ghz": 2.
|
| 423 |
"confidence": "high",
|
| 424 |
"method": "256 MB torch copies, cudaEvent-timed",
|
| 425 |
"note": "pageable numbers include the staging copy; d2d counts one direction of traffic",
|
| 426 |
"units": "GB/s",
|
| 427 |
"value": {
|
| 428 |
-
"d2d":
|
| 429 |
-
"d2h_pageable":
|
| 430 |
-
"d2h_pinned": 26.
|
| 431 |
-
"h2d_pageable":
|
| 432 |
-
"h2d_pinned":
|
| 433 |
}
|
| 434 |
}
|
| 435 |
}
|
|
|
|
| 209 |
},
|
| 210 |
"sm89_nvidiartx6000adagenerati": {
|
| 211 |
"atomics_f32": {
|
| 212 |
+
"clock_ghz": 2.706,
|
| 213 |
"confidence": "high",
|
| 214 |
"method": "atomicAdd hammer; curve sweeps the number of distinct global addresses from 1 (full contention) to one per thread",
|
| 215 |
"units": "Gop/s",
|
| 216 |
"value": {
|
| 217 |
"curve_slots": {
|
| 218 |
+
"1": 0.72,
|
| 219 |
+
"145408": 483.54,
|
| 220 |
+
"4096": 209.84,
|
| 221 |
+
"512": 55.6,
|
| 222 |
+
"64": 13.82,
|
| 223 |
+
"8": 5.77
|
| 224 |
},
|
| 225 |
+
"shared_same_addr": 12.88
|
| 226 |
}
|
| 227 |
},
|
| 228 |
"clock": {
|
| 229 |
"confidence": "high",
|
| 230 |
+
"final_ghz": 2.699,
|
| 231 |
+
"max_ghz": 2.706,
|
| 232 |
"method": "24 back-to-back FMA spin windows of 30M ticks; wall/ticks per window",
|
| 233 |
+
"min_ghz": 2.501,
|
| 234 |
"sag_pct": 0.3,
|
| 235 |
"units": "GHz"
|
| 236 |
},
|
| 237 |
"device": {
|
| 238 |
"cuda_runtime": "12.6",
|
| 239 |
+
"driver": "595.97",
|
| 240 |
+
"ecc": "Enabled",
|
| 241 |
"l2_bytes": 100663296,
|
| 242 |
"name": "NVIDIA RTX 6000 Ada Generation",
|
| 243 |
+
"power_limit_w": 300.0,
|
| 244 |
"sm_arch": "sm89",
|
| 245 |
"sms": 142,
|
| 246 |
"torch": "2.10.0+cu126",
|
| 247 |
"vram_bytes": 48305274880
|
| 248 |
},
|
| 249 |
"dram_bw": {
|
| 250 |
+
"clock_ghz": 2.706,
|
| 251 |
"confidence": "high",
|
| 252 |
"method": "streaming triad c=a+s*b per access width; read-only fold; write-only fill; random float4 gather (16B granules, nominal traffic)",
|
| 253 |
"note": "gather moves full cache lines per 16B granule, so its nominal number is the achievable rate for random access, not a line-efficiency claim",
|
| 254 |
"units": "GB/s",
|
| 255 |
"value": {
|
| 256 |
+
"random_gather_16B": 218.5,
|
| 257 |
+
"read_only": 771.0,
|
| 258 |
+
"triad_16B": 663.1,
|
| 259 |
+
"triad_4B": 638.3,
|
| 260 |
+
"triad_8B": 705.3,
|
| 261 |
+
"write_only": 766.5
|
| 262 |
}
|
| 263 |
},
|
| 264 |
"fma_f32": {
|
| 265 |
+
"clock_ghz": 2.706,
|
| 266 |
"confidence": "high",
|
| 267 |
"method": "register-resident FMA chains",
|
| 268 |
"units": "TFLOP/s",
|
| 269 |
+
"value": 90.85
|
| 270 |
},
|
| 271 |
"fma_f64": {
|
| 272 |
+
"clock_ghz": 2.706,
|
| 273 |
"confidence": "high",
|
| 274 |
"method": "register-resident double FMA chains (the DFMA pipe)",
|
| 275 |
"units": "TFLOP/s",
|
| 276 |
+
"value": 1.282
|
| 277 |
},
|
| 278 |
"grid_barrier": {
|
| 279 |
+
"clock_ghz": 2.706,
|
| 280 |
"confidence": "high",
|
| 281 |
"method": "cooperative kernel, 142 blocks x 256 threads",
|
| 282 |
"units": "us per grid.sync",
|
| 283 |
"value": 0.54
|
| 284 |
},
|
| 285 |
"l2_bw": {
|
| 286 |
+
"clock_ghz": 2.706,
|
| 287 |
"confidence": "medium",
|
| 288 |
"method": "in-kernel repeated triad passes over 72 MB resident working set",
|
| 289 |
"note": "first pass streams from HBM; amortized over 64 passes",
|
| 290 |
"units": "GB/s",
|
| 291 |
+
"value": 9325.3
|
| 292 |
},
|
| 293 |
"latency": {
|
| 294 |
"clock_ghz": 2.687,
|
|
|
|
| 297 |
"note": "smem includes index arithmetic; HBM includes residual TLB effects at large footprints",
|
| 298 |
"units": "cycles (single-lane dependent loads)",
|
| 299 |
"value": {
|
| 300 |
+
"dram_cycles": 649.4,
|
| 301 |
+
"l1_cycles": 45.8,
|
| 302 |
+
"l2_cycles": 291.5,
|
| 303 |
"ns_per_cycle": 0.372,
|
| 304 |
"smem_cycles": 30.0
|
| 305 |
}
|
| 306 |
},
|
| 307 |
"launch_overhead": {
|
| 308 |
+
"clock_ghz": 2.706,
|
| 309 |
"confidence": "high",
|
| 310 |
"method": "empty-kernel trains, queued vs launch+sync",
|
| 311 |
"note": "host-dependent: includes torch op dispatch",
|
| 312 |
"units": "us",
|
| 313 |
"value": {
|
| 314 |
+
"queued_us": 5.55,
|
| 315 |
+
"round_trip_us": 14.1
|
| 316 |
}
|
| 317 |
},
|
| 318 |
"mma": {
|
| 319 |
+
"clock_ghz": 2.706,
|
| 320 |
"confidence": "medium",
|
| 321 |
+
"method": "register-fragment mma_sync loops (wmma; fp8 and 2:4-sparse fp16 via inline PTX m16n8k32; sparse counted dense-equivalent, the vendor convention); flops derive from the mean accumulator read-back with every fragment element observed, never the declared loop shape",
|
| 322 |
"note": "dense-tile rate without memory traffic; real kernels see this only when staging hides behind it",
|
| 323 |
"units": "TFLOP/s (TOP/s for int8)",
|
| 324 |
"value": {
|
| 325 |
+
"bf16": 365.5,
|
| 326 |
+
"fp16": 375.9,
|
| 327 |
+
"fp16_sparse_2_4": 713.4,
|
| 328 |
+
"fp8_e4m3": 193.7,
|
| 329 |
+
"int8": 770.4,
|
| 330 |
+
"tf32": 177.1
|
| 331 |
},
|
| 332 |
"verified_k_lanes": {
|
| 333 |
"bf16": {
|
|
|
|
| 357 |
}
|
| 358 |
},
|
| 359 |
"occupancy_blocks_per_sm": {
|
| 360 |
+
"clock_ghz": 2.706,
|
| 361 |
"confidence": "high",
|
| 362 |
"method": "occupancy API on the float4 triad kernel",
|
| 363 |
"note": "API-derived, not timing-derived",
|
|
|
|
| 390 |
}
|
| 391 |
},
|
| 392 |
"occupancy_knees_fma_tflops": {
|
| 393 |
+
"clock_ghz": 2.706,
|
| 394 |
"confidence": "high",
|
| 395 |
"method": "a single dependent FMA chain per thread, timed at forced (threads, dyn smem) occupancies over fixed total work; throughput is proportional to resident threads until the pipe saturates, so the cliff marks where occupancy stops covering latency",
|
| 396 |
"note": "timing-derived counterpart to the API table above",
|
| 397 |
"units": "TFLOP/s",
|
| 398 |
"value": {
|
| 399 |
"t1024": {
|
| 400 |
+
"0KB": 75.5,
|
| 401 |
+
"32KB": 73.66,
|
| 402 |
+
"48KB": 74.95
|
| 403 |
},
|
| 404 |
"t128": {
|
| 405 |
+
"0KB": 79.86,
|
| 406 |
+
"32KB": 60.31,
|
| 407 |
+
"48KB": 44.57
|
| 408 |
},
|
| 409 |
"t256": {
|
| 410 |
+
"0KB": 81.69,
|
| 411 |
+
"32KB": 79.48,
|
| 412 |
+
"48KB": 71.47
|
| 413 |
}
|
| 414 |
}
|
| 415 |
},
|
| 416 |
"smem_bw": {
|
| 417 |
+
"clock_ghz": 2.706,
|
| 418 |
"confidence": "medium",
|
| 419 |
"method": "block-resident read+write streaming (8 B per thread-iteration), aggregated across SMs",
|
| 420 |
"note": "bank-conflict-light access pattern; a conflicted pattern can be far lower",
|
| 421 |
"units": "GB/s",
|
| 422 |
+
"value": 21250.0
|
| 423 |
},
|
| 424 |
"transfer_bw": {
|
| 425 |
+
"clock_ghz": 2.706,
|
| 426 |
"confidence": "high",
|
| 427 |
"method": "256 MB torch copies, cudaEvent-timed",
|
| 428 |
"note": "pageable numbers include the staging copy; d2d counts one direction of traffic",
|
| 429 |
"units": "GB/s",
|
| 430 |
"value": {
|
| 431 |
+
"d2d": 330.7,
|
| 432 |
+
"d2h_pageable": 15.6,
|
| 433 |
+
"d2h_pinned": 26.2,
|
| 434 |
+
"h2d_pageable": 16.6,
|
| 435 |
+
"h2d_pinned": 24.0
|
| 436 |
}
|
| 437 |
}
|
| 438 |
}
|
build/torch211-cxx11-cu128-x86_64-linux/metadata.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"name": "metakernel",
|
| 3 |
-
"id": "
|
| 4 |
"version": 1,
|
| 5 |
"license": "Apache-2.0",
|
| 6 |
"python-depends": [],
|
|
@@ -18,10 +18,10 @@
|
|
| 18 |
"digest": {
|
| 19 |
"algorithm": "sha256",
|
| 20 |
"files": {
|
| 21 |
-
"__init__.py": "
|
| 22 |
-
"
|
| 23 |
-
"_ops.py": "
|
| 24 |
-
"_pinned.py": "
|
| 25 |
"metakernel/__init__.py": "DFYPlrhXwYjEqCl/8n0SmWGZV8NFml5DPhMjKfv98GY="
|
| 26 |
}
|
| 27 |
},
|
|
@@ -32,7 +32,7 @@
|
|
| 32 |
"dirty": false
|
| 33 |
},
|
| 34 |
"kernel": {
|
| 35 |
-
"sha": "
|
| 36 |
"dirty": false
|
| 37 |
}
|
| 38 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"name": "metakernel",
|
| 3 |
+
"id": "_metakernel_cuda_917bc5f",
|
| 4 |
"version": 1,
|
| 5 |
"license": "Apache-2.0",
|
| 6 |
"python-depends": [],
|
|
|
|
| 18 |
"digest": {
|
| 19 |
"algorithm": "sha256",
|
| 20 |
"files": {
|
| 21 |
+
"__init__.py": "j+f09TbMQC/dkaD/Ls5Ig7CHJ/yTI1syrDZhJVpz4rA=",
|
| 22 |
+
"_metakernel_cuda_917bc5f.abi3.so": "ZlxAoHwoJTbh0SBHGewLIhtUjRu8GLaYkBSv3BcfC4I=",
|
| 23 |
+
"_ops.py": "HaN7LmS0+rYVmkKdGje8u4il8c3tQT0x4w4iwQvC8qY=",
|
| 24 |
+
"_pinned.py": "cRCc88scJyKco8+sKHXkGFaeXl07lvtC4hrfO/gQ1HU=",
|
| 25 |
"metakernel/__init__.py": "DFYPlrhXwYjEqCl/8n0SmWGZV8NFml5DPhMjKfv98GY="
|
| 26 |
}
|
| 27 |
},
|
|
|
|
| 32 |
"dirty": false
|
| 33 |
},
|
| 34 |
"kernel": {
|
| 35 |
+
"sha": "917bc5f20b9abdcd0f8afec590cc2eaa27764e8c",
|
| 36 |
"dirty": false
|
| 37 |
}
|
| 38 |
}
|
build/torch211-cxx11-cu130-x86_64-linux/__init__.py
CHANGED
|
@@ -141,6 +141,49 @@ def _sattolo_ring(n, device, generator=None):
|
|
| 141 |
return ring.to(device)
|
| 142 |
|
| 143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
def probe_device(device="cuda", quick=False):
|
| 145 |
"""Empirical device dossier. Each entry is measured by a dedicated
|
| 146 |
probe kernel and carries units, method, the SM clock it ran under, and
|
|
@@ -157,6 +200,9 @@ def probe_device(device="cuda", quick=False):
|
|
| 157 |
"vram_bytes": props.total_memory,
|
| 158 |
"torch": torch.__version__,
|
| 159 |
"cuda_runtime": torch.version.cuda,
|
|
|
|
|
|
|
|
|
|
| 160 |
}
|
| 161 |
}
|
| 162 |
sink = torch.zeros(2, dtype=torch.float32, device=device)
|
|
@@ -332,8 +378,9 @@ def probe_device(device="cuda", quick=False):
|
|
| 332 |
"register-fragment mma_sync loops (wmma; fp8 and "
|
| 333 |
"2:4-sparse fp16 via inline PTX m16n8k32; sparse "
|
| 334 |
"counted dense-equivalent, the vendor convention); "
|
| 335 |
-
"flops
|
| 336 |
-
"
|
|
|
|
| 337 |
clk, "medium",
|
| 338 |
"dense-tile rate without memory traffic; real "
|
| 339 |
"kernels see this only when staging hides behind it")
|
|
|
|
| 141 |
return ring.to(device)
|
| 142 |
|
| 143 |
|
| 144 |
+
def _smi_settings(index):
|
| 145 |
+
"""ECC mode, driver, and power limit via nvidia-smi; None fields
|
| 146 |
+
when the tool is unavailable."""
|
| 147 |
+
import subprocess
|
| 148 |
+
try:
|
| 149 |
+
out = subprocess.run(
|
| 150 |
+
["nvidia-smi", "-i", str(index),
|
| 151 |
+
"--query-gpu=ecc.mode.current,driver_version,power.limit",
|
| 152 |
+
"--format=csv,noheader,nounits"],
|
| 153 |
+
capture_output=True, text=True, timeout=10)
|
| 154 |
+
parts = [p.strip() for p in out.stdout.strip().split(",")]
|
| 155 |
+
if out.returncode == 0 and len(parts) == 3:
|
| 156 |
+
return {
|
| 157 |
+
"ecc": parts[0],
|
| 158 |
+
"driver": parts[1],
|
| 159 |
+
"power_limit_w": float(parts[2]),
|
| 160 |
+
}
|
| 161 |
+
except (OSError, ValueError, subprocess.TimeoutExpired):
|
| 162 |
+
pass
|
| 163 |
+
return {"ecc": None, "driver": None, "power_limit_w": None}
|
| 164 |
+
|
| 165 |
+
|
| 166 |
+
def mma_tile_check(device="cuda", trials=8):
|
| 167 |
+
"""Random small-integer m16n16k16 tiles through the wmma fragment
|
| 168 |
+
path, compared exactly to the reference GEMM; pins M, N, K, and
|
| 169 |
+
operand mapping (integer operands make fp32 accumulation exact)."""
|
| 170 |
+
worst = 0.0
|
| 171 |
+
for t in range(trials):
|
| 172 |
+
g = torch.Generator(device=device).manual_seed(1000 + t)
|
| 173 |
+
a = torch.randint(-3, 4, (16, 16), device=device,
|
| 174 |
+
generator=g).to(torch.float16)
|
| 175 |
+
b = torch.randint(-3, 4, (16, 16), device=device,
|
| 176 |
+
generator=g).to(torch.float16)
|
| 177 |
+
c = torch.zeros(16, 16, device=device, dtype=torch.float32)
|
| 178 |
+
ops.mk_mma_tile(a.contiguous(), b.t().contiguous(), c)
|
| 179 |
+
_sync()
|
| 180 |
+
ref = a.float() @ b.float()
|
| 181 |
+
if not torch.equal(c, ref):
|
| 182 |
+
worst = max(worst, float((c - ref).abs().max().item()))
|
| 183 |
+
return {"exact": worst == 0.0, "max_abs_error": worst,
|
| 184 |
+
"trials": trials}
|
| 185 |
+
|
| 186 |
+
|
| 187 |
def probe_device(device="cuda", quick=False):
|
| 188 |
"""Empirical device dossier. Each entry is measured by a dedicated
|
| 189 |
probe kernel and carries units, method, the SM clock it ran under, and
|
|
|
|
| 200 |
"vram_bytes": props.total_memory,
|
| 201 |
"torch": torch.__version__,
|
| 202 |
"cuda_runtime": torch.version.cuda,
|
| 203 |
+
# instrument settings: readings depend on them, so the
|
| 204 |
+
# dossier records them (None when nvidia-smi is unavailable)
|
| 205 |
+
**_smi_settings(torch.device(device).index or 0),
|
| 206 |
}
|
| 207 |
}
|
| 208 |
sink = torch.zeros(2, dtype=torch.float32, device=device)
|
|
|
|
| 378 |
"register-fragment mma_sync loops (wmma; fp8 and "
|
| 379 |
"2:4-sparse fp16 via inline PTX m16n8k32; sparse "
|
| 380 |
"counted dense-equivalent, the vendor convention); "
|
| 381 |
+
"flops derive from the mean accumulator read-back "
|
| 382 |
+
"with every fragment element observed, never the "
|
| 383 |
+
"declared loop shape",
|
| 384 |
clk, "medium",
|
| 385 |
"dense-tile rate without memory traffic; real "
|
| 386 |
"kernels see this only when staging hides behind it")
|
build/torch211-cxx11-cu130-x86_64-linux/{_metakernel_cuda_1f7e92c.abi3.so → _metakernel_cuda_917bc5f.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6908520f65a818eacfc656675c3dc0a678065108d4073b4d936204cbc3d0959d
|
| 3 |
+
size 1174024
|
build/torch211-cxx11-cu130-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _metakernel_cuda_917bc5f
|
| 3 |
+
ops = torch.ops._metakernel_cuda_917bc5f
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_metakernel_cuda_917bc5f::{op_name}"
|
build/torch211-cxx11-cu130-x86_64-linux/_pinned.py
CHANGED
|
@@ -209,83 +209,86 @@ PINNED = {
|
|
| 209 |
},
|
| 210 |
"sm89_nvidiartx6000adagenerati": {
|
| 211 |
"atomics_f32": {
|
| 212 |
-
"clock_ghz": 2.
|
| 213 |
"confidence": "high",
|
| 214 |
"method": "atomicAdd hammer; curve sweeps the number of distinct global addresses from 1 (full contention) to one per thread",
|
| 215 |
"units": "Gop/s",
|
| 216 |
"value": {
|
| 217 |
"curve_slots": {
|
| 218 |
-
"1": 0.
|
| 219 |
-
"145408":
|
| 220 |
-
"4096":
|
| 221 |
-
"512": 55.
|
| 222 |
-
"64": 13.
|
| 223 |
-
"8": 5.
|
| 224 |
},
|
| 225 |
-
"shared_same_addr": 12.
|
| 226 |
}
|
| 227 |
},
|
| 228 |
"clock": {
|
| 229 |
"confidence": "high",
|
| 230 |
-
"final_ghz": 2.
|
| 231 |
-
"max_ghz": 2.
|
| 232 |
"method": "24 back-to-back FMA spin windows of 30M ticks; wall/ticks per window",
|
| 233 |
-
"min_ghz": 2.
|
| 234 |
"sag_pct": 0.3,
|
| 235 |
"units": "GHz"
|
| 236 |
},
|
| 237 |
"device": {
|
| 238 |
"cuda_runtime": "12.6",
|
|
|
|
|
|
|
| 239 |
"l2_bytes": 100663296,
|
| 240 |
"name": "NVIDIA RTX 6000 Ada Generation",
|
|
|
|
| 241 |
"sm_arch": "sm89",
|
| 242 |
"sms": 142,
|
| 243 |
"torch": "2.10.0+cu126",
|
| 244 |
"vram_bytes": 48305274880
|
| 245 |
},
|
| 246 |
"dram_bw": {
|
| 247 |
-
"clock_ghz": 2.
|
| 248 |
"confidence": "high",
|
| 249 |
"method": "streaming triad c=a+s*b per access width; read-only fold; write-only fill; random float4 gather (16B granules, nominal traffic)",
|
| 250 |
"note": "gather moves full cache lines per 16B granule, so its nominal number is the achievable rate for random access, not a line-efficiency claim",
|
| 251 |
"units": "GB/s",
|
| 252 |
"value": {
|
| 253 |
-
"random_gather_16B":
|
| 254 |
-
"read_only":
|
| 255 |
-
"triad_16B":
|
| 256 |
-
"triad_4B":
|
| 257 |
-
"triad_8B":
|
| 258 |
-
"write_only":
|
| 259 |
}
|
| 260 |
},
|
| 261 |
"fma_f32": {
|
| 262 |
-
"clock_ghz": 2.
|
| 263 |
"confidence": "high",
|
| 264 |
"method": "register-resident FMA chains",
|
| 265 |
"units": "TFLOP/s",
|
| 266 |
-
"value":
|
| 267 |
},
|
| 268 |
"fma_f64": {
|
| 269 |
-
"clock_ghz": 2.
|
| 270 |
"confidence": "high",
|
| 271 |
"method": "register-resident double FMA chains (the DFMA pipe)",
|
| 272 |
"units": "TFLOP/s",
|
| 273 |
-
"value": 1.
|
| 274 |
},
|
| 275 |
"grid_barrier": {
|
| 276 |
-
"clock_ghz": 2.
|
| 277 |
"confidence": "high",
|
| 278 |
"method": "cooperative kernel, 142 blocks x 256 threads",
|
| 279 |
"units": "us per grid.sync",
|
| 280 |
"value": 0.54
|
| 281 |
},
|
| 282 |
"l2_bw": {
|
| 283 |
-
"clock_ghz": 2.
|
| 284 |
"confidence": "medium",
|
| 285 |
"method": "in-kernel repeated triad passes over 72 MB resident working set",
|
| 286 |
"note": "first pass streams from HBM; amortized over 64 passes",
|
| 287 |
"units": "GB/s",
|
| 288 |
-
"value":
|
| 289 |
},
|
| 290 |
"latency": {
|
| 291 |
"clock_ghz": 2.687,
|
|
@@ -294,37 +297,37 @@ PINNED = {
|
|
| 294 |
"note": "smem includes index arithmetic; HBM includes residual TLB effects at large footprints",
|
| 295 |
"units": "cycles (single-lane dependent loads)",
|
| 296 |
"value": {
|
| 297 |
-
"dram_cycles":
|
| 298 |
-
"l1_cycles": 45.
|
| 299 |
-
"l2_cycles":
|
| 300 |
"ns_per_cycle": 0.372,
|
| 301 |
"smem_cycles": 30.0
|
| 302 |
}
|
| 303 |
},
|
| 304 |
"launch_overhead": {
|
| 305 |
-
"clock_ghz": 2.
|
| 306 |
"confidence": "high",
|
| 307 |
"method": "empty-kernel trains, queued vs launch+sync",
|
| 308 |
"note": "host-dependent: includes torch op dispatch",
|
| 309 |
"units": "us",
|
| 310 |
"value": {
|
| 311 |
-
"queued_us": 5.
|
| 312 |
-
"round_trip_us": 14.
|
| 313 |
}
|
| 314 |
},
|
| 315 |
"mma": {
|
| 316 |
-
"clock_ghz": 2.
|
| 317 |
"confidence": "medium",
|
| 318 |
-
"method": "register-fragment mma_sync loops (wmma; fp8 and 2:4-sparse fp16 via inline PTX m16n8k32; sparse counted dense-equivalent, the vendor convention); flops
|
| 319 |
"note": "dense-tile rate without memory traffic; real kernels see this only when staging hides behind it",
|
| 320 |
"units": "TFLOP/s (TOP/s for int8)",
|
| 321 |
"value": {
|
| 322 |
-
"bf16":
|
| 323 |
-
"fp16":
|
| 324 |
-
"fp16_sparse_2_4":
|
| 325 |
-
"fp8_e4m3":
|
| 326 |
-
"int8":
|
| 327 |
-
"tf32":
|
| 328 |
},
|
| 329 |
"verified_k_lanes": {
|
| 330 |
"bf16": {
|
|
@@ -354,7 +357,7 @@ PINNED = {
|
|
| 354 |
}
|
| 355 |
},
|
| 356 |
"occupancy_blocks_per_sm": {
|
| 357 |
-
"clock_ghz": 2.
|
| 358 |
"confidence": "high",
|
| 359 |
"method": "occupancy API on the float4 triad kernel",
|
| 360 |
"note": "API-derived, not timing-derived",
|
|
@@ -387,49 +390,49 @@ PINNED = {
|
|
| 387 |
}
|
| 388 |
},
|
| 389 |
"occupancy_knees_fma_tflops": {
|
| 390 |
-
"clock_ghz": 2.
|
| 391 |
"confidence": "high",
|
| 392 |
"method": "a single dependent FMA chain per thread, timed at forced (threads, dyn smem) occupancies over fixed total work; throughput is proportional to resident threads until the pipe saturates, so the cliff marks where occupancy stops covering latency",
|
| 393 |
"note": "timing-derived counterpart to the API table above",
|
| 394 |
"units": "TFLOP/s",
|
| 395 |
"value": {
|
| 396 |
"t1024": {
|
| 397 |
-
"0KB":
|
| 398 |
-
"32KB":
|
| 399 |
-
"48KB":
|
| 400 |
},
|
| 401 |
"t128": {
|
| 402 |
-
"0KB":
|
| 403 |
-
"32KB": 60.
|
| 404 |
-
"48KB":
|
| 405 |
},
|
| 406 |
"t256": {
|
| 407 |
-
"0KB":
|
| 408 |
-
"32KB":
|
| 409 |
-
"48KB":
|
| 410 |
}
|
| 411 |
}
|
| 412 |
},
|
| 413 |
"smem_bw": {
|
| 414 |
-
"clock_ghz": 2.
|
| 415 |
"confidence": "medium",
|
| 416 |
"method": "block-resident read+write streaming (8 B per thread-iteration), aggregated across SMs",
|
| 417 |
"note": "bank-conflict-light access pattern; a conflicted pattern can be far lower",
|
| 418 |
"units": "GB/s",
|
| 419 |
-
"value":
|
| 420 |
},
|
| 421 |
"transfer_bw": {
|
| 422 |
-
"clock_ghz": 2.
|
| 423 |
"confidence": "high",
|
| 424 |
"method": "256 MB torch copies, cudaEvent-timed",
|
| 425 |
"note": "pageable numbers include the staging copy; d2d counts one direction of traffic",
|
| 426 |
"units": "GB/s",
|
| 427 |
"value": {
|
| 428 |
-
"d2d":
|
| 429 |
-
"d2h_pageable":
|
| 430 |
-
"d2h_pinned": 26.
|
| 431 |
-
"h2d_pageable":
|
| 432 |
-
"h2d_pinned":
|
| 433 |
}
|
| 434 |
}
|
| 435 |
}
|
|
|
|
| 209 |
},
|
| 210 |
"sm89_nvidiartx6000adagenerati": {
|
| 211 |
"atomics_f32": {
|
| 212 |
+
"clock_ghz": 2.706,
|
| 213 |
"confidence": "high",
|
| 214 |
"method": "atomicAdd hammer; curve sweeps the number of distinct global addresses from 1 (full contention) to one per thread",
|
| 215 |
"units": "Gop/s",
|
| 216 |
"value": {
|
| 217 |
"curve_slots": {
|
| 218 |
+
"1": 0.72,
|
| 219 |
+
"145408": 483.54,
|
| 220 |
+
"4096": 209.84,
|
| 221 |
+
"512": 55.6,
|
| 222 |
+
"64": 13.82,
|
| 223 |
+
"8": 5.77
|
| 224 |
},
|
| 225 |
+
"shared_same_addr": 12.88
|
| 226 |
}
|
| 227 |
},
|
| 228 |
"clock": {
|
| 229 |
"confidence": "high",
|
| 230 |
+
"final_ghz": 2.699,
|
| 231 |
+
"max_ghz": 2.706,
|
| 232 |
"method": "24 back-to-back FMA spin windows of 30M ticks; wall/ticks per window",
|
| 233 |
+
"min_ghz": 2.501,
|
| 234 |
"sag_pct": 0.3,
|
| 235 |
"units": "GHz"
|
| 236 |
},
|
| 237 |
"device": {
|
| 238 |
"cuda_runtime": "12.6",
|
| 239 |
+
"driver": "595.97",
|
| 240 |
+
"ecc": "Enabled",
|
| 241 |
"l2_bytes": 100663296,
|
| 242 |
"name": "NVIDIA RTX 6000 Ada Generation",
|
| 243 |
+
"power_limit_w": 300.0,
|
| 244 |
"sm_arch": "sm89",
|
| 245 |
"sms": 142,
|
| 246 |
"torch": "2.10.0+cu126",
|
| 247 |
"vram_bytes": 48305274880
|
| 248 |
},
|
| 249 |
"dram_bw": {
|
| 250 |
+
"clock_ghz": 2.706,
|
| 251 |
"confidence": "high",
|
| 252 |
"method": "streaming triad c=a+s*b per access width; read-only fold; write-only fill; random float4 gather (16B granules, nominal traffic)",
|
| 253 |
"note": "gather moves full cache lines per 16B granule, so its nominal number is the achievable rate for random access, not a line-efficiency claim",
|
| 254 |
"units": "GB/s",
|
| 255 |
"value": {
|
| 256 |
+
"random_gather_16B": 218.5,
|
| 257 |
+
"read_only": 771.0,
|
| 258 |
+
"triad_16B": 663.1,
|
| 259 |
+
"triad_4B": 638.3,
|
| 260 |
+
"triad_8B": 705.3,
|
| 261 |
+
"write_only": 766.5
|
| 262 |
}
|
| 263 |
},
|
| 264 |
"fma_f32": {
|
| 265 |
+
"clock_ghz": 2.706,
|
| 266 |
"confidence": "high",
|
| 267 |
"method": "register-resident FMA chains",
|
| 268 |
"units": "TFLOP/s",
|
| 269 |
+
"value": 90.85
|
| 270 |
},
|
| 271 |
"fma_f64": {
|
| 272 |
+
"clock_ghz": 2.706,
|
| 273 |
"confidence": "high",
|
| 274 |
"method": "register-resident double FMA chains (the DFMA pipe)",
|
| 275 |
"units": "TFLOP/s",
|
| 276 |
+
"value": 1.282
|
| 277 |
},
|
| 278 |
"grid_barrier": {
|
| 279 |
+
"clock_ghz": 2.706,
|
| 280 |
"confidence": "high",
|
| 281 |
"method": "cooperative kernel, 142 blocks x 256 threads",
|
| 282 |
"units": "us per grid.sync",
|
| 283 |
"value": 0.54
|
| 284 |
},
|
| 285 |
"l2_bw": {
|
| 286 |
+
"clock_ghz": 2.706,
|
| 287 |
"confidence": "medium",
|
| 288 |
"method": "in-kernel repeated triad passes over 72 MB resident working set",
|
| 289 |
"note": "first pass streams from HBM; amortized over 64 passes",
|
| 290 |
"units": "GB/s",
|
| 291 |
+
"value": 9325.3
|
| 292 |
},
|
| 293 |
"latency": {
|
| 294 |
"clock_ghz": 2.687,
|
|
|
|
| 297 |
"note": "smem includes index arithmetic; HBM includes residual TLB effects at large footprints",
|
| 298 |
"units": "cycles (single-lane dependent loads)",
|
| 299 |
"value": {
|
| 300 |
+
"dram_cycles": 649.4,
|
| 301 |
+
"l1_cycles": 45.8,
|
| 302 |
+
"l2_cycles": 291.5,
|
| 303 |
"ns_per_cycle": 0.372,
|
| 304 |
"smem_cycles": 30.0
|
| 305 |
}
|
| 306 |
},
|
| 307 |
"launch_overhead": {
|
| 308 |
+
"clock_ghz": 2.706,
|
| 309 |
"confidence": "high",
|
| 310 |
"method": "empty-kernel trains, queued vs launch+sync",
|
| 311 |
"note": "host-dependent: includes torch op dispatch",
|
| 312 |
"units": "us",
|
| 313 |
"value": {
|
| 314 |
+
"queued_us": 5.55,
|
| 315 |
+
"round_trip_us": 14.1
|
| 316 |
}
|
| 317 |
},
|
| 318 |
"mma": {
|
| 319 |
+
"clock_ghz": 2.706,
|
| 320 |
"confidence": "medium",
|
| 321 |
+
"method": "register-fragment mma_sync loops (wmma; fp8 and 2:4-sparse fp16 via inline PTX m16n8k32; sparse counted dense-equivalent, the vendor convention); flops derive from the mean accumulator read-back with every fragment element observed, never the declared loop shape",
|
| 322 |
"note": "dense-tile rate without memory traffic; real kernels see this only when staging hides behind it",
|
| 323 |
"units": "TFLOP/s (TOP/s for int8)",
|
| 324 |
"value": {
|
| 325 |
+
"bf16": 365.5,
|
| 326 |
+
"fp16": 375.9,
|
| 327 |
+
"fp16_sparse_2_4": 713.4,
|
| 328 |
+
"fp8_e4m3": 193.7,
|
| 329 |
+
"int8": 770.4,
|
| 330 |
+
"tf32": 177.1
|
| 331 |
},
|
| 332 |
"verified_k_lanes": {
|
| 333 |
"bf16": {
|
|
|
|
| 357 |
}
|
| 358 |
},
|
| 359 |
"occupancy_blocks_per_sm": {
|
| 360 |
+
"clock_ghz": 2.706,
|
| 361 |
"confidence": "high",
|
| 362 |
"method": "occupancy API on the float4 triad kernel",
|
| 363 |
"note": "API-derived, not timing-derived",
|
|
|
|
| 390 |
}
|
| 391 |
},
|
| 392 |
"occupancy_knees_fma_tflops": {
|
| 393 |
+
"clock_ghz": 2.706,
|
| 394 |
"confidence": "high",
|
| 395 |
"method": "a single dependent FMA chain per thread, timed at forced (threads, dyn smem) occupancies over fixed total work; throughput is proportional to resident threads until the pipe saturates, so the cliff marks where occupancy stops covering latency",
|
| 396 |
"note": "timing-derived counterpart to the API table above",
|
| 397 |
"units": "TFLOP/s",
|
| 398 |
"value": {
|
| 399 |
"t1024": {
|
| 400 |
+
"0KB": 75.5,
|
| 401 |
+
"32KB": 73.66,
|
| 402 |
+
"48KB": 74.95
|
| 403 |
},
|
| 404 |
"t128": {
|
| 405 |
+
"0KB": 79.86,
|
| 406 |
+
"32KB": 60.31,
|
| 407 |
+
"48KB": 44.57
|
| 408 |
},
|
| 409 |
"t256": {
|
| 410 |
+
"0KB": 81.69,
|
| 411 |
+
"32KB": 79.48,
|
| 412 |
+
"48KB": 71.47
|
| 413 |
}
|
| 414 |
}
|
| 415 |
},
|
| 416 |
"smem_bw": {
|
| 417 |
+
"clock_ghz": 2.706,
|
| 418 |
"confidence": "medium",
|
| 419 |
"method": "block-resident read+write streaming (8 B per thread-iteration), aggregated across SMs",
|
| 420 |
"note": "bank-conflict-light access pattern; a conflicted pattern can be far lower",
|
| 421 |
"units": "GB/s",
|
| 422 |
+
"value": 21250.0
|
| 423 |
},
|
| 424 |
"transfer_bw": {
|
| 425 |
+
"clock_ghz": 2.706,
|
| 426 |
"confidence": "high",
|
| 427 |
"method": "256 MB torch copies, cudaEvent-timed",
|
| 428 |
"note": "pageable numbers include the staging copy; d2d counts one direction of traffic",
|
| 429 |
"units": "GB/s",
|
| 430 |
"value": {
|
| 431 |
+
"d2d": 330.7,
|
| 432 |
+
"d2h_pageable": 15.6,
|
| 433 |
+
"d2h_pinned": 26.2,
|
| 434 |
+
"h2d_pageable": 16.6,
|
| 435 |
+
"h2d_pinned": 24.0
|
| 436 |
}
|
| 437 |
}
|
| 438 |
}
|
build/torch211-cxx11-cu130-x86_64-linux/metadata.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"name": "metakernel",
|
| 3 |
-
"id": "
|
| 4 |
"version": 1,
|
| 5 |
"license": "Apache-2.0",
|
| 6 |
"python-depends": [],
|
|
@@ -18,10 +18,10 @@
|
|
| 18 |
"digest": {
|
| 19 |
"algorithm": "sha256",
|
| 20 |
"files": {
|
| 21 |
-
"__init__.py": "
|
| 22 |
-
"
|
| 23 |
-
"_ops.py": "
|
| 24 |
-
"_pinned.py": "
|
| 25 |
"metakernel/__init__.py": "DFYPlrhXwYjEqCl/8n0SmWGZV8NFml5DPhMjKfv98GY="
|
| 26 |
}
|
| 27 |
},
|
|
@@ -32,7 +32,7 @@
|
|
| 32 |
"dirty": false
|
| 33 |
},
|
| 34 |
"kernel": {
|
| 35 |
-
"sha": "
|
| 36 |
"dirty": false
|
| 37 |
}
|
| 38 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"name": "metakernel",
|
| 3 |
+
"id": "_metakernel_cuda_917bc5f",
|
| 4 |
"version": 1,
|
| 5 |
"license": "Apache-2.0",
|
| 6 |
"python-depends": [],
|
|
|
|
| 18 |
"digest": {
|
| 19 |
"algorithm": "sha256",
|
| 20 |
"files": {
|
| 21 |
+
"__init__.py": "j+f09TbMQC/dkaD/Ls5Ig7CHJ/yTI1syrDZhJVpz4rA=",
|
| 22 |
+
"_metakernel_cuda_917bc5f.abi3.so": "aQhSD2WoGOrPxlZnXD3ApngGUQjUBztNk2IEy8PQlZ0=",
|
| 23 |
+
"_ops.py": "HaN7LmS0+rYVmkKdGje8u4il8c3tQT0x4w4iwQvC8qY=",
|
| 24 |
+
"_pinned.py": "cRCc88scJyKco8+sKHXkGFaeXl07lvtC4hrfO/gQ1HU=",
|
| 25 |
"metakernel/__init__.py": "DFYPlrhXwYjEqCl/8n0SmWGZV8NFml5DPhMjKfv98GY="
|
| 26 |
}
|
| 27 |
},
|
|
|
|
| 32 |
"dirty": false
|
| 33 |
},
|
| 34 |
"kernel": {
|
| 35 |
+
"sha": "917bc5f20b9abdcd0f8afec590cc2eaa27764e8c",
|
| 36 |
"dirty": false
|
| 37 |
}
|
| 38 |
}
|
build/torch212-cxx11-cu126-x86_64-linux/__init__.py
CHANGED
|
@@ -141,6 +141,49 @@ def _sattolo_ring(n, device, generator=None):
|
|
| 141 |
return ring.to(device)
|
| 142 |
|
| 143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
def probe_device(device="cuda", quick=False):
|
| 145 |
"""Empirical device dossier. Each entry is measured by a dedicated
|
| 146 |
probe kernel and carries units, method, the SM clock it ran under, and
|
|
@@ -157,6 +200,9 @@ def probe_device(device="cuda", quick=False):
|
|
| 157 |
"vram_bytes": props.total_memory,
|
| 158 |
"torch": torch.__version__,
|
| 159 |
"cuda_runtime": torch.version.cuda,
|
|
|
|
|
|
|
|
|
|
| 160 |
}
|
| 161 |
}
|
| 162 |
sink = torch.zeros(2, dtype=torch.float32, device=device)
|
|
@@ -332,8 +378,9 @@ def probe_device(device="cuda", quick=False):
|
|
| 332 |
"register-fragment mma_sync loops (wmma; fp8 and "
|
| 333 |
"2:4-sparse fp16 via inline PTX m16n8k32; sparse "
|
| 334 |
"counted dense-equivalent, the vendor convention); "
|
| 335 |
-
"flops
|
| 336 |
-
"
|
|
|
|
| 337 |
clk, "medium",
|
| 338 |
"dense-tile rate without memory traffic; real "
|
| 339 |
"kernels see this only when staging hides behind it")
|
|
|
|
| 141 |
return ring.to(device)
|
| 142 |
|
| 143 |
|
| 144 |
+
def _smi_settings(index):
|
| 145 |
+
"""ECC mode, driver, and power limit via nvidia-smi; None fields
|
| 146 |
+
when the tool is unavailable."""
|
| 147 |
+
import subprocess
|
| 148 |
+
try:
|
| 149 |
+
out = subprocess.run(
|
| 150 |
+
["nvidia-smi", "-i", str(index),
|
| 151 |
+
"--query-gpu=ecc.mode.current,driver_version,power.limit",
|
| 152 |
+
"--format=csv,noheader,nounits"],
|
| 153 |
+
capture_output=True, text=True, timeout=10)
|
| 154 |
+
parts = [p.strip() for p in out.stdout.strip().split(",")]
|
| 155 |
+
if out.returncode == 0 and len(parts) == 3:
|
| 156 |
+
return {
|
| 157 |
+
"ecc": parts[0],
|
| 158 |
+
"driver": parts[1],
|
| 159 |
+
"power_limit_w": float(parts[2]),
|
| 160 |
+
}
|
| 161 |
+
except (OSError, ValueError, subprocess.TimeoutExpired):
|
| 162 |
+
pass
|
| 163 |
+
return {"ecc": None, "driver": None, "power_limit_w": None}
|
| 164 |
+
|
| 165 |
+
|
| 166 |
+
def mma_tile_check(device="cuda", trials=8):
|
| 167 |
+
"""Random small-integer m16n16k16 tiles through the wmma fragment
|
| 168 |
+
path, compared exactly to the reference GEMM; pins M, N, K, and
|
| 169 |
+
operand mapping (integer operands make fp32 accumulation exact)."""
|
| 170 |
+
worst = 0.0
|
| 171 |
+
for t in range(trials):
|
| 172 |
+
g = torch.Generator(device=device).manual_seed(1000 + t)
|
| 173 |
+
a = torch.randint(-3, 4, (16, 16), device=device,
|
| 174 |
+
generator=g).to(torch.float16)
|
| 175 |
+
b = torch.randint(-3, 4, (16, 16), device=device,
|
| 176 |
+
generator=g).to(torch.float16)
|
| 177 |
+
c = torch.zeros(16, 16, device=device, dtype=torch.float32)
|
| 178 |
+
ops.mk_mma_tile(a.contiguous(), b.t().contiguous(), c)
|
| 179 |
+
_sync()
|
| 180 |
+
ref = a.float() @ b.float()
|
| 181 |
+
if not torch.equal(c, ref):
|
| 182 |
+
worst = max(worst, float((c - ref).abs().max().item()))
|
| 183 |
+
return {"exact": worst == 0.0, "max_abs_error": worst,
|
| 184 |
+
"trials": trials}
|
| 185 |
+
|
| 186 |
+
|
| 187 |
def probe_device(device="cuda", quick=False):
|
| 188 |
"""Empirical device dossier. Each entry is measured by a dedicated
|
| 189 |
probe kernel and carries units, method, the SM clock it ran under, and
|
|
|
|
| 200 |
"vram_bytes": props.total_memory,
|
| 201 |
"torch": torch.__version__,
|
| 202 |
"cuda_runtime": torch.version.cuda,
|
| 203 |
+
# instrument settings: readings depend on them, so the
|
| 204 |
+
# dossier records them (None when nvidia-smi is unavailable)
|
| 205 |
+
**_smi_settings(torch.device(device).index or 0),
|
| 206 |
}
|
| 207 |
}
|
| 208 |
sink = torch.zeros(2, dtype=torch.float32, device=device)
|
|
|
|
| 378 |
"register-fragment mma_sync loops (wmma; fp8 and "
|
| 379 |
"2:4-sparse fp16 via inline PTX m16n8k32; sparse "
|
| 380 |
"counted dense-equivalent, the vendor convention); "
|
| 381 |
+
"flops derive from the mean accumulator read-back "
|
| 382 |
+
"with every fragment element observed, never the "
|
| 383 |
+
"declared loop shape",
|
| 384 |
clk, "medium",
|
| 385 |
"dense-tile rate without memory traffic; real "
|
| 386 |
"kernels see this only when staging hides behind it")
|
build/{torch213-cxx11-cu126-x86_64-linux/_metakernel_cuda_1f7e92c.abi3.so → torch212-cxx11-cu126-x86_64-linux/_metakernel_cuda_917bc5f.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:746e691843bac39245712b44a61789faea98064b177a97aa6ff4d63ed598aae5
|
| 3 |
+
size 743832
|
build/torch212-cxx11-cu126-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _metakernel_cuda_917bc5f
|
| 3 |
+
ops = torch.ops._metakernel_cuda_917bc5f
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_metakernel_cuda_917bc5f::{op_name}"
|
build/torch212-cxx11-cu126-x86_64-linux/_pinned.py
CHANGED
|
@@ -209,83 +209,86 @@ PINNED = {
|
|
| 209 |
},
|
| 210 |
"sm89_nvidiartx6000adagenerati": {
|
| 211 |
"atomics_f32": {
|
| 212 |
-
"clock_ghz": 2.
|
| 213 |
"confidence": "high",
|
| 214 |
"method": "atomicAdd hammer; curve sweeps the number of distinct global addresses from 1 (full contention) to one per thread",
|
| 215 |
"units": "Gop/s",
|
| 216 |
"value": {
|
| 217 |
"curve_slots": {
|
| 218 |
-
"1": 0.
|
| 219 |
-
"145408":
|
| 220 |
-
"4096":
|
| 221 |
-
"512": 55.
|
| 222 |
-
"64": 13.
|
| 223 |
-
"8": 5.
|
| 224 |
},
|
| 225 |
-
"shared_same_addr": 12.
|
| 226 |
}
|
| 227 |
},
|
| 228 |
"clock": {
|
| 229 |
"confidence": "high",
|
| 230 |
-
"final_ghz": 2.
|
| 231 |
-
"max_ghz": 2.
|
| 232 |
"method": "24 back-to-back FMA spin windows of 30M ticks; wall/ticks per window",
|
| 233 |
-
"min_ghz": 2.
|
| 234 |
"sag_pct": 0.3,
|
| 235 |
"units": "GHz"
|
| 236 |
},
|
| 237 |
"device": {
|
| 238 |
"cuda_runtime": "12.6",
|
|
|
|
|
|
|
| 239 |
"l2_bytes": 100663296,
|
| 240 |
"name": "NVIDIA RTX 6000 Ada Generation",
|
|
|
|
| 241 |
"sm_arch": "sm89",
|
| 242 |
"sms": 142,
|
| 243 |
"torch": "2.10.0+cu126",
|
| 244 |
"vram_bytes": 48305274880
|
| 245 |
},
|
| 246 |
"dram_bw": {
|
| 247 |
-
"clock_ghz": 2.
|
| 248 |
"confidence": "high",
|
| 249 |
"method": "streaming triad c=a+s*b per access width; read-only fold; write-only fill; random float4 gather (16B granules, nominal traffic)",
|
| 250 |
"note": "gather moves full cache lines per 16B granule, so its nominal number is the achievable rate for random access, not a line-efficiency claim",
|
| 251 |
"units": "GB/s",
|
| 252 |
"value": {
|
| 253 |
-
"random_gather_16B":
|
| 254 |
-
"read_only":
|
| 255 |
-
"triad_16B":
|
| 256 |
-
"triad_4B":
|
| 257 |
-
"triad_8B":
|
| 258 |
-
"write_only":
|
| 259 |
}
|
| 260 |
},
|
| 261 |
"fma_f32": {
|
| 262 |
-
"clock_ghz": 2.
|
| 263 |
"confidence": "high",
|
| 264 |
"method": "register-resident FMA chains",
|
| 265 |
"units": "TFLOP/s",
|
| 266 |
-
"value":
|
| 267 |
},
|
| 268 |
"fma_f64": {
|
| 269 |
-
"clock_ghz": 2.
|
| 270 |
"confidence": "high",
|
| 271 |
"method": "register-resident double FMA chains (the DFMA pipe)",
|
| 272 |
"units": "TFLOP/s",
|
| 273 |
-
"value": 1.
|
| 274 |
},
|
| 275 |
"grid_barrier": {
|
| 276 |
-
"clock_ghz": 2.
|
| 277 |
"confidence": "high",
|
| 278 |
"method": "cooperative kernel, 142 blocks x 256 threads",
|
| 279 |
"units": "us per grid.sync",
|
| 280 |
"value": 0.54
|
| 281 |
},
|
| 282 |
"l2_bw": {
|
| 283 |
-
"clock_ghz": 2.
|
| 284 |
"confidence": "medium",
|
| 285 |
"method": "in-kernel repeated triad passes over 72 MB resident working set",
|
| 286 |
"note": "first pass streams from HBM; amortized over 64 passes",
|
| 287 |
"units": "GB/s",
|
| 288 |
-
"value":
|
| 289 |
},
|
| 290 |
"latency": {
|
| 291 |
"clock_ghz": 2.687,
|
|
@@ -294,37 +297,37 @@ PINNED = {
|
|
| 294 |
"note": "smem includes index arithmetic; HBM includes residual TLB effects at large footprints",
|
| 295 |
"units": "cycles (single-lane dependent loads)",
|
| 296 |
"value": {
|
| 297 |
-
"dram_cycles":
|
| 298 |
-
"l1_cycles": 45.
|
| 299 |
-
"l2_cycles":
|
| 300 |
"ns_per_cycle": 0.372,
|
| 301 |
"smem_cycles": 30.0
|
| 302 |
}
|
| 303 |
},
|
| 304 |
"launch_overhead": {
|
| 305 |
-
"clock_ghz": 2.
|
| 306 |
"confidence": "high",
|
| 307 |
"method": "empty-kernel trains, queued vs launch+sync",
|
| 308 |
"note": "host-dependent: includes torch op dispatch",
|
| 309 |
"units": "us",
|
| 310 |
"value": {
|
| 311 |
-
"queued_us": 5.
|
| 312 |
-
"round_trip_us": 14.
|
| 313 |
}
|
| 314 |
},
|
| 315 |
"mma": {
|
| 316 |
-
"clock_ghz": 2.
|
| 317 |
"confidence": "medium",
|
| 318 |
-
"method": "register-fragment mma_sync loops (wmma; fp8 and 2:4-sparse fp16 via inline PTX m16n8k32; sparse counted dense-equivalent, the vendor convention); flops
|
| 319 |
"note": "dense-tile rate without memory traffic; real kernels see this only when staging hides behind it",
|
| 320 |
"units": "TFLOP/s (TOP/s for int8)",
|
| 321 |
"value": {
|
| 322 |
-
"bf16":
|
| 323 |
-
"fp16":
|
| 324 |
-
"fp16_sparse_2_4":
|
| 325 |
-
"fp8_e4m3":
|
| 326 |
-
"int8":
|
| 327 |
-
"tf32":
|
| 328 |
},
|
| 329 |
"verified_k_lanes": {
|
| 330 |
"bf16": {
|
|
@@ -354,7 +357,7 @@ PINNED = {
|
|
| 354 |
}
|
| 355 |
},
|
| 356 |
"occupancy_blocks_per_sm": {
|
| 357 |
-
"clock_ghz": 2.
|
| 358 |
"confidence": "high",
|
| 359 |
"method": "occupancy API on the float4 triad kernel",
|
| 360 |
"note": "API-derived, not timing-derived",
|
|
@@ -387,49 +390,49 @@ PINNED = {
|
|
| 387 |
}
|
| 388 |
},
|
| 389 |
"occupancy_knees_fma_tflops": {
|
| 390 |
-
"clock_ghz": 2.
|
| 391 |
"confidence": "high",
|
| 392 |
"method": "a single dependent FMA chain per thread, timed at forced (threads, dyn smem) occupancies over fixed total work; throughput is proportional to resident threads until the pipe saturates, so the cliff marks where occupancy stops covering latency",
|
| 393 |
"note": "timing-derived counterpart to the API table above",
|
| 394 |
"units": "TFLOP/s",
|
| 395 |
"value": {
|
| 396 |
"t1024": {
|
| 397 |
-
"0KB":
|
| 398 |
-
"32KB":
|
| 399 |
-
"48KB":
|
| 400 |
},
|
| 401 |
"t128": {
|
| 402 |
-
"0KB":
|
| 403 |
-
"32KB": 60.
|
| 404 |
-
"48KB":
|
| 405 |
},
|
| 406 |
"t256": {
|
| 407 |
-
"0KB":
|
| 408 |
-
"32KB":
|
| 409 |
-
"48KB":
|
| 410 |
}
|
| 411 |
}
|
| 412 |
},
|
| 413 |
"smem_bw": {
|
| 414 |
-
"clock_ghz": 2.
|
| 415 |
"confidence": "medium",
|
| 416 |
"method": "block-resident read+write streaming (8 B per thread-iteration), aggregated across SMs",
|
| 417 |
"note": "bank-conflict-light access pattern; a conflicted pattern can be far lower",
|
| 418 |
"units": "GB/s",
|
| 419 |
-
"value":
|
| 420 |
},
|
| 421 |
"transfer_bw": {
|
| 422 |
-
"clock_ghz": 2.
|
| 423 |
"confidence": "high",
|
| 424 |
"method": "256 MB torch copies, cudaEvent-timed",
|
| 425 |
"note": "pageable numbers include the staging copy; d2d counts one direction of traffic",
|
| 426 |
"units": "GB/s",
|
| 427 |
"value": {
|
| 428 |
-
"d2d":
|
| 429 |
-
"d2h_pageable":
|
| 430 |
-
"d2h_pinned": 26.
|
| 431 |
-
"h2d_pageable":
|
| 432 |
-
"h2d_pinned":
|
| 433 |
}
|
| 434 |
}
|
| 435 |
}
|
|
|
|
| 209 |
},
|
| 210 |
"sm89_nvidiartx6000adagenerati": {
|
| 211 |
"atomics_f32": {
|
| 212 |
+
"clock_ghz": 2.706,
|
| 213 |
"confidence": "high",
|
| 214 |
"method": "atomicAdd hammer; curve sweeps the number of distinct global addresses from 1 (full contention) to one per thread",
|
| 215 |
"units": "Gop/s",
|
| 216 |
"value": {
|
| 217 |
"curve_slots": {
|
| 218 |
+
"1": 0.72,
|
| 219 |
+
"145408": 483.54,
|
| 220 |
+
"4096": 209.84,
|
| 221 |
+
"512": 55.6,
|
| 222 |
+
"64": 13.82,
|
| 223 |
+
"8": 5.77
|
| 224 |
},
|
| 225 |
+
"shared_same_addr": 12.88
|
| 226 |
}
|
| 227 |
},
|
| 228 |
"clock": {
|
| 229 |
"confidence": "high",
|
| 230 |
+
"final_ghz": 2.699,
|
| 231 |
+
"max_ghz": 2.706,
|
| 232 |
"method": "24 back-to-back FMA spin windows of 30M ticks; wall/ticks per window",
|
| 233 |
+
"min_ghz": 2.501,
|
| 234 |
"sag_pct": 0.3,
|
| 235 |
"units": "GHz"
|
| 236 |
},
|
| 237 |
"device": {
|
| 238 |
"cuda_runtime": "12.6",
|
| 239 |
+
"driver": "595.97",
|
| 240 |
+
"ecc": "Enabled",
|
| 241 |
"l2_bytes": 100663296,
|
| 242 |
"name": "NVIDIA RTX 6000 Ada Generation",
|
| 243 |
+
"power_limit_w": 300.0,
|
| 244 |
"sm_arch": "sm89",
|
| 245 |
"sms": 142,
|
| 246 |
"torch": "2.10.0+cu126",
|
| 247 |
"vram_bytes": 48305274880
|
| 248 |
},
|
| 249 |
"dram_bw": {
|
| 250 |
+
"clock_ghz": 2.706,
|
| 251 |
"confidence": "high",
|
| 252 |
"method": "streaming triad c=a+s*b per access width; read-only fold; write-only fill; random float4 gather (16B granules, nominal traffic)",
|
| 253 |
"note": "gather moves full cache lines per 16B granule, so its nominal number is the achievable rate for random access, not a line-efficiency claim",
|
| 254 |
"units": "GB/s",
|
| 255 |
"value": {
|
| 256 |
+
"random_gather_16B": 218.5,
|
| 257 |
+
"read_only": 771.0,
|
| 258 |
+
"triad_16B": 663.1,
|
| 259 |
+
"triad_4B": 638.3,
|
| 260 |
+
"triad_8B": 705.3,
|
| 261 |
+
"write_only": 766.5
|
| 262 |
}
|
| 263 |
},
|
| 264 |
"fma_f32": {
|
| 265 |
+
"clock_ghz": 2.706,
|
| 266 |
"confidence": "high",
|
| 267 |
"method": "register-resident FMA chains",
|
| 268 |
"units": "TFLOP/s",
|
| 269 |
+
"value": 90.85
|
| 270 |
},
|
| 271 |
"fma_f64": {
|
| 272 |
+
"clock_ghz": 2.706,
|
| 273 |
"confidence": "high",
|
| 274 |
"method": "register-resident double FMA chains (the DFMA pipe)",
|
| 275 |
"units": "TFLOP/s",
|
| 276 |
+
"value": 1.282
|
| 277 |
},
|
| 278 |
"grid_barrier": {
|
| 279 |
+
"clock_ghz": 2.706,
|
| 280 |
"confidence": "high",
|
| 281 |
"method": "cooperative kernel, 142 blocks x 256 threads",
|
| 282 |
"units": "us per grid.sync",
|
| 283 |
"value": 0.54
|
| 284 |
},
|
| 285 |
"l2_bw": {
|
| 286 |
+
"clock_ghz": 2.706,
|
| 287 |
"confidence": "medium",
|
| 288 |
"method": "in-kernel repeated triad passes over 72 MB resident working set",
|
| 289 |
"note": "first pass streams from HBM; amortized over 64 passes",
|
| 290 |
"units": "GB/s",
|
| 291 |
+
"value": 9325.3
|
| 292 |
},
|
| 293 |
"latency": {
|
| 294 |
"clock_ghz": 2.687,
|
|
|
|
| 297 |
"note": "smem includes index arithmetic; HBM includes residual TLB effects at large footprints",
|
| 298 |
"units": "cycles (single-lane dependent loads)",
|
| 299 |
"value": {
|
| 300 |
+
"dram_cycles": 649.4,
|
| 301 |
+
"l1_cycles": 45.8,
|
| 302 |
+
"l2_cycles": 291.5,
|
| 303 |
"ns_per_cycle": 0.372,
|
| 304 |
"smem_cycles": 30.0
|
| 305 |
}
|
| 306 |
},
|
| 307 |
"launch_overhead": {
|
| 308 |
+
"clock_ghz": 2.706,
|
| 309 |
"confidence": "high",
|
| 310 |
"method": "empty-kernel trains, queued vs launch+sync",
|
| 311 |
"note": "host-dependent: includes torch op dispatch",
|
| 312 |
"units": "us",
|
| 313 |
"value": {
|
| 314 |
+
"queued_us": 5.55,
|
| 315 |
+
"round_trip_us": 14.1
|
| 316 |
}
|
| 317 |
},
|
| 318 |
"mma": {
|
| 319 |
+
"clock_ghz": 2.706,
|
| 320 |
"confidence": "medium",
|
| 321 |
+
"method": "register-fragment mma_sync loops (wmma; fp8 and 2:4-sparse fp16 via inline PTX m16n8k32; sparse counted dense-equivalent, the vendor convention); flops derive from the mean accumulator read-back with every fragment element observed, never the declared loop shape",
|
| 322 |
"note": "dense-tile rate without memory traffic; real kernels see this only when staging hides behind it",
|
| 323 |
"units": "TFLOP/s (TOP/s for int8)",
|
| 324 |
"value": {
|
| 325 |
+
"bf16": 365.5,
|
| 326 |
+
"fp16": 375.9,
|
| 327 |
+
"fp16_sparse_2_4": 713.4,
|
| 328 |
+
"fp8_e4m3": 193.7,
|
| 329 |
+
"int8": 770.4,
|
| 330 |
+
"tf32": 177.1
|
| 331 |
},
|
| 332 |
"verified_k_lanes": {
|
| 333 |
"bf16": {
|
|
|
|
| 357 |
}
|
| 358 |
},
|
| 359 |
"occupancy_blocks_per_sm": {
|
| 360 |
+
"clock_ghz": 2.706,
|
| 361 |
"confidence": "high",
|
| 362 |
"method": "occupancy API on the float4 triad kernel",
|
| 363 |
"note": "API-derived, not timing-derived",
|
|
|
|
| 390 |
}
|
| 391 |
},
|
| 392 |
"occupancy_knees_fma_tflops": {
|
| 393 |
+
"clock_ghz": 2.706,
|
| 394 |
"confidence": "high",
|
| 395 |
"method": "a single dependent FMA chain per thread, timed at forced (threads, dyn smem) occupancies over fixed total work; throughput is proportional to resident threads until the pipe saturates, so the cliff marks where occupancy stops covering latency",
|
| 396 |
"note": "timing-derived counterpart to the API table above",
|
| 397 |
"units": "TFLOP/s",
|
| 398 |
"value": {
|
| 399 |
"t1024": {
|
| 400 |
+
"0KB": 75.5,
|
| 401 |
+
"32KB": 73.66,
|
| 402 |
+
"48KB": 74.95
|
| 403 |
},
|
| 404 |
"t128": {
|
| 405 |
+
"0KB": 79.86,
|
| 406 |
+
"32KB": 60.31,
|
| 407 |
+
"48KB": 44.57
|
| 408 |
},
|
| 409 |
"t256": {
|
| 410 |
+
"0KB": 81.69,
|
| 411 |
+
"32KB": 79.48,
|
| 412 |
+
"48KB": 71.47
|
| 413 |
}
|
| 414 |
}
|
| 415 |
},
|
| 416 |
"smem_bw": {
|
| 417 |
+
"clock_ghz": 2.706,
|
| 418 |
"confidence": "medium",
|
| 419 |
"method": "block-resident read+write streaming (8 B per thread-iteration), aggregated across SMs",
|
| 420 |
"note": "bank-conflict-light access pattern; a conflicted pattern can be far lower",
|
| 421 |
"units": "GB/s",
|
| 422 |
+
"value": 21250.0
|
| 423 |
},
|
| 424 |
"transfer_bw": {
|
| 425 |
+
"clock_ghz": 2.706,
|
| 426 |
"confidence": "high",
|
| 427 |
"method": "256 MB torch copies, cudaEvent-timed",
|
| 428 |
"note": "pageable numbers include the staging copy; d2d counts one direction of traffic",
|
| 429 |
"units": "GB/s",
|
| 430 |
"value": {
|
| 431 |
+
"d2d": 330.7,
|
| 432 |
+
"d2h_pageable": 15.6,
|
| 433 |
+
"d2h_pinned": 26.2,
|
| 434 |
+
"h2d_pageable": 16.6,
|
| 435 |
+
"h2d_pinned": 24.0
|
| 436 |
}
|
| 437 |
}
|
| 438 |
}
|
build/torch212-cxx11-cu126-x86_64-linux/metadata.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"name": "metakernel",
|
| 3 |
-
"id": "
|
| 4 |
"version": 1,
|
| 5 |
"license": "Apache-2.0",
|
| 6 |
"python-depends": [],
|
|
@@ -16,10 +16,10 @@
|
|
| 16 |
"digest": {
|
| 17 |
"algorithm": "sha256",
|
| 18 |
"files": {
|
| 19 |
-
"__init__.py": "
|
| 20 |
-
"
|
| 21 |
-
"_ops.py": "
|
| 22 |
-
"_pinned.py": "
|
| 23 |
"metakernel/__init__.py": "DFYPlrhXwYjEqCl/8n0SmWGZV8NFml5DPhMjKfv98GY="
|
| 24 |
}
|
| 25 |
},
|
|
@@ -30,7 +30,7 @@
|
|
| 30 |
"dirty": false
|
| 31 |
},
|
| 32 |
"kernel": {
|
| 33 |
-
"sha": "
|
| 34 |
"dirty": false
|
| 35 |
}
|
| 36 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"name": "metakernel",
|
| 3 |
+
"id": "_metakernel_cuda_917bc5f",
|
| 4 |
"version": 1,
|
| 5 |
"license": "Apache-2.0",
|
| 6 |
"python-depends": [],
|
|
|
|
| 16 |
"digest": {
|
| 17 |
"algorithm": "sha256",
|
| 18 |
"files": {
|
| 19 |
+
"__init__.py": "j+f09TbMQC/dkaD/Ls5Ig7CHJ/yTI1syrDZhJVpz4rA=",
|
| 20 |
+
"_metakernel_cuda_917bc5f.abi3.so": "dG5pGEO6w5JFcStEpheJ+uqYBksXepeqb/TWPtWYquU=",
|
| 21 |
+
"_ops.py": "HaN7LmS0+rYVmkKdGje8u4il8c3tQT0x4w4iwQvC8qY=",
|
| 22 |
+
"_pinned.py": "cRCc88scJyKco8+sKHXkGFaeXl07lvtC4hrfO/gQ1HU=",
|
| 23 |
"metakernel/__init__.py": "DFYPlrhXwYjEqCl/8n0SmWGZV8NFml5DPhMjKfv98GY="
|
| 24 |
}
|
| 25 |
},
|
|
|
|
| 30 |
"dirty": false
|
| 31 |
},
|
| 32 |
"kernel": {
|
| 33 |
+
"sha": "917bc5f20b9abdcd0f8afec590cc2eaa27764e8c",
|
| 34 |
"dirty": false
|
| 35 |
}
|
| 36 |
}
|
build/torch212-cxx11-cu130-x86_64-linux/__init__.py
CHANGED
|
@@ -141,6 +141,49 @@ def _sattolo_ring(n, device, generator=None):
|
|
| 141 |
return ring.to(device)
|
| 142 |
|
| 143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
def probe_device(device="cuda", quick=False):
|
| 145 |
"""Empirical device dossier. Each entry is measured by a dedicated
|
| 146 |
probe kernel and carries units, method, the SM clock it ran under, and
|
|
@@ -157,6 +200,9 @@ def probe_device(device="cuda", quick=False):
|
|
| 157 |
"vram_bytes": props.total_memory,
|
| 158 |
"torch": torch.__version__,
|
| 159 |
"cuda_runtime": torch.version.cuda,
|
|
|
|
|
|
|
|
|
|
| 160 |
}
|
| 161 |
}
|
| 162 |
sink = torch.zeros(2, dtype=torch.float32, device=device)
|
|
@@ -332,8 +378,9 @@ def probe_device(device="cuda", quick=False):
|
|
| 332 |
"register-fragment mma_sync loops (wmma; fp8 and "
|
| 333 |
"2:4-sparse fp16 via inline PTX m16n8k32; sparse "
|
| 334 |
"counted dense-equivalent, the vendor convention); "
|
| 335 |
-
"flops
|
| 336 |
-
"
|
|
|
|
| 337 |
clk, "medium",
|
| 338 |
"dense-tile rate without memory traffic; real "
|
| 339 |
"kernels see this only when staging hides behind it")
|
|
|
|
| 141 |
return ring.to(device)
|
| 142 |
|
| 143 |
|
| 144 |
+
def _smi_settings(index):
|
| 145 |
+
"""ECC mode, driver, and power limit via nvidia-smi; None fields
|
| 146 |
+
when the tool is unavailable."""
|
| 147 |
+
import subprocess
|
| 148 |
+
try:
|
| 149 |
+
out = subprocess.run(
|
| 150 |
+
["nvidia-smi", "-i", str(index),
|
| 151 |
+
"--query-gpu=ecc.mode.current,driver_version,power.limit",
|
| 152 |
+
"--format=csv,noheader,nounits"],
|
| 153 |
+
capture_output=True, text=True, timeout=10)
|
| 154 |
+
parts = [p.strip() for p in out.stdout.strip().split(",")]
|
| 155 |
+
if out.returncode == 0 and len(parts) == 3:
|
| 156 |
+
return {
|
| 157 |
+
"ecc": parts[0],
|
| 158 |
+
"driver": parts[1],
|
| 159 |
+
"power_limit_w": float(parts[2]),
|
| 160 |
+
}
|
| 161 |
+
except (OSError, ValueError, subprocess.TimeoutExpired):
|
| 162 |
+
pass
|
| 163 |
+
return {"ecc": None, "driver": None, "power_limit_w": None}
|
| 164 |
+
|
| 165 |
+
|
| 166 |
+
def mma_tile_check(device="cuda", trials=8):
|
| 167 |
+
"""Random small-integer m16n16k16 tiles through the wmma fragment
|
| 168 |
+
path, compared exactly to the reference GEMM; pins M, N, K, and
|
| 169 |
+
operand mapping (integer operands make fp32 accumulation exact)."""
|
| 170 |
+
worst = 0.0
|
| 171 |
+
for t in range(trials):
|
| 172 |
+
g = torch.Generator(device=device).manual_seed(1000 + t)
|
| 173 |
+
a = torch.randint(-3, 4, (16, 16), device=device,
|
| 174 |
+
generator=g).to(torch.float16)
|
| 175 |
+
b = torch.randint(-3, 4, (16, 16), device=device,
|
| 176 |
+
generator=g).to(torch.float16)
|
| 177 |
+
c = torch.zeros(16, 16, device=device, dtype=torch.float32)
|
| 178 |
+
ops.mk_mma_tile(a.contiguous(), b.t().contiguous(), c)
|
| 179 |
+
_sync()
|
| 180 |
+
ref = a.float() @ b.float()
|
| 181 |
+
if not torch.equal(c, ref):
|
| 182 |
+
worst = max(worst, float((c - ref).abs().max().item()))
|
| 183 |
+
return {"exact": worst == 0.0, "max_abs_error": worst,
|
| 184 |
+
"trials": trials}
|
| 185 |
+
|
| 186 |
+
|
| 187 |
def probe_device(device="cuda", quick=False):
|
| 188 |
"""Empirical device dossier. Each entry is measured by a dedicated
|
| 189 |
probe kernel and carries units, method, the SM clock it ran under, and
|
|
|
|
| 200 |
"vram_bytes": props.total_memory,
|
| 201 |
"torch": torch.__version__,
|
| 202 |
"cuda_runtime": torch.version.cuda,
|
| 203 |
+
# instrument settings: readings depend on them, so the
|
| 204 |
+
# dossier records them (None when nvidia-smi is unavailable)
|
| 205 |
+
**_smi_settings(torch.device(device).index or 0),
|
| 206 |
}
|
| 207 |
}
|
| 208 |
sink = torch.zeros(2, dtype=torch.float32, device=device)
|
|
|
|
| 378 |
"register-fragment mma_sync loops (wmma; fp8 and "
|
| 379 |
"2:4-sparse fp16 via inline PTX m16n8k32; sparse "
|
| 380 |
"counted dense-equivalent, the vendor convention); "
|
| 381 |
+
"flops derive from the mean accumulator read-back "
|
| 382 |
+
"with every fragment element observed, never the "
|
| 383 |
+
"declared loop shape",
|
| 384 |
clk, "medium",
|
| 385 |
"dense-tile rate without memory traffic; real "
|
| 386 |
"kernels see this only when staging hides behind it")
|
build/torch212-cxx11-cu130-x86_64-linux/_metakernel_cuda_1f7e92c.abi3.so
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:2952c41e6f2bfc471b251c0c61eb95c2f343c86fe8ca64e32fc9378d8ddb00eb
|
| 3 |
-
size 1103272
|
|
|
|
|
|
|
|
|
|
|
|
build/torch212-cxx11-cu130-x86_64-linux/_metakernel_cuda_917bc5f.abi3.so
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4e3c9a84e7e9a84f3fae2f8d56696a540294756e3eb7cdf6e220de74dff31c62
|
| 3 |
+
size 1180120
|
build/torch212-cxx11-cu130-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _metakernel_cuda_917bc5f
|
| 3 |
+
ops = torch.ops._metakernel_cuda_917bc5f
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_metakernel_cuda_917bc5f::{op_name}"
|
build/torch212-cxx11-cu130-x86_64-linux/_pinned.py
CHANGED
|
@@ -209,83 +209,86 @@ PINNED = {
|
|
| 209 |
},
|
| 210 |
"sm89_nvidiartx6000adagenerati": {
|
| 211 |
"atomics_f32": {
|
| 212 |
-
"clock_ghz": 2.
|
| 213 |
"confidence": "high",
|
| 214 |
"method": "atomicAdd hammer; curve sweeps the number of distinct global addresses from 1 (full contention) to one per thread",
|
| 215 |
"units": "Gop/s",
|
| 216 |
"value": {
|
| 217 |
"curve_slots": {
|
| 218 |
-
"1": 0.
|
| 219 |
-
"145408":
|
| 220 |
-
"4096":
|
| 221 |
-
"512": 55.
|
| 222 |
-
"64": 13.
|
| 223 |
-
"8": 5.
|
| 224 |
},
|
| 225 |
-
"shared_same_addr": 12.
|
| 226 |
}
|
| 227 |
},
|
| 228 |
"clock": {
|
| 229 |
"confidence": "high",
|
| 230 |
-
"final_ghz": 2.
|
| 231 |
-
"max_ghz": 2.
|
| 232 |
"method": "24 back-to-back FMA spin windows of 30M ticks; wall/ticks per window",
|
| 233 |
-
"min_ghz": 2.
|
| 234 |
"sag_pct": 0.3,
|
| 235 |
"units": "GHz"
|
| 236 |
},
|
| 237 |
"device": {
|
| 238 |
"cuda_runtime": "12.6",
|
|
|
|
|
|
|
| 239 |
"l2_bytes": 100663296,
|
| 240 |
"name": "NVIDIA RTX 6000 Ada Generation",
|
|
|
|
| 241 |
"sm_arch": "sm89",
|
| 242 |
"sms": 142,
|
| 243 |
"torch": "2.10.0+cu126",
|
| 244 |
"vram_bytes": 48305274880
|
| 245 |
},
|
| 246 |
"dram_bw": {
|
| 247 |
-
"clock_ghz": 2.
|
| 248 |
"confidence": "high",
|
| 249 |
"method": "streaming triad c=a+s*b per access width; read-only fold; write-only fill; random float4 gather (16B granules, nominal traffic)",
|
| 250 |
"note": "gather moves full cache lines per 16B granule, so its nominal number is the achievable rate for random access, not a line-efficiency claim",
|
| 251 |
"units": "GB/s",
|
| 252 |
"value": {
|
| 253 |
-
"random_gather_16B":
|
| 254 |
-
"read_only":
|
| 255 |
-
"triad_16B":
|
| 256 |
-
"triad_4B":
|
| 257 |
-
"triad_8B":
|
| 258 |
-
"write_only":
|
| 259 |
}
|
| 260 |
},
|
| 261 |
"fma_f32": {
|
| 262 |
-
"clock_ghz": 2.
|
| 263 |
"confidence": "high",
|
| 264 |
"method": "register-resident FMA chains",
|
| 265 |
"units": "TFLOP/s",
|
| 266 |
-
"value":
|
| 267 |
},
|
| 268 |
"fma_f64": {
|
| 269 |
-
"clock_ghz": 2.
|
| 270 |
"confidence": "high",
|
| 271 |
"method": "register-resident double FMA chains (the DFMA pipe)",
|
| 272 |
"units": "TFLOP/s",
|
| 273 |
-
"value": 1.
|
| 274 |
},
|
| 275 |
"grid_barrier": {
|
| 276 |
-
"clock_ghz": 2.
|
| 277 |
"confidence": "high",
|
| 278 |
"method": "cooperative kernel, 142 blocks x 256 threads",
|
| 279 |
"units": "us per grid.sync",
|
| 280 |
"value": 0.54
|
| 281 |
},
|
| 282 |
"l2_bw": {
|
| 283 |
-
"clock_ghz": 2.
|
| 284 |
"confidence": "medium",
|
| 285 |
"method": "in-kernel repeated triad passes over 72 MB resident working set",
|
| 286 |
"note": "first pass streams from HBM; amortized over 64 passes",
|
| 287 |
"units": "GB/s",
|
| 288 |
-
"value":
|
| 289 |
},
|
| 290 |
"latency": {
|
| 291 |
"clock_ghz": 2.687,
|
|
@@ -294,37 +297,37 @@ PINNED = {
|
|
| 294 |
"note": "smem includes index arithmetic; HBM includes residual TLB effects at large footprints",
|
| 295 |
"units": "cycles (single-lane dependent loads)",
|
| 296 |
"value": {
|
| 297 |
-
"dram_cycles":
|
| 298 |
-
"l1_cycles": 45.
|
| 299 |
-
"l2_cycles":
|
| 300 |
"ns_per_cycle": 0.372,
|
| 301 |
"smem_cycles": 30.0
|
| 302 |
}
|
| 303 |
},
|
| 304 |
"launch_overhead": {
|
| 305 |
-
"clock_ghz": 2.
|
| 306 |
"confidence": "high",
|
| 307 |
"method": "empty-kernel trains, queued vs launch+sync",
|
| 308 |
"note": "host-dependent: includes torch op dispatch",
|
| 309 |
"units": "us",
|
| 310 |
"value": {
|
| 311 |
-
"queued_us": 5.
|
| 312 |
-
"round_trip_us": 14.
|
| 313 |
}
|
| 314 |
},
|
| 315 |
"mma": {
|
| 316 |
-
"clock_ghz": 2.
|
| 317 |
"confidence": "medium",
|
| 318 |
-
"method": "register-fragment mma_sync loops (wmma; fp8 and 2:4-sparse fp16 via inline PTX m16n8k32; sparse counted dense-equivalent, the vendor convention); flops
|
| 319 |
"note": "dense-tile rate without memory traffic; real kernels see this only when staging hides behind it",
|
| 320 |
"units": "TFLOP/s (TOP/s for int8)",
|
| 321 |
"value": {
|
| 322 |
-
"bf16":
|
| 323 |
-
"fp16":
|
| 324 |
-
"fp16_sparse_2_4":
|
| 325 |
-
"fp8_e4m3":
|
| 326 |
-
"int8":
|
| 327 |
-
"tf32":
|
| 328 |
},
|
| 329 |
"verified_k_lanes": {
|
| 330 |
"bf16": {
|
|
@@ -354,7 +357,7 @@ PINNED = {
|
|
| 354 |
}
|
| 355 |
},
|
| 356 |
"occupancy_blocks_per_sm": {
|
| 357 |
-
"clock_ghz": 2.
|
| 358 |
"confidence": "high",
|
| 359 |
"method": "occupancy API on the float4 triad kernel",
|
| 360 |
"note": "API-derived, not timing-derived",
|
|
@@ -387,49 +390,49 @@ PINNED = {
|
|
| 387 |
}
|
| 388 |
},
|
| 389 |
"occupancy_knees_fma_tflops": {
|
| 390 |
-
"clock_ghz": 2.
|
| 391 |
"confidence": "high",
|
| 392 |
"method": "a single dependent FMA chain per thread, timed at forced (threads, dyn smem) occupancies over fixed total work; throughput is proportional to resident threads until the pipe saturates, so the cliff marks where occupancy stops covering latency",
|
| 393 |
"note": "timing-derived counterpart to the API table above",
|
| 394 |
"units": "TFLOP/s",
|
| 395 |
"value": {
|
| 396 |
"t1024": {
|
| 397 |
-
"0KB":
|
| 398 |
-
"32KB":
|
| 399 |
-
"48KB":
|
| 400 |
},
|
| 401 |
"t128": {
|
| 402 |
-
"0KB":
|
| 403 |
-
"32KB": 60.
|
| 404 |
-
"48KB":
|
| 405 |
},
|
| 406 |
"t256": {
|
| 407 |
-
"0KB":
|
| 408 |
-
"32KB":
|
| 409 |
-
"48KB":
|
| 410 |
}
|
| 411 |
}
|
| 412 |
},
|
| 413 |
"smem_bw": {
|
| 414 |
-
"clock_ghz": 2.
|
| 415 |
"confidence": "medium",
|
| 416 |
"method": "block-resident read+write streaming (8 B per thread-iteration), aggregated across SMs",
|
| 417 |
"note": "bank-conflict-light access pattern; a conflicted pattern can be far lower",
|
| 418 |
"units": "GB/s",
|
| 419 |
-
"value":
|
| 420 |
},
|
| 421 |
"transfer_bw": {
|
| 422 |
-
"clock_ghz": 2.
|
| 423 |
"confidence": "high",
|
| 424 |
"method": "256 MB torch copies, cudaEvent-timed",
|
| 425 |
"note": "pageable numbers include the staging copy; d2d counts one direction of traffic",
|
| 426 |
"units": "GB/s",
|
| 427 |
"value": {
|
| 428 |
-
"d2d":
|
| 429 |
-
"d2h_pageable":
|
| 430 |
-
"d2h_pinned": 26.
|
| 431 |
-
"h2d_pageable":
|
| 432 |
-
"h2d_pinned":
|
| 433 |
}
|
| 434 |
}
|
| 435 |
}
|
|
|
|
| 209 |
},
|
| 210 |
"sm89_nvidiartx6000adagenerati": {
|
| 211 |
"atomics_f32": {
|
| 212 |
+
"clock_ghz": 2.706,
|
| 213 |
"confidence": "high",
|
| 214 |
"method": "atomicAdd hammer; curve sweeps the number of distinct global addresses from 1 (full contention) to one per thread",
|
| 215 |
"units": "Gop/s",
|
| 216 |
"value": {
|
| 217 |
"curve_slots": {
|
| 218 |
+
"1": 0.72,
|
| 219 |
+
"145408": 483.54,
|
| 220 |
+
"4096": 209.84,
|
| 221 |
+
"512": 55.6,
|
| 222 |
+
"64": 13.82,
|
| 223 |
+
"8": 5.77
|
| 224 |
},
|
| 225 |
+
"shared_same_addr": 12.88
|
| 226 |
}
|
| 227 |
},
|
| 228 |
"clock": {
|
| 229 |
"confidence": "high",
|
| 230 |
+
"final_ghz": 2.699,
|
| 231 |
+
"max_ghz": 2.706,
|
| 232 |
"method": "24 back-to-back FMA spin windows of 30M ticks; wall/ticks per window",
|
| 233 |
+
"min_ghz": 2.501,
|
| 234 |
"sag_pct": 0.3,
|
| 235 |
"units": "GHz"
|
| 236 |
},
|
| 237 |
"device": {
|
| 238 |
"cuda_runtime": "12.6",
|
| 239 |
+
"driver": "595.97",
|
| 240 |
+
"ecc": "Enabled",
|
| 241 |
"l2_bytes": 100663296,
|
| 242 |
"name": "NVIDIA RTX 6000 Ada Generation",
|
| 243 |
+
"power_limit_w": 300.0,
|
| 244 |
"sm_arch": "sm89",
|
| 245 |
"sms": 142,
|
| 246 |
"torch": "2.10.0+cu126",
|
| 247 |
"vram_bytes": 48305274880
|
| 248 |
},
|
| 249 |
"dram_bw": {
|
| 250 |
+
"clock_ghz": 2.706,
|
| 251 |
"confidence": "high",
|
| 252 |
"method": "streaming triad c=a+s*b per access width; read-only fold; write-only fill; random float4 gather (16B granules, nominal traffic)",
|
| 253 |
"note": "gather moves full cache lines per 16B granule, so its nominal number is the achievable rate for random access, not a line-efficiency claim",
|
| 254 |
"units": "GB/s",
|
| 255 |
"value": {
|
| 256 |
+
"random_gather_16B": 218.5,
|
| 257 |
+
"read_only": 771.0,
|
| 258 |
+
"triad_16B": 663.1,
|
| 259 |
+
"triad_4B": 638.3,
|
| 260 |
+
"triad_8B": 705.3,
|
| 261 |
+
"write_only": 766.5
|
| 262 |
}
|
| 263 |
},
|
| 264 |
"fma_f32": {
|
| 265 |
+
"clock_ghz": 2.706,
|
| 266 |
"confidence": "high",
|
| 267 |
"method": "register-resident FMA chains",
|
| 268 |
"units": "TFLOP/s",
|
| 269 |
+
"value": 90.85
|
| 270 |
},
|
| 271 |
"fma_f64": {
|
| 272 |
+
"clock_ghz": 2.706,
|
| 273 |
"confidence": "high",
|
| 274 |
"method": "register-resident double FMA chains (the DFMA pipe)",
|
| 275 |
"units": "TFLOP/s",
|
| 276 |
+
"value": 1.282
|
| 277 |
},
|
| 278 |
"grid_barrier": {
|
| 279 |
+
"clock_ghz": 2.706,
|
| 280 |
"confidence": "high",
|
| 281 |
"method": "cooperative kernel, 142 blocks x 256 threads",
|
| 282 |
"units": "us per grid.sync",
|
| 283 |
"value": 0.54
|
| 284 |
},
|
| 285 |
"l2_bw": {
|
| 286 |
+
"clock_ghz": 2.706,
|
| 287 |
"confidence": "medium",
|
| 288 |
"method": "in-kernel repeated triad passes over 72 MB resident working set",
|
| 289 |
"note": "first pass streams from HBM; amortized over 64 passes",
|
| 290 |
"units": "GB/s",
|
| 291 |
+
"value": 9325.3
|
| 292 |
},
|
| 293 |
"latency": {
|
| 294 |
"clock_ghz": 2.687,
|
|
|
|
| 297 |
"note": "smem includes index arithmetic; HBM includes residual TLB effects at large footprints",
|
| 298 |
"units": "cycles (single-lane dependent loads)",
|
| 299 |
"value": {
|
| 300 |
+
"dram_cycles": 649.4,
|
| 301 |
+
"l1_cycles": 45.8,
|
| 302 |
+
"l2_cycles": 291.5,
|
| 303 |
"ns_per_cycle": 0.372,
|
| 304 |
"smem_cycles": 30.0
|
| 305 |
}
|
| 306 |
},
|
| 307 |
"launch_overhead": {
|
| 308 |
+
"clock_ghz": 2.706,
|
| 309 |
"confidence": "high",
|
| 310 |
"method": "empty-kernel trains, queued vs launch+sync",
|
| 311 |
"note": "host-dependent: includes torch op dispatch",
|
| 312 |
"units": "us",
|
| 313 |
"value": {
|
| 314 |
+
"queued_us": 5.55,
|
| 315 |
+
"round_trip_us": 14.1
|
| 316 |
}
|
| 317 |
},
|
| 318 |
"mma": {
|
| 319 |
+
"clock_ghz": 2.706,
|
| 320 |
"confidence": "medium",
|
| 321 |
+
"method": "register-fragment mma_sync loops (wmma; fp8 and 2:4-sparse fp16 via inline PTX m16n8k32; sparse counted dense-equivalent, the vendor convention); flops derive from the mean accumulator read-back with every fragment element observed, never the declared loop shape",
|
| 322 |
"note": "dense-tile rate without memory traffic; real kernels see this only when staging hides behind it",
|
| 323 |
"units": "TFLOP/s (TOP/s for int8)",
|
| 324 |
"value": {
|
| 325 |
+
"bf16": 365.5,
|
| 326 |
+
"fp16": 375.9,
|
| 327 |
+
"fp16_sparse_2_4": 713.4,
|
| 328 |
+
"fp8_e4m3": 193.7,
|
| 329 |
+
"int8": 770.4,
|
| 330 |
+
"tf32": 177.1
|
| 331 |
},
|
| 332 |
"verified_k_lanes": {
|
| 333 |
"bf16": {
|
|
|
|
| 357 |
}
|
| 358 |
},
|
| 359 |
"occupancy_blocks_per_sm": {
|
| 360 |
+
"clock_ghz": 2.706,
|
| 361 |
"confidence": "high",
|
| 362 |
"method": "occupancy API on the float4 triad kernel",
|
| 363 |
"note": "API-derived, not timing-derived",
|
|
|
|
| 390 |
}
|
| 391 |
},
|
| 392 |
"occupancy_knees_fma_tflops": {
|
| 393 |
+
"clock_ghz": 2.706,
|
| 394 |
"confidence": "high",
|
| 395 |
"method": "a single dependent FMA chain per thread, timed at forced (threads, dyn smem) occupancies over fixed total work; throughput is proportional to resident threads until the pipe saturates, so the cliff marks where occupancy stops covering latency",
|
| 396 |
"note": "timing-derived counterpart to the API table above",
|
| 397 |
"units": "TFLOP/s",
|
| 398 |
"value": {
|
| 399 |
"t1024": {
|
| 400 |
+
"0KB": 75.5,
|
| 401 |
+
"32KB": 73.66,
|
| 402 |
+
"48KB": 74.95
|
| 403 |
},
|
| 404 |
"t128": {
|
| 405 |
+
"0KB": 79.86,
|
| 406 |
+
"32KB": 60.31,
|
| 407 |
+
"48KB": 44.57
|
| 408 |
},
|
| 409 |
"t256": {
|
| 410 |
+
"0KB": 81.69,
|
| 411 |
+
"32KB": 79.48,
|
| 412 |
+
"48KB": 71.47
|
| 413 |
}
|
| 414 |
}
|
| 415 |
},
|
| 416 |
"smem_bw": {
|
| 417 |
+
"clock_ghz": 2.706,
|
| 418 |
"confidence": "medium",
|
| 419 |
"method": "block-resident read+write streaming (8 B per thread-iteration), aggregated across SMs",
|
| 420 |
"note": "bank-conflict-light access pattern; a conflicted pattern can be far lower",
|
| 421 |
"units": "GB/s",
|
| 422 |
+
"value": 21250.0
|
| 423 |
},
|
| 424 |
"transfer_bw": {
|
| 425 |
+
"clock_ghz": 2.706,
|
| 426 |
"confidence": "high",
|
| 427 |
"method": "256 MB torch copies, cudaEvent-timed",
|
| 428 |
"note": "pageable numbers include the staging copy; d2d counts one direction of traffic",
|
| 429 |
"units": "GB/s",
|
| 430 |
"value": {
|
| 431 |
+
"d2d": 330.7,
|
| 432 |
+
"d2h_pageable": 15.6,
|
| 433 |
+
"d2h_pinned": 26.2,
|
| 434 |
+
"h2d_pageable": 16.6,
|
| 435 |
+
"h2d_pinned": 24.0
|
| 436 |
}
|
| 437 |
}
|
| 438 |
}
|
build/torch212-cxx11-cu130-x86_64-linux/metadata.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"name": "metakernel",
|
| 3 |
-
"id": "
|
| 4 |
"version": 1,
|
| 5 |
"license": "Apache-2.0",
|
| 6 |
"python-depends": [],
|
|
@@ -18,10 +18,10 @@
|
|
| 18 |
"digest": {
|
| 19 |
"algorithm": "sha256",
|
| 20 |
"files": {
|
| 21 |
-
"__init__.py": "
|
| 22 |
-
"
|
| 23 |
-
"_ops.py": "
|
| 24 |
-
"_pinned.py": "
|
| 25 |
"metakernel/__init__.py": "DFYPlrhXwYjEqCl/8n0SmWGZV8NFml5DPhMjKfv98GY="
|
| 26 |
}
|
| 27 |
},
|
|
@@ -32,7 +32,7 @@
|
|
| 32 |
"dirty": false
|
| 33 |
},
|
| 34 |
"kernel": {
|
| 35 |
-
"sha": "
|
| 36 |
"dirty": false
|
| 37 |
}
|
| 38 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"name": "metakernel",
|
| 3 |
+
"id": "_metakernel_cuda_917bc5f",
|
| 4 |
"version": 1,
|
| 5 |
"license": "Apache-2.0",
|
| 6 |
"python-depends": [],
|
|
|
|
| 18 |
"digest": {
|
| 19 |
"algorithm": "sha256",
|
| 20 |
"files": {
|
| 21 |
+
"__init__.py": "j+f09TbMQC/dkaD/Ls5Ig7CHJ/yTI1syrDZhJVpz4rA=",
|
| 22 |
+
"_metakernel_cuda_917bc5f.abi3.so": "TjyahOfpqE8/ri+NVmlqVAKUdW4+t8324iDedN/zHGI=",
|
| 23 |
+
"_ops.py": "HaN7LmS0+rYVmkKdGje8u4il8c3tQT0x4w4iwQvC8qY=",
|
| 24 |
+
"_pinned.py": "cRCc88scJyKco8+sKHXkGFaeXl07lvtC4hrfO/gQ1HU=",
|
| 25 |
"metakernel/__init__.py": "DFYPlrhXwYjEqCl/8n0SmWGZV8NFml5DPhMjKfv98GY="
|
| 26 |
}
|
| 27 |
},
|
|
|
|
| 32 |
"dirty": false
|
| 33 |
},
|
| 34 |
"kernel": {
|
| 35 |
+
"sha": "917bc5f20b9abdcd0f8afec590cc2eaa27764e8c",
|
| 36 |
"dirty": false
|
| 37 |
}
|
| 38 |
}
|
build/torch212-cxx11-cu132-x86_64-linux/__init__.py
CHANGED
|
@@ -141,6 +141,49 @@ def _sattolo_ring(n, device, generator=None):
|
|
| 141 |
return ring.to(device)
|
| 142 |
|
| 143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
def probe_device(device="cuda", quick=False):
|
| 145 |
"""Empirical device dossier. Each entry is measured by a dedicated
|
| 146 |
probe kernel and carries units, method, the SM clock it ran under, and
|
|
@@ -157,6 +200,9 @@ def probe_device(device="cuda", quick=False):
|
|
| 157 |
"vram_bytes": props.total_memory,
|
| 158 |
"torch": torch.__version__,
|
| 159 |
"cuda_runtime": torch.version.cuda,
|
|
|
|
|
|
|
|
|
|
| 160 |
}
|
| 161 |
}
|
| 162 |
sink = torch.zeros(2, dtype=torch.float32, device=device)
|
|
@@ -332,8 +378,9 @@ def probe_device(device="cuda", quick=False):
|
|
| 332 |
"register-fragment mma_sync loops (wmma; fp8 and "
|
| 333 |
"2:4-sparse fp16 via inline PTX m16n8k32; sparse "
|
| 334 |
"counted dense-equivalent, the vendor convention); "
|
| 335 |
-
"flops
|
| 336 |
-
"
|
|
|
|
| 337 |
clk, "medium",
|
| 338 |
"dense-tile rate without memory traffic; real "
|
| 339 |
"kernels see this only when staging hides behind it")
|
|
|
|
| 141 |
return ring.to(device)
|
| 142 |
|
| 143 |
|
| 144 |
+
def _smi_settings(index):
|
| 145 |
+
"""ECC mode, driver, and power limit via nvidia-smi; None fields
|
| 146 |
+
when the tool is unavailable."""
|
| 147 |
+
import subprocess
|
| 148 |
+
try:
|
| 149 |
+
out = subprocess.run(
|
| 150 |
+
["nvidia-smi", "-i", str(index),
|
| 151 |
+
"--query-gpu=ecc.mode.current,driver_version,power.limit",
|
| 152 |
+
"--format=csv,noheader,nounits"],
|
| 153 |
+
capture_output=True, text=True, timeout=10)
|
| 154 |
+
parts = [p.strip() for p in out.stdout.strip().split(",")]
|
| 155 |
+
if out.returncode == 0 and len(parts) == 3:
|
| 156 |
+
return {
|
| 157 |
+
"ecc": parts[0],
|
| 158 |
+
"driver": parts[1],
|
| 159 |
+
"power_limit_w": float(parts[2]),
|
| 160 |
+
}
|
| 161 |
+
except (OSError, ValueError, subprocess.TimeoutExpired):
|
| 162 |
+
pass
|
| 163 |
+
return {"ecc": None, "driver": None, "power_limit_w": None}
|
| 164 |
+
|
| 165 |
+
|
| 166 |
+
def mma_tile_check(device="cuda", trials=8):
|
| 167 |
+
"""Random small-integer m16n16k16 tiles through the wmma fragment
|
| 168 |
+
path, compared exactly to the reference GEMM; pins M, N, K, and
|
| 169 |
+
operand mapping (integer operands make fp32 accumulation exact)."""
|
| 170 |
+
worst = 0.0
|
| 171 |
+
for t in range(trials):
|
| 172 |
+
g = torch.Generator(device=device).manual_seed(1000 + t)
|
| 173 |
+
a = torch.randint(-3, 4, (16, 16), device=device,
|
| 174 |
+
generator=g).to(torch.float16)
|
| 175 |
+
b = torch.randint(-3, 4, (16, 16), device=device,
|
| 176 |
+
generator=g).to(torch.float16)
|
| 177 |
+
c = torch.zeros(16, 16, device=device, dtype=torch.float32)
|
| 178 |
+
ops.mk_mma_tile(a.contiguous(), b.t().contiguous(), c)
|
| 179 |
+
_sync()
|
| 180 |
+
ref = a.float() @ b.float()
|
| 181 |
+
if not torch.equal(c, ref):
|
| 182 |
+
worst = max(worst, float((c - ref).abs().max().item()))
|
| 183 |
+
return {"exact": worst == 0.0, "max_abs_error": worst,
|
| 184 |
+
"trials": trials}
|
| 185 |
+
|
| 186 |
+
|
| 187 |
def probe_device(device="cuda", quick=False):
|
| 188 |
"""Empirical device dossier. Each entry is measured by a dedicated
|
| 189 |
probe kernel and carries units, method, the SM clock it ran under, and
|
|
|
|
| 200 |
"vram_bytes": props.total_memory,
|
| 201 |
"torch": torch.__version__,
|
| 202 |
"cuda_runtime": torch.version.cuda,
|
| 203 |
+
# instrument settings: readings depend on them, so the
|
| 204 |
+
# dossier records them (None when nvidia-smi is unavailable)
|
| 205 |
+
**_smi_settings(torch.device(device).index or 0),
|
| 206 |
}
|
| 207 |
}
|
| 208 |
sink = torch.zeros(2, dtype=torch.float32, device=device)
|
|
|
|
| 378 |
"register-fragment mma_sync loops (wmma; fp8 and "
|
| 379 |
"2:4-sparse fp16 via inline PTX m16n8k32; sparse "
|
| 380 |
"counted dense-equivalent, the vendor convention); "
|
| 381 |
+
"flops derive from the mean accumulator read-back "
|
| 382 |
+
"with every fragment element observed, never the "
|
| 383 |
+
"declared loop shape",
|
| 384 |
clk, "medium",
|
| 385 |
"dense-tile rate without memory traffic; real "
|
| 386 |
"kernels see this only when staging hides behind it")
|
build/torch212-cxx11-cu132-x86_64-linux/_metakernel_cuda_1f7e92c.abi3.so
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:df7591608fddc28937a1bd6874a4074f72939e938f15c32c2e28a82d209a63b9
|
| 3 |
-
size 1111792
|
|
|
|
|
|
|
|
|
|
|
|
build/torch212-cxx11-cu132-x86_64-linux/_metakernel_cuda_917bc5f.abi3.so
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2d8326752eb1ab9ee2f69615829349109c03650822d4a5e5c372a7e0d7d9610f
|
| 3 |
+
size 1192744
|
build/torch212-cxx11-cu132-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _metakernel_cuda_917bc5f
|
| 3 |
+
ops = torch.ops._metakernel_cuda_917bc5f
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_metakernel_cuda_917bc5f::{op_name}"
|
build/torch212-cxx11-cu132-x86_64-linux/_pinned.py
CHANGED
|
@@ -209,83 +209,86 @@ PINNED = {
|
|
| 209 |
},
|
| 210 |
"sm89_nvidiartx6000adagenerati": {
|
| 211 |
"atomics_f32": {
|
| 212 |
-
"clock_ghz": 2.
|
| 213 |
"confidence": "high",
|
| 214 |
"method": "atomicAdd hammer; curve sweeps the number of distinct global addresses from 1 (full contention) to one per thread",
|
| 215 |
"units": "Gop/s",
|
| 216 |
"value": {
|
| 217 |
"curve_slots": {
|
| 218 |
-
"1": 0.
|
| 219 |
-
"145408":
|
| 220 |
-
"4096":
|
| 221 |
-
"512": 55.
|
| 222 |
-
"64": 13.
|
| 223 |
-
"8": 5.
|
| 224 |
},
|
| 225 |
-
"shared_same_addr": 12.
|
| 226 |
}
|
| 227 |
},
|
| 228 |
"clock": {
|
| 229 |
"confidence": "high",
|
| 230 |
-
"final_ghz": 2.
|
| 231 |
-
"max_ghz": 2.
|
| 232 |
"method": "24 back-to-back FMA spin windows of 30M ticks; wall/ticks per window",
|
| 233 |
-
"min_ghz": 2.
|
| 234 |
"sag_pct": 0.3,
|
| 235 |
"units": "GHz"
|
| 236 |
},
|
| 237 |
"device": {
|
| 238 |
"cuda_runtime": "12.6",
|
|
|
|
|
|
|
| 239 |
"l2_bytes": 100663296,
|
| 240 |
"name": "NVIDIA RTX 6000 Ada Generation",
|
|
|
|
| 241 |
"sm_arch": "sm89",
|
| 242 |
"sms": 142,
|
| 243 |
"torch": "2.10.0+cu126",
|
| 244 |
"vram_bytes": 48305274880
|
| 245 |
},
|
| 246 |
"dram_bw": {
|
| 247 |
-
"clock_ghz": 2.
|
| 248 |
"confidence": "high",
|
| 249 |
"method": "streaming triad c=a+s*b per access width; read-only fold; write-only fill; random float4 gather (16B granules, nominal traffic)",
|
| 250 |
"note": "gather moves full cache lines per 16B granule, so its nominal number is the achievable rate for random access, not a line-efficiency claim",
|
| 251 |
"units": "GB/s",
|
| 252 |
"value": {
|
| 253 |
-
"random_gather_16B":
|
| 254 |
-
"read_only":
|
| 255 |
-
"triad_16B":
|
| 256 |
-
"triad_4B":
|
| 257 |
-
"triad_8B":
|
| 258 |
-
"write_only":
|
| 259 |
}
|
| 260 |
},
|
| 261 |
"fma_f32": {
|
| 262 |
-
"clock_ghz": 2.
|
| 263 |
"confidence": "high",
|
| 264 |
"method": "register-resident FMA chains",
|
| 265 |
"units": "TFLOP/s",
|
| 266 |
-
"value":
|
| 267 |
},
|
| 268 |
"fma_f64": {
|
| 269 |
-
"clock_ghz": 2.
|
| 270 |
"confidence": "high",
|
| 271 |
"method": "register-resident double FMA chains (the DFMA pipe)",
|
| 272 |
"units": "TFLOP/s",
|
| 273 |
-
"value": 1.
|
| 274 |
},
|
| 275 |
"grid_barrier": {
|
| 276 |
-
"clock_ghz": 2.
|
| 277 |
"confidence": "high",
|
| 278 |
"method": "cooperative kernel, 142 blocks x 256 threads",
|
| 279 |
"units": "us per grid.sync",
|
| 280 |
"value": 0.54
|
| 281 |
},
|
| 282 |
"l2_bw": {
|
| 283 |
-
"clock_ghz": 2.
|
| 284 |
"confidence": "medium",
|
| 285 |
"method": "in-kernel repeated triad passes over 72 MB resident working set",
|
| 286 |
"note": "first pass streams from HBM; amortized over 64 passes",
|
| 287 |
"units": "GB/s",
|
| 288 |
-
"value":
|
| 289 |
},
|
| 290 |
"latency": {
|
| 291 |
"clock_ghz": 2.687,
|
|
@@ -294,37 +297,37 @@ PINNED = {
|
|
| 294 |
"note": "smem includes index arithmetic; HBM includes residual TLB effects at large footprints",
|
| 295 |
"units": "cycles (single-lane dependent loads)",
|
| 296 |
"value": {
|
| 297 |
-
"dram_cycles":
|
| 298 |
-
"l1_cycles": 45.
|
| 299 |
-
"l2_cycles":
|
| 300 |
"ns_per_cycle": 0.372,
|
| 301 |
"smem_cycles": 30.0
|
| 302 |
}
|
| 303 |
},
|
| 304 |
"launch_overhead": {
|
| 305 |
-
"clock_ghz": 2.
|
| 306 |
"confidence": "high",
|
| 307 |
"method": "empty-kernel trains, queued vs launch+sync",
|
| 308 |
"note": "host-dependent: includes torch op dispatch",
|
| 309 |
"units": "us",
|
| 310 |
"value": {
|
| 311 |
-
"queued_us": 5.
|
| 312 |
-
"round_trip_us": 14.
|
| 313 |
}
|
| 314 |
},
|
| 315 |
"mma": {
|
| 316 |
-
"clock_ghz": 2.
|
| 317 |
"confidence": "medium",
|
| 318 |
-
"method": "register-fragment mma_sync loops (wmma; fp8 and 2:4-sparse fp16 via inline PTX m16n8k32; sparse counted dense-equivalent, the vendor convention); flops
|
| 319 |
"note": "dense-tile rate without memory traffic; real kernels see this only when staging hides behind it",
|
| 320 |
"units": "TFLOP/s (TOP/s for int8)",
|
| 321 |
"value": {
|
| 322 |
-
"bf16":
|
| 323 |
-
"fp16":
|
| 324 |
-
"fp16_sparse_2_4":
|
| 325 |
-
"fp8_e4m3":
|
| 326 |
-
"int8":
|
| 327 |
-
"tf32":
|
| 328 |
},
|
| 329 |
"verified_k_lanes": {
|
| 330 |
"bf16": {
|
|
@@ -354,7 +357,7 @@ PINNED = {
|
|
| 354 |
}
|
| 355 |
},
|
| 356 |
"occupancy_blocks_per_sm": {
|
| 357 |
-
"clock_ghz": 2.
|
| 358 |
"confidence": "high",
|
| 359 |
"method": "occupancy API on the float4 triad kernel",
|
| 360 |
"note": "API-derived, not timing-derived",
|
|
@@ -387,49 +390,49 @@ PINNED = {
|
|
| 387 |
}
|
| 388 |
},
|
| 389 |
"occupancy_knees_fma_tflops": {
|
| 390 |
-
"clock_ghz": 2.
|
| 391 |
"confidence": "high",
|
| 392 |
"method": "a single dependent FMA chain per thread, timed at forced (threads, dyn smem) occupancies over fixed total work; throughput is proportional to resident threads until the pipe saturates, so the cliff marks where occupancy stops covering latency",
|
| 393 |
"note": "timing-derived counterpart to the API table above",
|
| 394 |
"units": "TFLOP/s",
|
| 395 |
"value": {
|
| 396 |
"t1024": {
|
| 397 |
-
"0KB":
|
| 398 |
-
"32KB":
|
| 399 |
-
"48KB":
|
| 400 |
},
|
| 401 |
"t128": {
|
| 402 |
-
"0KB":
|
| 403 |
-
"32KB": 60.
|
| 404 |
-
"48KB":
|
| 405 |
},
|
| 406 |
"t256": {
|
| 407 |
-
"0KB":
|
| 408 |
-
"32KB":
|
| 409 |
-
"48KB":
|
| 410 |
}
|
| 411 |
}
|
| 412 |
},
|
| 413 |
"smem_bw": {
|
| 414 |
-
"clock_ghz": 2.
|
| 415 |
"confidence": "medium",
|
| 416 |
"method": "block-resident read+write streaming (8 B per thread-iteration), aggregated across SMs",
|
| 417 |
"note": "bank-conflict-light access pattern; a conflicted pattern can be far lower",
|
| 418 |
"units": "GB/s",
|
| 419 |
-
"value":
|
| 420 |
},
|
| 421 |
"transfer_bw": {
|
| 422 |
-
"clock_ghz": 2.
|
| 423 |
"confidence": "high",
|
| 424 |
"method": "256 MB torch copies, cudaEvent-timed",
|
| 425 |
"note": "pageable numbers include the staging copy; d2d counts one direction of traffic",
|
| 426 |
"units": "GB/s",
|
| 427 |
"value": {
|
| 428 |
-
"d2d":
|
| 429 |
-
"d2h_pageable":
|
| 430 |
-
"d2h_pinned": 26.
|
| 431 |
-
"h2d_pageable":
|
| 432 |
-
"h2d_pinned":
|
| 433 |
}
|
| 434 |
}
|
| 435 |
}
|
|
|
|
| 209 |
},
|
| 210 |
"sm89_nvidiartx6000adagenerati": {
|
| 211 |
"atomics_f32": {
|
| 212 |
+
"clock_ghz": 2.706,
|
| 213 |
"confidence": "high",
|
| 214 |
"method": "atomicAdd hammer; curve sweeps the number of distinct global addresses from 1 (full contention) to one per thread",
|
| 215 |
"units": "Gop/s",
|
| 216 |
"value": {
|
| 217 |
"curve_slots": {
|
| 218 |
+
"1": 0.72,
|
| 219 |
+
"145408": 483.54,
|
| 220 |
+
"4096": 209.84,
|
| 221 |
+
"512": 55.6,
|
| 222 |
+
"64": 13.82,
|
| 223 |
+
"8": 5.77
|
| 224 |
},
|
| 225 |
+
"shared_same_addr": 12.88
|
| 226 |
}
|
| 227 |
},
|
| 228 |
"clock": {
|
| 229 |
"confidence": "high",
|
| 230 |
+
"final_ghz": 2.699,
|
| 231 |
+
"max_ghz": 2.706,
|
| 232 |
"method": "24 back-to-back FMA spin windows of 30M ticks; wall/ticks per window",
|
| 233 |
+
"min_ghz": 2.501,
|
| 234 |
"sag_pct": 0.3,
|
| 235 |
"units": "GHz"
|
| 236 |
},
|
| 237 |
"device": {
|
| 238 |
"cuda_runtime": "12.6",
|
| 239 |
+
"driver": "595.97",
|
| 240 |
+
"ecc": "Enabled",
|
| 241 |
"l2_bytes": 100663296,
|
| 242 |
"name": "NVIDIA RTX 6000 Ada Generation",
|
| 243 |
+
"power_limit_w": 300.0,
|
| 244 |
"sm_arch": "sm89",
|
| 245 |
"sms": 142,
|
| 246 |
"torch": "2.10.0+cu126",
|
| 247 |
"vram_bytes": 48305274880
|
| 248 |
},
|
| 249 |
"dram_bw": {
|
| 250 |
+
"clock_ghz": 2.706,
|
| 251 |
"confidence": "high",
|
| 252 |
"method": "streaming triad c=a+s*b per access width; read-only fold; write-only fill; random float4 gather (16B granules, nominal traffic)",
|
| 253 |
"note": "gather moves full cache lines per 16B granule, so its nominal number is the achievable rate for random access, not a line-efficiency claim",
|
| 254 |
"units": "GB/s",
|
| 255 |
"value": {
|
| 256 |
+
"random_gather_16B": 218.5,
|
| 257 |
+
"read_only": 771.0,
|
| 258 |
+
"triad_16B": 663.1,
|
| 259 |
+
"triad_4B": 638.3,
|
| 260 |
+
"triad_8B": 705.3,
|
| 261 |
+
"write_only": 766.5
|
| 262 |
}
|
| 263 |
},
|
| 264 |
"fma_f32": {
|
| 265 |
+
"clock_ghz": 2.706,
|
| 266 |
"confidence": "high",
|
| 267 |
"method": "register-resident FMA chains",
|
| 268 |
"units": "TFLOP/s",
|
| 269 |
+
"value": 90.85
|
| 270 |
},
|
| 271 |
"fma_f64": {
|
| 272 |
+
"clock_ghz": 2.706,
|
| 273 |
"confidence": "high",
|
| 274 |
"method": "register-resident double FMA chains (the DFMA pipe)",
|
| 275 |
"units": "TFLOP/s",
|
| 276 |
+
"value": 1.282
|
| 277 |
},
|
| 278 |
"grid_barrier": {
|
| 279 |
+
"clock_ghz": 2.706,
|
| 280 |
"confidence": "high",
|
| 281 |
"method": "cooperative kernel, 142 blocks x 256 threads",
|
| 282 |
"units": "us per grid.sync",
|
| 283 |
"value": 0.54
|
| 284 |
},
|
| 285 |
"l2_bw": {
|
| 286 |
+
"clock_ghz": 2.706,
|
| 287 |
"confidence": "medium",
|
| 288 |
"method": "in-kernel repeated triad passes over 72 MB resident working set",
|
| 289 |
"note": "first pass streams from HBM; amortized over 64 passes",
|
| 290 |
"units": "GB/s",
|
| 291 |
+
"value": 9325.3
|
| 292 |
},
|
| 293 |
"latency": {
|
| 294 |
"clock_ghz": 2.687,
|
|
|
|
| 297 |
"note": "smem includes index arithmetic; HBM includes residual TLB effects at large footprints",
|
| 298 |
"units": "cycles (single-lane dependent loads)",
|
| 299 |
"value": {
|
| 300 |
+
"dram_cycles": 649.4,
|
| 301 |
+
"l1_cycles": 45.8,
|
| 302 |
+
"l2_cycles": 291.5,
|
| 303 |
"ns_per_cycle": 0.372,
|
| 304 |
"smem_cycles": 30.0
|
| 305 |
}
|
| 306 |
},
|
| 307 |
"launch_overhead": {
|
| 308 |
+
"clock_ghz": 2.706,
|
| 309 |
"confidence": "high",
|
| 310 |
"method": "empty-kernel trains, queued vs launch+sync",
|
| 311 |
"note": "host-dependent: includes torch op dispatch",
|
| 312 |
"units": "us",
|
| 313 |
"value": {
|
| 314 |
+
"queued_us": 5.55,
|
| 315 |
+
"round_trip_us": 14.1
|
| 316 |
}
|
| 317 |
},
|
| 318 |
"mma": {
|
| 319 |
+
"clock_ghz": 2.706,
|
| 320 |
"confidence": "medium",
|
| 321 |
+
"method": "register-fragment mma_sync loops (wmma; fp8 and 2:4-sparse fp16 via inline PTX m16n8k32; sparse counted dense-equivalent, the vendor convention); flops derive from the mean accumulator read-back with every fragment element observed, never the declared loop shape",
|
| 322 |
"note": "dense-tile rate without memory traffic; real kernels see this only when staging hides behind it",
|
| 323 |
"units": "TFLOP/s (TOP/s for int8)",
|
| 324 |
"value": {
|
| 325 |
+
"bf16": 365.5,
|
| 326 |
+
"fp16": 375.9,
|
| 327 |
+
"fp16_sparse_2_4": 713.4,
|
| 328 |
+
"fp8_e4m3": 193.7,
|
| 329 |
+
"int8": 770.4,
|
| 330 |
+
"tf32": 177.1
|
| 331 |
},
|
| 332 |
"verified_k_lanes": {
|
| 333 |
"bf16": {
|
|
|
|
| 357 |
}
|
| 358 |
},
|
| 359 |
"occupancy_blocks_per_sm": {
|
| 360 |
+
"clock_ghz": 2.706,
|
| 361 |
"confidence": "high",
|
| 362 |
"method": "occupancy API on the float4 triad kernel",
|
| 363 |
"note": "API-derived, not timing-derived",
|
|
|
|
| 390 |
}
|
| 391 |
},
|
| 392 |
"occupancy_knees_fma_tflops": {
|
| 393 |
+
"clock_ghz": 2.706,
|
| 394 |
"confidence": "high",
|
| 395 |
"method": "a single dependent FMA chain per thread, timed at forced (threads, dyn smem) occupancies over fixed total work; throughput is proportional to resident threads until the pipe saturates, so the cliff marks where occupancy stops covering latency",
|
| 396 |
"note": "timing-derived counterpart to the API table above",
|
| 397 |
"units": "TFLOP/s",
|
| 398 |
"value": {
|
| 399 |
"t1024": {
|
| 400 |
+
"0KB": 75.5,
|
| 401 |
+
"32KB": 73.66,
|
| 402 |
+
"48KB": 74.95
|
| 403 |
},
|
| 404 |
"t128": {
|
| 405 |
+
"0KB": 79.86,
|
| 406 |
+
"32KB": 60.31,
|
| 407 |
+
"48KB": 44.57
|
| 408 |
},
|
| 409 |
"t256": {
|
| 410 |
+
"0KB": 81.69,
|
| 411 |
+
"32KB": 79.48,
|
| 412 |
+
"48KB": 71.47
|
| 413 |
}
|
| 414 |
}
|
| 415 |
},
|
| 416 |
"smem_bw": {
|
| 417 |
+
"clock_ghz": 2.706,
|
| 418 |
"confidence": "medium",
|
| 419 |
"method": "block-resident read+write streaming (8 B per thread-iteration), aggregated across SMs",
|
| 420 |
"note": "bank-conflict-light access pattern; a conflicted pattern can be far lower",
|
| 421 |
"units": "GB/s",
|
| 422 |
+
"value": 21250.0
|
| 423 |
},
|
| 424 |
"transfer_bw": {
|
| 425 |
+
"clock_ghz": 2.706,
|
| 426 |
"confidence": "high",
|
| 427 |
"method": "256 MB torch copies, cudaEvent-timed",
|
| 428 |
"note": "pageable numbers include the staging copy; d2d counts one direction of traffic",
|
| 429 |
"units": "GB/s",
|
| 430 |
"value": {
|
| 431 |
+
"d2d": 330.7,
|
| 432 |
+
"d2h_pageable": 15.6,
|
| 433 |
+
"d2h_pinned": 26.2,
|
| 434 |
+
"h2d_pageable": 16.6,
|
| 435 |
+
"h2d_pinned": 24.0
|
| 436 |
}
|
| 437 |
}
|
| 438 |
}
|
build/torch212-cxx11-cu132-x86_64-linux/metadata.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"name": "metakernel",
|
| 3 |
-
"id": "
|
| 4 |
"version": 1,
|
| 5 |
"license": "Apache-2.0",
|
| 6 |
"python-depends": [],
|
|
@@ -18,10 +18,10 @@
|
|
| 18 |
"digest": {
|
| 19 |
"algorithm": "sha256",
|
| 20 |
"files": {
|
| 21 |
-
"__init__.py": "
|
| 22 |
-
"
|
| 23 |
-
"_ops.py": "
|
| 24 |
-
"_pinned.py": "
|
| 25 |
"metakernel/__init__.py": "DFYPlrhXwYjEqCl/8n0SmWGZV8NFml5DPhMjKfv98GY="
|
| 26 |
}
|
| 27 |
},
|
|
@@ -32,7 +32,7 @@
|
|
| 32 |
"dirty": false
|
| 33 |
},
|
| 34 |
"kernel": {
|
| 35 |
-
"sha": "
|
| 36 |
"dirty": false
|
| 37 |
}
|
| 38 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"name": "metakernel",
|
| 3 |
+
"id": "_metakernel_cuda_917bc5f",
|
| 4 |
"version": 1,
|
| 5 |
"license": "Apache-2.0",
|
| 6 |
"python-depends": [],
|
|
|
|
| 18 |
"digest": {
|
| 19 |
"algorithm": "sha256",
|
| 20 |
"files": {
|
| 21 |
+
"__init__.py": "j+f09TbMQC/dkaD/Ls5Ig7CHJ/yTI1syrDZhJVpz4rA=",
|
| 22 |
+
"_metakernel_cuda_917bc5f.abi3.so": "LYMmdS6xq57i9pYVgpNJEJwDZQgi1KXlw3Kn4NfZYQ8=",
|
| 23 |
+
"_ops.py": "HaN7LmS0+rYVmkKdGje8u4il8c3tQT0x4w4iwQvC8qY=",
|
| 24 |
+
"_pinned.py": "cRCc88scJyKco8+sKHXkGFaeXl07lvtC4hrfO/gQ1HU=",
|
| 25 |
"metakernel/__init__.py": "DFYPlrhXwYjEqCl/8n0SmWGZV8NFml5DPhMjKfv98GY="
|
| 26 |
}
|
| 27 |
},
|
|
|
|
| 32 |
"dirty": false
|
| 33 |
},
|
| 34 |
"kernel": {
|
| 35 |
+
"sha": "917bc5f20b9abdcd0f8afec590cc2eaa27764e8c",
|
| 36 |
"dirty": false
|
| 37 |
}
|
| 38 |
}
|
build/torch213-cxx11-cu126-x86_64-linux/__init__.py
CHANGED
|
@@ -141,6 +141,49 @@ def _sattolo_ring(n, device, generator=None):
|
|
| 141 |
return ring.to(device)
|
| 142 |
|
| 143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
def probe_device(device="cuda", quick=False):
|
| 145 |
"""Empirical device dossier. Each entry is measured by a dedicated
|
| 146 |
probe kernel and carries units, method, the SM clock it ran under, and
|
|
@@ -157,6 +200,9 @@ def probe_device(device="cuda", quick=False):
|
|
| 157 |
"vram_bytes": props.total_memory,
|
| 158 |
"torch": torch.__version__,
|
| 159 |
"cuda_runtime": torch.version.cuda,
|
|
|
|
|
|
|
|
|
|
| 160 |
}
|
| 161 |
}
|
| 162 |
sink = torch.zeros(2, dtype=torch.float32, device=device)
|
|
@@ -332,8 +378,9 @@ def probe_device(device="cuda", quick=False):
|
|
| 332 |
"register-fragment mma_sync loops (wmma; fp8 and "
|
| 333 |
"2:4-sparse fp16 via inline PTX m16n8k32; sparse "
|
| 334 |
"counted dense-equivalent, the vendor convention); "
|
| 335 |
-
"flops
|
| 336 |
-
"
|
|
|
|
| 337 |
clk, "medium",
|
| 338 |
"dense-tile rate without memory traffic; real "
|
| 339 |
"kernels see this only when staging hides behind it")
|
|
|
|
| 141 |
return ring.to(device)
|
| 142 |
|
| 143 |
|
| 144 |
+
def _smi_settings(index):
|
| 145 |
+
"""ECC mode, driver, and power limit via nvidia-smi; None fields
|
| 146 |
+
when the tool is unavailable."""
|
| 147 |
+
import subprocess
|
| 148 |
+
try:
|
| 149 |
+
out = subprocess.run(
|
| 150 |
+
["nvidia-smi", "-i", str(index),
|
| 151 |
+
"--query-gpu=ecc.mode.current,driver_version,power.limit",
|
| 152 |
+
"--format=csv,noheader,nounits"],
|
| 153 |
+
capture_output=True, text=True, timeout=10)
|
| 154 |
+
parts = [p.strip() for p in out.stdout.strip().split(",")]
|
| 155 |
+
if out.returncode == 0 and len(parts) == 3:
|
| 156 |
+
return {
|
| 157 |
+
"ecc": parts[0],
|
| 158 |
+
"driver": parts[1],
|
| 159 |
+
"power_limit_w": float(parts[2]),
|
| 160 |
+
}
|
| 161 |
+
except (OSError, ValueError, subprocess.TimeoutExpired):
|
| 162 |
+
pass
|
| 163 |
+
return {"ecc": None, "driver": None, "power_limit_w": None}
|
| 164 |
+
|
| 165 |
+
|
| 166 |
+
def mma_tile_check(device="cuda", trials=8):
|
| 167 |
+
"""Random small-integer m16n16k16 tiles through the wmma fragment
|
| 168 |
+
path, compared exactly to the reference GEMM; pins M, N, K, and
|
| 169 |
+
operand mapping (integer operands make fp32 accumulation exact)."""
|
| 170 |
+
worst = 0.0
|
| 171 |
+
for t in range(trials):
|
| 172 |
+
g = torch.Generator(device=device).manual_seed(1000 + t)
|
| 173 |
+
a = torch.randint(-3, 4, (16, 16), device=device,
|
| 174 |
+
generator=g).to(torch.float16)
|
| 175 |
+
b = torch.randint(-3, 4, (16, 16), device=device,
|
| 176 |
+
generator=g).to(torch.float16)
|
| 177 |
+
c = torch.zeros(16, 16, device=device, dtype=torch.float32)
|
| 178 |
+
ops.mk_mma_tile(a.contiguous(), b.t().contiguous(), c)
|
| 179 |
+
_sync()
|
| 180 |
+
ref = a.float() @ b.float()
|
| 181 |
+
if not torch.equal(c, ref):
|
| 182 |
+
worst = max(worst, float((c - ref).abs().max().item()))
|
| 183 |
+
return {"exact": worst == 0.0, "max_abs_error": worst,
|
| 184 |
+
"trials": trials}
|
| 185 |
+
|
| 186 |
+
|
| 187 |
def probe_device(device="cuda", quick=False):
|
| 188 |
"""Empirical device dossier. Each entry is measured by a dedicated
|
| 189 |
probe kernel and carries units, method, the SM clock it ran under, and
|
|
|
|
| 200 |
"vram_bytes": props.total_memory,
|
| 201 |
"torch": torch.__version__,
|
| 202 |
"cuda_runtime": torch.version.cuda,
|
| 203 |
+
# instrument settings: readings depend on them, so the
|
| 204 |
+
# dossier records them (None when nvidia-smi is unavailable)
|
| 205 |
+
**_smi_settings(torch.device(device).index or 0),
|
| 206 |
}
|
| 207 |
}
|
| 208 |
sink = torch.zeros(2, dtype=torch.float32, device=device)
|
|
|
|
| 378 |
"register-fragment mma_sync loops (wmma; fp8 and "
|
| 379 |
"2:4-sparse fp16 via inline PTX m16n8k32; sparse "
|
| 380 |
"counted dense-equivalent, the vendor convention); "
|
| 381 |
+
"flops derive from the mean accumulator read-back "
|
| 382 |
+
"with every fragment element observed, never the "
|
| 383 |
+
"declared loop shape",
|
| 384 |
clk, "medium",
|
| 385 |
"dense-tile rate without memory traffic; real "
|
| 386 |
"kernels see this only when staging hides behind it")
|
build/{torch212-cxx11-cu126-x86_64-linux/_metakernel_cuda_1f7e92c.abi3.so → torch213-cxx11-cu126-x86_64-linux/_metakernel_cuda_917bc5f.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0634f489c462ad043e3f74dd507982442b579d271135ee3af4b8d532694232c2
|
| 3 |
+
size 743672
|
build/torch213-cxx11-cu126-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _metakernel_cuda_917bc5f
|
| 3 |
+
ops = torch.ops._metakernel_cuda_917bc5f
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_metakernel_cuda_917bc5f::{op_name}"
|
build/torch213-cxx11-cu126-x86_64-linux/_pinned.py
CHANGED
|
@@ -209,83 +209,86 @@ PINNED = {
|
|
| 209 |
},
|
| 210 |
"sm89_nvidiartx6000adagenerati": {
|
| 211 |
"atomics_f32": {
|
| 212 |
-
"clock_ghz": 2.
|
| 213 |
"confidence": "high",
|
| 214 |
"method": "atomicAdd hammer; curve sweeps the number of distinct global addresses from 1 (full contention) to one per thread",
|
| 215 |
"units": "Gop/s",
|
| 216 |
"value": {
|
| 217 |
"curve_slots": {
|
| 218 |
-
"1": 0.
|
| 219 |
-
"145408":
|
| 220 |
-
"4096":
|
| 221 |
-
"512": 55.
|
| 222 |
-
"64": 13.
|
| 223 |
-
"8": 5.
|
| 224 |
},
|
| 225 |
-
"shared_same_addr": 12.
|
| 226 |
}
|
| 227 |
},
|
| 228 |
"clock": {
|
| 229 |
"confidence": "high",
|
| 230 |
-
"final_ghz": 2.
|
| 231 |
-
"max_ghz": 2.
|
| 232 |
"method": "24 back-to-back FMA spin windows of 30M ticks; wall/ticks per window",
|
| 233 |
-
"min_ghz": 2.
|
| 234 |
"sag_pct": 0.3,
|
| 235 |
"units": "GHz"
|
| 236 |
},
|
| 237 |
"device": {
|
| 238 |
"cuda_runtime": "12.6",
|
|
|
|
|
|
|
| 239 |
"l2_bytes": 100663296,
|
| 240 |
"name": "NVIDIA RTX 6000 Ada Generation",
|
|
|
|
| 241 |
"sm_arch": "sm89",
|
| 242 |
"sms": 142,
|
| 243 |
"torch": "2.10.0+cu126",
|
| 244 |
"vram_bytes": 48305274880
|
| 245 |
},
|
| 246 |
"dram_bw": {
|
| 247 |
-
"clock_ghz": 2.
|
| 248 |
"confidence": "high",
|
| 249 |
"method": "streaming triad c=a+s*b per access width; read-only fold; write-only fill; random float4 gather (16B granules, nominal traffic)",
|
| 250 |
"note": "gather moves full cache lines per 16B granule, so its nominal number is the achievable rate for random access, not a line-efficiency claim",
|
| 251 |
"units": "GB/s",
|
| 252 |
"value": {
|
| 253 |
-
"random_gather_16B":
|
| 254 |
-
"read_only":
|
| 255 |
-
"triad_16B":
|
| 256 |
-
"triad_4B":
|
| 257 |
-
"triad_8B":
|
| 258 |
-
"write_only":
|
| 259 |
}
|
| 260 |
},
|
| 261 |
"fma_f32": {
|
| 262 |
-
"clock_ghz": 2.
|
| 263 |
"confidence": "high",
|
| 264 |
"method": "register-resident FMA chains",
|
| 265 |
"units": "TFLOP/s",
|
| 266 |
-
"value":
|
| 267 |
},
|
| 268 |
"fma_f64": {
|
| 269 |
-
"clock_ghz": 2.
|
| 270 |
"confidence": "high",
|
| 271 |
"method": "register-resident double FMA chains (the DFMA pipe)",
|
| 272 |
"units": "TFLOP/s",
|
| 273 |
-
"value": 1.
|
| 274 |
},
|
| 275 |
"grid_barrier": {
|
| 276 |
-
"clock_ghz": 2.
|
| 277 |
"confidence": "high",
|
| 278 |
"method": "cooperative kernel, 142 blocks x 256 threads",
|
| 279 |
"units": "us per grid.sync",
|
| 280 |
"value": 0.54
|
| 281 |
},
|
| 282 |
"l2_bw": {
|
| 283 |
-
"clock_ghz": 2.
|
| 284 |
"confidence": "medium",
|
| 285 |
"method": "in-kernel repeated triad passes over 72 MB resident working set",
|
| 286 |
"note": "first pass streams from HBM; amortized over 64 passes",
|
| 287 |
"units": "GB/s",
|
| 288 |
-
"value":
|
| 289 |
},
|
| 290 |
"latency": {
|
| 291 |
"clock_ghz": 2.687,
|
|
@@ -294,37 +297,37 @@ PINNED = {
|
|
| 294 |
"note": "smem includes index arithmetic; HBM includes residual TLB effects at large footprints",
|
| 295 |
"units": "cycles (single-lane dependent loads)",
|
| 296 |
"value": {
|
| 297 |
-
"dram_cycles":
|
| 298 |
-
"l1_cycles": 45.
|
| 299 |
-
"l2_cycles":
|
| 300 |
"ns_per_cycle": 0.372,
|
| 301 |
"smem_cycles": 30.0
|
| 302 |
}
|
| 303 |
},
|
| 304 |
"launch_overhead": {
|
| 305 |
-
"clock_ghz": 2.
|
| 306 |
"confidence": "high",
|
| 307 |
"method": "empty-kernel trains, queued vs launch+sync",
|
| 308 |
"note": "host-dependent: includes torch op dispatch",
|
| 309 |
"units": "us",
|
| 310 |
"value": {
|
| 311 |
-
"queued_us": 5.
|
| 312 |
-
"round_trip_us": 14.
|
| 313 |
}
|
| 314 |
},
|
| 315 |
"mma": {
|
| 316 |
-
"clock_ghz": 2.
|
| 317 |
"confidence": "medium",
|
| 318 |
-
"method": "register-fragment mma_sync loops (wmma; fp8 and 2:4-sparse fp16 via inline PTX m16n8k32; sparse counted dense-equivalent, the vendor convention); flops
|
| 319 |
"note": "dense-tile rate without memory traffic; real kernels see this only when staging hides behind it",
|
| 320 |
"units": "TFLOP/s (TOP/s for int8)",
|
| 321 |
"value": {
|
| 322 |
-
"bf16":
|
| 323 |
-
"fp16":
|
| 324 |
-
"fp16_sparse_2_4":
|
| 325 |
-
"fp8_e4m3":
|
| 326 |
-
"int8":
|
| 327 |
-
"tf32":
|
| 328 |
},
|
| 329 |
"verified_k_lanes": {
|
| 330 |
"bf16": {
|
|
@@ -354,7 +357,7 @@ PINNED = {
|
|
| 354 |
}
|
| 355 |
},
|
| 356 |
"occupancy_blocks_per_sm": {
|
| 357 |
-
"clock_ghz": 2.
|
| 358 |
"confidence": "high",
|
| 359 |
"method": "occupancy API on the float4 triad kernel",
|
| 360 |
"note": "API-derived, not timing-derived",
|
|
@@ -387,49 +390,49 @@ PINNED = {
|
|
| 387 |
}
|
| 388 |
},
|
| 389 |
"occupancy_knees_fma_tflops": {
|
| 390 |
-
"clock_ghz": 2.
|
| 391 |
"confidence": "high",
|
| 392 |
"method": "a single dependent FMA chain per thread, timed at forced (threads, dyn smem) occupancies over fixed total work; throughput is proportional to resident threads until the pipe saturates, so the cliff marks where occupancy stops covering latency",
|
| 393 |
"note": "timing-derived counterpart to the API table above",
|
| 394 |
"units": "TFLOP/s",
|
| 395 |
"value": {
|
| 396 |
"t1024": {
|
| 397 |
-
"0KB":
|
| 398 |
-
"32KB":
|
| 399 |
-
"48KB":
|
| 400 |
},
|
| 401 |
"t128": {
|
| 402 |
-
"0KB":
|
| 403 |
-
"32KB": 60.
|
| 404 |
-
"48KB":
|
| 405 |
},
|
| 406 |
"t256": {
|
| 407 |
-
"0KB":
|
| 408 |
-
"32KB":
|
| 409 |
-
"48KB":
|
| 410 |
}
|
| 411 |
}
|
| 412 |
},
|
| 413 |
"smem_bw": {
|
| 414 |
-
"clock_ghz": 2.
|
| 415 |
"confidence": "medium",
|
| 416 |
"method": "block-resident read+write streaming (8 B per thread-iteration), aggregated across SMs",
|
| 417 |
"note": "bank-conflict-light access pattern; a conflicted pattern can be far lower",
|
| 418 |
"units": "GB/s",
|
| 419 |
-
"value":
|
| 420 |
},
|
| 421 |
"transfer_bw": {
|
| 422 |
-
"clock_ghz": 2.
|
| 423 |
"confidence": "high",
|
| 424 |
"method": "256 MB torch copies, cudaEvent-timed",
|
| 425 |
"note": "pageable numbers include the staging copy; d2d counts one direction of traffic",
|
| 426 |
"units": "GB/s",
|
| 427 |
"value": {
|
| 428 |
-
"d2d":
|
| 429 |
-
"d2h_pageable":
|
| 430 |
-
"d2h_pinned": 26.
|
| 431 |
-
"h2d_pageable":
|
| 432 |
-
"h2d_pinned":
|
| 433 |
}
|
| 434 |
}
|
| 435 |
}
|
|
|
|
| 209 |
},
|
| 210 |
"sm89_nvidiartx6000adagenerati": {
|
| 211 |
"atomics_f32": {
|
| 212 |
+
"clock_ghz": 2.706,
|
| 213 |
"confidence": "high",
|
| 214 |
"method": "atomicAdd hammer; curve sweeps the number of distinct global addresses from 1 (full contention) to one per thread",
|
| 215 |
"units": "Gop/s",
|
| 216 |
"value": {
|
| 217 |
"curve_slots": {
|
| 218 |
+
"1": 0.72,
|
| 219 |
+
"145408": 483.54,
|
| 220 |
+
"4096": 209.84,
|
| 221 |
+
"512": 55.6,
|
| 222 |
+
"64": 13.82,
|
| 223 |
+
"8": 5.77
|
| 224 |
},
|
| 225 |
+
"shared_same_addr": 12.88
|
| 226 |
}
|
| 227 |
},
|
| 228 |
"clock": {
|
| 229 |
"confidence": "high",
|
| 230 |
+
"final_ghz": 2.699,
|
| 231 |
+
"max_ghz": 2.706,
|
| 232 |
"method": "24 back-to-back FMA spin windows of 30M ticks; wall/ticks per window",
|
| 233 |
+
"min_ghz": 2.501,
|
| 234 |
"sag_pct": 0.3,
|
| 235 |
"units": "GHz"
|
| 236 |
},
|
| 237 |
"device": {
|
| 238 |
"cuda_runtime": "12.6",
|
| 239 |
+
"driver": "595.97",
|
| 240 |
+
"ecc": "Enabled",
|
| 241 |
"l2_bytes": 100663296,
|
| 242 |
"name": "NVIDIA RTX 6000 Ada Generation",
|
| 243 |
+
"power_limit_w": 300.0,
|
| 244 |
"sm_arch": "sm89",
|
| 245 |
"sms": 142,
|
| 246 |
"torch": "2.10.0+cu126",
|
| 247 |
"vram_bytes": 48305274880
|
| 248 |
},
|
| 249 |
"dram_bw": {
|
| 250 |
+
"clock_ghz": 2.706,
|
| 251 |
"confidence": "high",
|
| 252 |
"method": "streaming triad c=a+s*b per access width; read-only fold; write-only fill; random float4 gather (16B granules, nominal traffic)",
|
| 253 |
"note": "gather moves full cache lines per 16B granule, so its nominal number is the achievable rate for random access, not a line-efficiency claim",
|
| 254 |
"units": "GB/s",
|
| 255 |
"value": {
|
| 256 |
+
"random_gather_16B": 218.5,
|
| 257 |
+
"read_only": 771.0,
|
| 258 |
+
"triad_16B": 663.1,
|
| 259 |
+
"triad_4B": 638.3,
|
| 260 |
+
"triad_8B": 705.3,
|
| 261 |
+
"write_only": 766.5
|
| 262 |
}
|
| 263 |
},
|
| 264 |
"fma_f32": {
|
| 265 |
+
"clock_ghz": 2.706,
|
| 266 |
"confidence": "high",
|
| 267 |
"method": "register-resident FMA chains",
|
| 268 |
"units": "TFLOP/s",
|
| 269 |
+
"value": 90.85
|
| 270 |
},
|
| 271 |
"fma_f64": {
|
| 272 |
+
"clock_ghz": 2.706,
|
| 273 |
"confidence": "high",
|
| 274 |
"method": "register-resident double FMA chains (the DFMA pipe)",
|
| 275 |
"units": "TFLOP/s",
|
| 276 |
+
"value": 1.282
|
| 277 |
},
|
| 278 |
"grid_barrier": {
|
| 279 |
+
"clock_ghz": 2.706,
|
| 280 |
"confidence": "high",
|
| 281 |
"method": "cooperative kernel, 142 blocks x 256 threads",
|
| 282 |
"units": "us per grid.sync",
|
| 283 |
"value": 0.54
|
| 284 |
},
|
| 285 |
"l2_bw": {
|
| 286 |
+
"clock_ghz": 2.706,
|
| 287 |
"confidence": "medium",
|
| 288 |
"method": "in-kernel repeated triad passes over 72 MB resident working set",
|
| 289 |
"note": "first pass streams from HBM; amortized over 64 passes",
|
| 290 |
"units": "GB/s",
|
| 291 |
+
"value": 9325.3
|
| 292 |
},
|
| 293 |
"latency": {
|
| 294 |
"clock_ghz": 2.687,
|
|
|
|
| 297 |
"note": "smem includes index arithmetic; HBM includes residual TLB effects at large footprints",
|
| 298 |
"units": "cycles (single-lane dependent loads)",
|
| 299 |
"value": {
|
| 300 |
+
"dram_cycles": 649.4,
|
| 301 |
+
"l1_cycles": 45.8,
|
| 302 |
+
"l2_cycles": 291.5,
|
| 303 |
"ns_per_cycle": 0.372,
|
| 304 |
"smem_cycles": 30.0
|
| 305 |
}
|
| 306 |
},
|
| 307 |
"launch_overhead": {
|
| 308 |
+
"clock_ghz": 2.706,
|
| 309 |
"confidence": "high",
|
| 310 |
"method": "empty-kernel trains, queued vs launch+sync",
|
| 311 |
"note": "host-dependent: includes torch op dispatch",
|
| 312 |
"units": "us",
|
| 313 |
"value": {
|
| 314 |
+
"queued_us": 5.55,
|
| 315 |
+
"round_trip_us": 14.1
|
| 316 |
}
|
| 317 |
},
|
| 318 |
"mma": {
|
| 319 |
+
"clock_ghz": 2.706,
|
| 320 |
"confidence": "medium",
|
| 321 |
+
"method": "register-fragment mma_sync loops (wmma; fp8 and 2:4-sparse fp16 via inline PTX m16n8k32; sparse counted dense-equivalent, the vendor convention); flops derive from the mean accumulator read-back with every fragment element observed, never the declared loop shape",
|
| 322 |
"note": "dense-tile rate without memory traffic; real kernels see this only when staging hides behind it",
|
| 323 |
"units": "TFLOP/s (TOP/s for int8)",
|
| 324 |
"value": {
|
| 325 |
+
"bf16": 365.5,
|
| 326 |
+
"fp16": 375.9,
|
| 327 |
+
"fp16_sparse_2_4": 713.4,
|
| 328 |
+
"fp8_e4m3": 193.7,
|
| 329 |
+
"int8": 770.4,
|
| 330 |
+
"tf32": 177.1
|
| 331 |
},
|
| 332 |
"verified_k_lanes": {
|
| 333 |
"bf16": {
|
|
|
|
| 357 |
}
|
| 358 |
},
|
| 359 |
"occupancy_blocks_per_sm": {
|
| 360 |
+
"clock_ghz": 2.706,
|
| 361 |
"confidence": "high",
|
| 362 |
"method": "occupancy API on the float4 triad kernel",
|
| 363 |
"note": "API-derived, not timing-derived",
|
|
|
|
| 390 |
}
|
| 391 |
},
|
| 392 |
"occupancy_knees_fma_tflops": {
|
| 393 |
+
"clock_ghz": 2.706,
|
| 394 |
"confidence": "high",
|
| 395 |
"method": "a single dependent FMA chain per thread, timed at forced (threads, dyn smem) occupancies over fixed total work; throughput is proportional to resident threads until the pipe saturates, so the cliff marks where occupancy stops covering latency",
|
| 396 |
"note": "timing-derived counterpart to the API table above",
|
| 397 |
"units": "TFLOP/s",
|
| 398 |
"value": {
|
| 399 |
"t1024": {
|
| 400 |
+
"0KB": 75.5,
|
| 401 |
+
"32KB": 73.66,
|
| 402 |
+
"48KB": 74.95
|
| 403 |
},
|
| 404 |
"t128": {
|
| 405 |
+
"0KB": 79.86,
|
| 406 |
+
"32KB": 60.31,
|
| 407 |
+
"48KB": 44.57
|
| 408 |
},
|
| 409 |
"t256": {
|
| 410 |
+
"0KB": 81.69,
|
| 411 |
+
"32KB": 79.48,
|
| 412 |
+
"48KB": 71.47
|
| 413 |
}
|
| 414 |
}
|
| 415 |
},
|
| 416 |
"smem_bw": {
|
| 417 |
+
"clock_ghz": 2.706,
|
| 418 |
"confidence": "medium",
|
| 419 |
"method": "block-resident read+write streaming (8 B per thread-iteration), aggregated across SMs",
|
| 420 |
"note": "bank-conflict-light access pattern; a conflicted pattern can be far lower",
|
| 421 |
"units": "GB/s",
|
| 422 |
+
"value": 21250.0
|
| 423 |
},
|
| 424 |
"transfer_bw": {
|
| 425 |
+
"clock_ghz": 2.706,
|
| 426 |
"confidence": "high",
|
| 427 |
"method": "256 MB torch copies, cudaEvent-timed",
|
| 428 |
"note": "pageable numbers include the staging copy; d2d counts one direction of traffic",
|
| 429 |
"units": "GB/s",
|
| 430 |
"value": {
|
| 431 |
+
"d2d": 330.7,
|
| 432 |
+
"d2h_pageable": 15.6,
|
| 433 |
+
"d2h_pinned": 26.2,
|
| 434 |
+
"h2d_pageable": 16.6,
|
| 435 |
+
"h2d_pinned": 24.0
|
| 436 |
}
|
| 437 |
}
|
| 438 |
}
|
build/torch213-cxx11-cu126-x86_64-linux/metadata.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"name": "metakernel",
|
| 3 |
-
"id": "
|
| 4 |
"version": 1,
|
| 5 |
"license": "Apache-2.0",
|
| 6 |
"python-depends": [],
|
|
@@ -16,10 +16,10 @@
|
|
| 16 |
"digest": {
|
| 17 |
"algorithm": "sha256",
|
| 18 |
"files": {
|
| 19 |
-
"__init__.py": "
|
| 20 |
-
"
|
| 21 |
-
"_ops.py": "
|
| 22 |
-
"_pinned.py": "
|
| 23 |
"metakernel/__init__.py": "DFYPlrhXwYjEqCl/8n0SmWGZV8NFml5DPhMjKfv98GY="
|
| 24 |
}
|
| 25 |
},
|
|
@@ -30,7 +30,7 @@
|
|
| 30 |
"dirty": false
|
| 31 |
},
|
| 32 |
"kernel": {
|
| 33 |
-
"sha": "
|
| 34 |
"dirty": false
|
| 35 |
}
|
| 36 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"name": "metakernel",
|
| 3 |
+
"id": "_metakernel_cuda_917bc5f",
|
| 4 |
"version": 1,
|
| 5 |
"license": "Apache-2.0",
|
| 6 |
"python-depends": [],
|
|
|
|
| 16 |
"digest": {
|
| 17 |
"algorithm": "sha256",
|
| 18 |
"files": {
|
| 19 |
+
"__init__.py": "j+f09TbMQC/dkaD/Ls5Ig7CHJ/yTI1syrDZhJVpz4rA=",
|
| 20 |
+
"_metakernel_cuda_917bc5f.abi3.so": "BjT0icRirQQ+P3TdUHmCRCtXnScRNe469LjVMmlCMsI=",
|
| 21 |
+
"_ops.py": "HaN7LmS0+rYVmkKdGje8u4il8c3tQT0x4w4iwQvC8qY=",
|
| 22 |
+
"_pinned.py": "cRCc88scJyKco8+sKHXkGFaeXl07lvtC4hrfO/gQ1HU=",
|
| 23 |
"metakernel/__init__.py": "DFYPlrhXwYjEqCl/8n0SmWGZV8NFml5DPhMjKfv98GY="
|
| 24 |
}
|
| 25 |
},
|
|
|
|
| 30 |
"dirty": false
|
| 31 |
},
|
| 32 |
"kernel": {
|
| 33 |
+
"sha": "917bc5f20b9abdcd0f8afec590cc2eaa27764e8c",
|
| 34 |
"dirty": false
|
| 35 |
}
|
| 36 |
}
|
build/torch213-cxx11-cu130-x86_64-linux/__init__.py
CHANGED
|
@@ -141,6 +141,49 @@ def _sattolo_ring(n, device, generator=None):
|
|
| 141 |
return ring.to(device)
|
| 142 |
|
| 143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
def probe_device(device="cuda", quick=False):
|
| 145 |
"""Empirical device dossier. Each entry is measured by a dedicated
|
| 146 |
probe kernel and carries units, method, the SM clock it ran under, and
|
|
@@ -157,6 +200,9 @@ def probe_device(device="cuda", quick=False):
|
|
| 157 |
"vram_bytes": props.total_memory,
|
| 158 |
"torch": torch.__version__,
|
| 159 |
"cuda_runtime": torch.version.cuda,
|
|
|
|
|
|
|
|
|
|
| 160 |
}
|
| 161 |
}
|
| 162 |
sink = torch.zeros(2, dtype=torch.float32, device=device)
|
|
@@ -332,8 +378,9 @@ def probe_device(device="cuda", quick=False):
|
|
| 332 |
"register-fragment mma_sync loops (wmma; fp8 and "
|
| 333 |
"2:4-sparse fp16 via inline PTX m16n8k32; sparse "
|
| 334 |
"counted dense-equivalent, the vendor convention); "
|
| 335 |
-
"flops
|
| 336 |
-
"
|
|
|
|
| 337 |
clk, "medium",
|
| 338 |
"dense-tile rate without memory traffic; real "
|
| 339 |
"kernels see this only when staging hides behind it")
|
|
|
|
| 141 |
return ring.to(device)
|
| 142 |
|
| 143 |
|
| 144 |
+
def _smi_settings(index):
|
| 145 |
+
"""ECC mode, driver, and power limit via nvidia-smi; None fields
|
| 146 |
+
when the tool is unavailable."""
|
| 147 |
+
import subprocess
|
| 148 |
+
try:
|
| 149 |
+
out = subprocess.run(
|
| 150 |
+
["nvidia-smi", "-i", str(index),
|
| 151 |
+
"--query-gpu=ecc.mode.current,driver_version,power.limit",
|
| 152 |
+
"--format=csv,noheader,nounits"],
|
| 153 |
+
capture_output=True, text=True, timeout=10)
|
| 154 |
+
parts = [p.strip() for p in out.stdout.strip().split(",")]
|
| 155 |
+
if out.returncode == 0 and len(parts) == 3:
|
| 156 |
+
return {
|
| 157 |
+
"ecc": parts[0],
|
| 158 |
+
"driver": parts[1],
|
| 159 |
+
"power_limit_w": float(parts[2]),
|
| 160 |
+
}
|
| 161 |
+
except (OSError, ValueError, subprocess.TimeoutExpired):
|
| 162 |
+
pass
|
| 163 |
+
return {"ecc": None, "driver": None, "power_limit_w": None}
|
| 164 |
+
|
| 165 |
+
|
| 166 |
+
def mma_tile_check(device="cuda", trials=8):
|
| 167 |
+
"""Random small-integer m16n16k16 tiles through the wmma fragment
|
| 168 |
+
path, compared exactly to the reference GEMM; pins M, N, K, and
|
| 169 |
+
operand mapping (integer operands make fp32 accumulation exact)."""
|
| 170 |
+
worst = 0.0
|
| 171 |
+
for t in range(trials):
|
| 172 |
+
g = torch.Generator(device=device).manual_seed(1000 + t)
|
| 173 |
+
a = torch.randint(-3, 4, (16, 16), device=device,
|
| 174 |
+
generator=g).to(torch.float16)
|
| 175 |
+
b = torch.randint(-3, 4, (16, 16), device=device,
|
| 176 |
+
generator=g).to(torch.float16)
|
| 177 |
+
c = torch.zeros(16, 16, device=device, dtype=torch.float32)
|
| 178 |
+
ops.mk_mma_tile(a.contiguous(), b.t().contiguous(), c)
|
| 179 |
+
_sync()
|
| 180 |
+
ref = a.float() @ b.float()
|
| 181 |
+
if not torch.equal(c, ref):
|
| 182 |
+
worst = max(worst, float((c - ref).abs().max().item()))
|
| 183 |
+
return {"exact": worst == 0.0, "max_abs_error": worst,
|
| 184 |
+
"trials": trials}
|
| 185 |
+
|
| 186 |
+
|
| 187 |
def probe_device(device="cuda", quick=False):
|
| 188 |
"""Empirical device dossier. Each entry is measured by a dedicated
|
| 189 |
probe kernel and carries units, method, the SM clock it ran under, and
|
|
|
|
| 200 |
"vram_bytes": props.total_memory,
|
| 201 |
"torch": torch.__version__,
|
| 202 |
"cuda_runtime": torch.version.cuda,
|
| 203 |
+
# instrument settings: readings depend on them, so the
|
| 204 |
+
# dossier records them (None when nvidia-smi is unavailable)
|
| 205 |
+
**_smi_settings(torch.device(device).index or 0),
|
| 206 |
}
|
| 207 |
}
|
| 208 |
sink = torch.zeros(2, dtype=torch.float32, device=device)
|
|
|
|
| 378 |
"register-fragment mma_sync loops (wmma; fp8 and "
|
| 379 |
"2:4-sparse fp16 via inline PTX m16n8k32; sparse "
|
| 380 |
"counted dense-equivalent, the vendor convention); "
|
| 381 |
+
"flops derive from the mean accumulator read-back "
|
| 382 |
+
"with every fragment element observed, never the "
|
| 383 |
+
"declared loop shape",
|
| 384 |
clk, "medium",
|
| 385 |
"dense-tile rate without memory traffic; real "
|
| 386 |
"kernels see this only when staging hides behind it")
|
build/torch213-cxx11-cu130-x86_64-linux/_metakernel_cuda_1f7e92c.abi3.so
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:5124d5c3709ad98d50b994b08e93c7eab63bd4fb11fbcd20d66f8b11f1f3deca
|
| 3 |
-
size 1103272
|
|
|
|
|
|
|
|
|
|
|
|
build/torch213-cxx11-cu130-x86_64-linux/_metakernel_cuda_917bc5f.abi3.so
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:29ea584d4f56dc863bb82b9a4fee8d25e34768993257f624673d691125b4eb5e
|
| 3 |
+
size 1179960
|
build/torch213-cxx11-cu130-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _metakernel_cuda_917bc5f
|
| 3 |
+
ops = torch.ops._metakernel_cuda_917bc5f
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_metakernel_cuda_917bc5f::{op_name}"
|
build/torch213-cxx11-cu130-x86_64-linux/_pinned.py
CHANGED
|
@@ -209,83 +209,86 @@ PINNED = {
|
|
| 209 |
},
|
| 210 |
"sm89_nvidiartx6000adagenerati": {
|
| 211 |
"atomics_f32": {
|
| 212 |
-
"clock_ghz": 2.
|
| 213 |
"confidence": "high",
|
| 214 |
"method": "atomicAdd hammer; curve sweeps the number of distinct global addresses from 1 (full contention) to one per thread",
|
| 215 |
"units": "Gop/s",
|
| 216 |
"value": {
|
| 217 |
"curve_slots": {
|
| 218 |
-
"1": 0.
|
| 219 |
-
"145408":
|
| 220 |
-
"4096":
|
| 221 |
-
"512": 55.
|
| 222 |
-
"64": 13.
|
| 223 |
-
"8": 5.
|
| 224 |
},
|
| 225 |
-
"shared_same_addr": 12.
|
| 226 |
}
|
| 227 |
},
|
| 228 |
"clock": {
|
| 229 |
"confidence": "high",
|
| 230 |
-
"final_ghz": 2.
|
| 231 |
-
"max_ghz": 2.
|
| 232 |
"method": "24 back-to-back FMA spin windows of 30M ticks; wall/ticks per window",
|
| 233 |
-
"min_ghz": 2.
|
| 234 |
"sag_pct": 0.3,
|
| 235 |
"units": "GHz"
|
| 236 |
},
|
| 237 |
"device": {
|
| 238 |
"cuda_runtime": "12.6",
|
|
|
|
|
|
|
| 239 |
"l2_bytes": 100663296,
|
| 240 |
"name": "NVIDIA RTX 6000 Ada Generation",
|
|
|
|
| 241 |
"sm_arch": "sm89",
|
| 242 |
"sms": 142,
|
| 243 |
"torch": "2.10.0+cu126",
|
| 244 |
"vram_bytes": 48305274880
|
| 245 |
},
|
| 246 |
"dram_bw": {
|
| 247 |
-
"clock_ghz": 2.
|
| 248 |
"confidence": "high",
|
| 249 |
"method": "streaming triad c=a+s*b per access width; read-only fold; write-only fill; random float4 gather (16B granules, nominal traffic)",
|
| 250 |
"note": "gather moves full cache lines per 16B granule, so its nominal number is the achievable rate for random access, not a line-efficiency claim",
|
| 251 |
"units": "GB/s",
|
| 252 |
"value": {
|
| 253 |
-
"random_gather_16B":
|
| 254 |
-
"read_only":
|
| 255 |
-
"triad_16B":
|
| 256 |
-
"triad_4B":
|
| 257 |
-
"triad_8B":
|
| 258 |
-
"write_only":
|
| 259 |
}
|
| 260 |
},
|
| 261 |
"fma_f32": {
|
| 262 |
-
"clock_ghz": 2.
|
| 263 |
"confidence": "high",
|
| 264 |
"method": "register-resident FMA chains",
|
| 265 |
"units": "TFLOP/s",
|
| 266 |
-
"value":
|
| 267 |
},
|
| 268 |
"fma_f64": {
|
| 269 |
-
"clock_ghz": 2.
|
| 270 |
"confidence": "high",
|
| 271 |
"method": "register-resident double FMA chains (the DFMA pipe)",
|
| 272 |
"units": "TFLOP/s",
|
| 273 |
-
"value": 1.
|
| 274 |
},
|
| 275 |
"grid_barrier": {
|
| 276 |
-
"clock_ghz": 2.
|
| 277 |
"confidence": "high",
|
| 278 |
"method": "cooperative kernel, 142 blocks x 256 threads",
|
| 279 |
"units": "us per grid.sync",
|
| 280 |
"value": 0.54
|
| 281 |
},
|
| 282 |
"l2_bw": {
|
| 283 |
-
"clock_ghz": 2.
|
| 284 |
"confidence": "medium",
|
| 285 |
"method": "in-kernel repeated triad passes over 72 MB resident working set",
|
| 286 |
"note": "first pass streams from HBM; amortized over 64 passes",
|
| 287 |
"units": "GB/s",
|
| 288 |
-
"value":
|
| 289 |
},
|
| 290 |
"latency": {
|
| 291 |
"clock_ghz": 2.687,
|
|
@@ -294,37 +297,37 @@ PINNED = {
|
|
| 294 |
"note": "smem includes index arithmetic; HBM includes residual TLB effects at large footprints",
|
| 295 |
"units": "cycles (single-lane dependent loads)",
|
| 296 |
"value": {
|
| 297 |
-
"dram_cycles":
|
| 298 |
-
"l1_cycles": 45.
|
| 299 |
-
"l2_cycles":
|
| 300 |
"ns_per_cycle": 0.372,
|
| 301 |
"smem_cycles": 30.0
|
| 302 |
}
|
| 303 |
},
|
| 304 |
"launch_overhead": {
|
| 305 |
-
"clock_ghz": 2.
|
| 306 |
"confidence": "high",
|
| 307 |
"method": "empty-kernel trains, queued vs launch+sync",
|
| 308 |
"note": "host-dependent: includes torch op dispatch",
|
| 309 |
"units": "us",
|
| 310 |
"value": {
|
| 311 |
-
"queued_us": 5.
|
| 312 |
-
"round_trip_us": 14.
|
| 313 |
}
|
| 314 |
},
|
| 315 |
"mma": {
|
| 316 |
-
"clock_ghz": 2.
|
| 317 |
"confidence": "medium",
|
| 318 |
-
"method": "register-fragment mma_sync loops (wmma; fp8 and 2:4-sparse fp16 via inline PTX m16n8k32; sparse counted dense-equivalent, the vendor convention); flops
|
| 319 |
"note": "dense-tile rate without memory traffic; real kernels see this only when staging hides behind it",
|
| 320 |
"units": "TFLOP/s (TOP/s for int8)",
|
| 321 |
"value": {
|
| 322 |
-
"bf16":
|
| 323 |
-
"fp16":
|
| 324 |
-
"fp16_sparse_2_4":
|
| 325 |
-
"fp8_e4m3":
|
| 326 |
-
"int8":
|
| 327 |
-
"tf32":
|
| 328 |
},
|
| 329 |
"verified_k_lanes": {
|
| 330 |
"bf16": {
|
|
@@ -354,7 +357,7 @@ PINNED = {
|
|
| 354 |
}
|
| 355 |
},
|
| 356 |
"occupancy_blocks_per_sm": {
|
| 357 |
-
"clock_ghz": 2.
|
| 358 |
"confidence": "high",
|
| 359 |
"method": "occupancy API on the float4 triad kernel",
|
| 360 |
"note": "API-derived, not timing-derived",
|
|
@@ -387,49 +390,49 @@ PINNED = {
|
|
| 387 |
}
|
| 388 |
},
|
| 389 |
"occupancy_knees_fma_tflops": {
|
| 390 |
-
"clock_ghz": 2.
|
| 391 |
"confidence": "high",
|
| 392 |
"method": "a single dependent FMA chain per thread, timed at forced (threads, dyn smem) occupancies over fixed total work; throughput is proportional to resident threads until the pipe saturates, so the cliff marks where occupancy stops covering latency",
|
| 393 |
"note": "timing-derived counterpart to the API table above",
|
| 394 |
"units": "TFLOP/s",
|
| 395 |
"value": {
|
| 396 |
"t1024": {
|
| 397 |
-
"0KB":
|
| 398 |
-
"32KB":
|
| 399 |
-
"48KB":
|
| 400 |
},
|
| 401 |
"t128": {
|
| 402 |
-
"0KB":
|
| 403 |
-
"32KB": 60.
|
| 404 |
-
"48KB":
|
| 405 |
},
|
| 406 |
"t256": {
|
| 407 |
-
"0KB":
|
| 408 |
-
"32KB":
|
| 409 |
-
"48KB":
|
| 410 |
}
|
| 411 |
}
|
| 412 |
},
|
| 413 |
"smem_bw": {
|
| 414 |
-
"clock_ghz": 2.
|
| 415 |
"confidence": "medium",
|
| 416 |
"method": "block-resident read+write streaming (8 B per thread-iteration), aggregated across SMs",
|
| 417 |
"note": "bank-conflict-light access pattern; a conflicted pattern can be far lower",
|
| 418 |
"units": "GB/s",
|
| 419 |
-
"value":
|
| 420 |
},
|
| 421 |
"transfer_bw": {
|
| 422 |
-
"clock_ghz": 2.
|
| 423 |
"confidence": "high",
|
| 424 |
"method": "256 MB torch copies, cudaEvent-timed",
|
| 425 |
"note": "pageable numbers include the staging copy; d2d counts one direction of traffic",
|
| 426 |
"units": "GB/s",
|
| 427 |
"value": {
|
| 428 |
-
"d2d":
|
| 429 |
-
"d2h_pageable":
|
| 430 |
-
"d2h_pinned": 26.
|
| 431 |
-
"h2d_pageable":
|
| 432 |
-
"h2d_pinned":
|
| 433 |
}
|
| 434 |
}
|
| 435 |
}
|
|
|
|
| 209 |
},
|
| 210 |
"sm89_nvidiartx6000adagenerati": {
|
| 211 |
"atomics_f32": {
|
| 212 |
+
"clock_ghz": 2.706,
|
| 213 |
"confidence": "high",
|
| 214 |
"method": "atomicAdd hammer; curve sweeps the number of distinct global addresses from 1 (full contention) to one per thread",
|
| 215 |
"units": "Gop/s",
|
| 216 |
"value": {
|
| 217 |
"curve_slots": {
|
| 218 |
+
"1": 0.72,
|
| 219 |
+
"145408": 483.54,
|
| 220 |
+
"4096": 209.84,
|
| 221 |
+
"512": 55.6,
|
| 222 |
+
"64": 13.82,
|
| 223 |
+
"8": 5.77
|
| 224 |
},
|
| 225 |
+
"shared_same_addr": 12.88
|
| 226 |
}
|
| 227 |
},
|
| 228 |
"clock": {
|
| 229 |
"confidence": "high",
|
| 230 |
+
"final_ghz": 2.699,
|
| 231 |
+
"max_ghz": 2.706,
|
| 232 |
"method": "24 back-to-back FMA spin windows of 30M ticks; wall/ticks per window",
|
| 233 |
+
"min_ghz": 2.501,
|
| 234 |
"sag_pct": 0.3,
|
| 235 |
"units": "GHz"
|
| 236 |
},
|
| 237 |
"device": {
|
| 238 |
"cuda_runtime": "12.6",
|
| 239 |
+
"driver": "595.97",
|
| 240 |
+
"ecc": "Enabled",
|
| 241 |
"l2_bytes": 100663296,
|
| 242 |
"name": "NVIDIA RTX 6000 Ada Generation",
|
| 243 |
+
"power_limit_w": 300.0,
|
| 244 |
"sm_arch": "sm89",
|
| 245 |
"sms": 142,
|
| 246 |
"torch": "2.10.0+cu126",
|
| 247 |
"vram_bytes": 48305274880
|
| 248 |
},
|
| 249 |
"dram_bw": {
|
| 250 |
+
"clock_ghz": 2.706,
|
| 251 |
"confidence": "high",
|
| 252 |
"method": "streaming triad c=a+s*b per access width; read-only fold; write-only fill; random float4 gather (16B granules, nominal traffic)",
|
| 253 |
"note": "gather moves full cache lines per 16B granule, so its nominal number is the achievable rate for random access, not a line-efficiency claim",
|
| 254 |
"units": "GB/s",
|
| 255 |
"value": {
|
| 256 |
+
"random_gather_16B": 218.5,
|
| 257 |
+
"read_only": 771.0,
|
| 258 |
+
"triad_16B": 663.1,
|
| 259 |
+
"triad_4B": 638.3,
|
| 260 |
+
"triad_8B": 705.3,
|
| 261 |
+
"write_only": 766.5
|
| 262 |
}
|
| 263 |
},
|
| 264 |
"fma_f32": {
|
| 265 |
+
"clock_ghz": 2.706,
|
| 266 |
"confidence": "high",
|
| 267 |
"method": "register-resident FMA chains",
|
| 268 |
"units": "TFLOP/s",
|
| 269 |
+
"value": 90.85
|
| 270 |
},
|
| 271 |
"fma_f64": {
|
| 272 |
+
"clock_ghz": 2.706,
|
| 273 |
"confidence": "high",
|
| 274 |
"method": "register-resident double FMA chains (the DFMA pipe)",
|
| 275 |
"units": "TFLOP/s",
|
| 276 |
+
"value": 1.282
|
| 277 |
},
|
| 278 |
"grid_barrier": {
|
| 279 |
+
"clock_ghz": 2.706,
|
| 280 |
"confidence": "high",
|
| 281 |
"method": "cooperative kernel, 142 blocks x 256 threads",
|
| 282 |
"units": "us per grid.sync",
|
| 283 |
"value": 0.54
|
| 284 |
},
|
| 285 |
"l2_bw": {
|
| 286 |
+
"clock_ghz": 2.706,
|
| 287 |
"confidence": "medium",
|
| 288 |
"method": "in-kernel repeated triad passes over 72 MB resident working set",
|
| 289 |
"note": "first pass streams from HBM; amortized over 64 passes",
|
| 290 |
"units": "GB/s",
|
| 291 |
+
"value": 9325.3
|
| 292 |
},
|
| 293 |
"latency": {
|
| 294 |
"clock_ghz": 2.687,
|
|
|
|
| 297 |
"note": "smem includes index arithmetic; HBM includes residual TLB effects at large footprints",
|
| 298 |
"units": "cycles (single-lane dependent loads)",
|
| 299 |
"value": {
|
| 300 |
+
"dram_cycles": 649.4,
|
| 301 |
+
"l1_cycles": 45.8,
|
| 302 |
+
"l2_cycles": 291.5,
|
| 303 |
"ns_per_cycle": 0.372,
|
| 304 |
"smem_cycles": 30.0
|
| 305 |
}
|
| 306 |
},
|
| 307 |
"launch_overhead": {
|
| 308 |
+
"clock_ghz": 2.706,
|
| 309 |
"confidence": "high",
|
| 310 |
"method": "empty-kernel trains, queued vs launch+sync",
|
| 311 |
"note": "host-dependent: includes torch op dispatch",
|
| 312 |
"units": "us",
|
| 313 |
"value": {
|
| 314 |
+
"queued_us": 5.55,
|
| 315 |
+
"round_trip_us": 14.1
|
| 316 |
}
|
| 317 |
},
|
| 318 |
"mma": {
|
| 319 |
+
"clock_ghz": 2.706,
|
| 320 |
"confidence": "medium",
|
| 321 |
+
"method": "register-fragment mma_sync loops (wmma; fp8 and 2:4-sparse fp16 via inline PTX m16n8k32; sparse counted dense-equivalent, the vendor convention); flops derive from the mean accumulator read-back with every fragment element observed, never the declared loop shape",
|
| 322 |
"note": "dense-tile rate without memory traffic; real kernels see this only when staging hides behind it",
|
| 323 |
"units": "TFLOP/s (TOP/s for int8)",
|
| 324 |
"value": {
|
| 325 |
+
"bf16": 365.5,
|
| 326 |
+
"fp16": 375.9,
|
| 327 |
+
"fp16_sparse_2_4": 713.4,
|
| 328 |
+
"fp8_e4m3": 193.7,
|
| 329 |
+
"int8": 770.4,
|
| 330 |
+
"tf32": 177.1
|
| 331 |
},
|
| 332 |
"verified_k_lanes": {
|
| 333 |
"bf16": {
|
|
|
|
| 357 |
}
|
| 358 |
},
|
| 359 |
"occupancy_blocks_per_sm": {
|
| 360 |
+
"clock_ghz": 2.706,
|
| 361 |
"confidence": "high",
|
| 362 |
"method": "occupancy API on the float4 triad kernel",
|
| 363 |
"note": "API-derived, not timing-derived",
|
|
|
|
| 390 |
}
|
| 391 |
},
|
| 392 |
"occupancy_knees_fma_tflops": {
|
| 393 |
+
"clock_ghz": 2.706,
|
| 394 |
"confidence": "high",
|
| 395 |
"method": "a single dependent FMA chain per thread, timed at forced (threads, dyn smem) occupancies over fixed total work; throughput is proportional to resident threads until the pipe saturates, so the cliff marks where occupancy stops covering latency",
|
| 396 |
"note": "timing-derived counterpart to the API table above",
|
| 397 |
"units": "TFLOP/s",
|
| 398 |
"value": {
|
| 399 |
"t1024": {
|
| 400 |
+
"0KB": 75.5,
|
| 401 |
+
"32KB": 73.66,
|
| 402 |
+
"48KB": 74.95
|
| 403 |
},
|
| 404 |
"t128": {
|
| 405 |
+
"0KB": 79.86,
|
| 406 |
+
"32KB": 60.31,
|
| 407 |
+
"48KB": 44.57
|
| 408 |
},
|
| 409 |
"t256": {
|
| 410 |
+
"0KB": 81.69,
|
| 411 |
+
"32KB": 79.48,
|
| 412 |
+
"48KB": 71.47
|
| 413 |
}
|
| 414 |
}
|
| 415 |
},
|
| 416 |
"smem_bw": {
|
| 417 |
+
"clock_ghz": 2.706,
|
| 418 |
"confidence": "medium",
|
| 419 |
"method": "block-resident read+write streaming (8 B per thread-iteration), aggregated across SMs",
|
| 420 |
"note": "bank-conflict-light access pattern; a conflicted pattern can be far lower",
|
| 421 |
"units": "GB/s",
|
| 422 |
+
"value": 21250.0
|
| 423 |
},
|
| 424 |
"transfer_bw": {
|
| 425 |
+
"clock_ghz": 2.706,
|
| 426 |
"confidence": "high",
|
| 427 |
"method": "256 MB torch copies, cudaEvent-timed",
|
| 428 |
"note": "pageable numbers include the staging copy; d2d counts one direction of traffic",
|
| 429 |
"units": "GB/s",
|
| 430 |
"value": {
|
| 431 |
+
"d2d": 330.7,
|
| 432 |
+
"d2h_pageable": 15.6,
|
| 433 |
+
"d2h_pinned": 26.2,
|
| 434 |
+
"h2d_pageable": 16.6,
|
| 435 |
+
"h2d_pinned": 24.0
|
| 436 |
}
|
| 437 |
}
|
| 438 |
}
|
build/torch213-cxx11-cu130-x86_64-linux/metadata.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"name": "metakernel",
|
| 3 |
-
"id": "
|
| 4 |
"version": 1,
|
| 5 |
"license": "Apache-2.0",
|
| 6 |
"python-depends": [],
|
|
@@ -18,10 +18,10 @@
|
|
| 18 |
"digest": {
|
| 19 |
"algorithm": "sha256",
|
| 20 |
"files": {
|
| 21 |
-
"__init__.py": "
|
| 22 |
-
"
|
| 23 |
-
"_ops.py": "
|
| 24 |
-
"_pinned.py": "
|
| 25 |
"metakernel/__init__.py": "DFYPlrhXwYjEqCl/8n0SmWGZV8NFml5DPhMjKfv98GY="
|
| 26 |
}
|
| 27 |
},
|
|
@@ -32,7 +32,7 @@
|
|
| 32 |
"dirty": false
|
| 33 |
},
|
| 34 |
"kernel": {
|
| 35 |
-
"sha": "
|
| 36 |
"dirty": false
|
| 37 |
}
|
| 38 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"name": "metakernel",
|
| 3 |
+
"id": "_metakernel_cuda_917bc5f",
|
| 4 |
"version": 1,
|
| 5 |
"license": "Apache-2.0",
|
| 6 |
"python-depends": [],
|
|
|
|
| 18 |
"digest": {
|
| 19 |
"algorithm": "sha256",
|
| 20 |
"files": {
|
| 21 |
+
"__init__.py": "j+f09TbMQC/dkaD/Ls5Ig7CHJ/yTI1syrDZhJVpz4rA=",
|
| 22 |
+
"_metakernel_cuda_917bc5f.abi3.so": "KepYTU9W3IY7uCuaT+6NJeNHaJkyV/YkZz1pESW0614=",
|
| 23 |
+
"_ops.py": "HaN7LmS0+rYVmkKdGje8u4il8c3tQT0x4w4iwQvC8qY=",
|
| 24 |
+
"_pinned.py": "cRCc88scJyKco8+sKHXkGFaeXl07lvtC4hrfO/gQ1HU=",
|
| 25 |
"metakernel/__init__.py": "DFYPlrhXwYjEqCl/8n0SmWGZV8NFml5DPhMjKfv98GY="
|
| 26 |
}
|
| 27 |
},
|
|
|
|
| 32 |
"dirty": false
|
| 33 |
},
|
| 34 |
"kernel": {
|
| 35 |
+
"sha": "917bc5f20b9abdcd0f8afec590cc2eaa27764e8c",
|
| 36 |
"dirty": false
|
| 37 |
}
|
| 38 |
}
|
build/torch213-cxx11-cu132-x86_64-linux/__init__.py
CHANGED
|
@@ -141,6 +141,49 @@ def _sattolo_ring(n, device, generator=None):
|
|
| 141 |
return ring.to(device)
|
| 142 |
|
| 143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
def probe_device(device="cuda", quick=False):
|
| 145 |
"""Empirical device dossier. Each entry is measured by a dedicated
|
| 146 |
probe kernel and carries units, method, the SM clock it ran under, and
|
|
@@ -157,6 +200,9 @@ def probe_device(device="cuda", quick=False):
|
|
| 157 |
"vram_bytes": props.total_memory,
|
| 158 |
"torch": torch.__version__,
|
| 159 |
"cuda_runtime": torch.version.cuda,
|
|
|
|
|
|
|
|
|
|
| 160 |
}
|
| 161 |
}
|
| 162 |
sink = torch.zeros(2, dtype=torch.float32, device=device)
|
|
@@ -332,8 +378,9 @@ def probe_device(device="cuda", quick=False):
|
|
| 332 |
"register-fragment mma_sync loops (wmma; fp8 and "
|
| 333 |
"2:4-sparse fp16 via inline PTX m16n8k32; sparse "
|
| 334 |
"counted dense-equivalent, the vendor convention); "
|
| 335 |
-
"flops
|
| 336 |
-
"
|
|
|
|
| 337 |
clk, "medium",
|
| 338 |
"dense-tile rate without memory traffic; real "
|
| 339 |
"kernels see this only when staging hides behind it")
|
|
|
|
| 141 |
return ring.to(device)
|
| 142 |
|
| 143 |
|
| 144 |
+
def _smi_settings(index):
|
| 145 |
+
"""ECC mode, driver, and power limit via nvidia-smi; None fields
|
| 146 |
+
when the tool is unavailable."""
|
| 147 |
+
import subprocess
|
| 148 |
+
try:
|
| 149 |
+
out = subprocess.run(
|
| 150 |
+
["nvidia-smi", "-i", str(index),
|
| 151 |
+
"--query-gpu=ecc.mode.current,driver_version,power.limit",
|
| 152 |
+
"--format=csv,noheader,nounits"],
|
| 153 |
+
capture_output=True, text=True, timeout=10)
|
| 154 |
+
parts = [p.strip() for p in out.stdout.strip().split(",")]
|
| 155 |
+
if out.returncode == 0 and len(parts) == 3:
|
| 156 |
+
return {
|
| 157 |
+
"ecc": parts[0],
|
| 158 |
+
"driver": parts[1],
|
| 159 |
+
"power_limit_w": float(parts[2]),
|
| 160 |
+
}
|
| 161 |
+
except (OSError, ValueError, subprocess.TimeoutExpired):
|
| 162 |
+
pass
|
| 163 |
+
return {"ecc": None, "driver": None, "power_limit_w": None}
|
| 164 |
+
|
| 165 |
+
|
| 166 |
+
def mma_tile_check(device="cuda", trials=8):
|
| 167 |
+
"""Random small-integer m16n16k16 tiles through the wmma fragment
|
| 168 |
+
path, compared exactly to the reference GEMM; pins M, N, K, and
|
| 169 |
+
operand mapping (integer operands make fp32 accumulation exact)."""
|
| 170 |
+
worst = 0.0
|
| 171 |
+
for t in range(trials):
|
| 172 |
+
g = torch.Generator(device=device).manual_seed(1000 + t)
|
| 173 |
+
a = torch.randint(-3, 4, (16, 16), device=device,
|
| 174 |
+
generator=g).to(torch.float16)
|
| 175 |
+
b = torch.randint(-3, 4, (16, 16), device=device,
|
| 176 |
+
generator=g).to(torch.float16)
|
| 177 |
+
c = torch.zeros(16, 16, device=device, dtype=torch.float32)
|
| 178 |
+
ops.mk_mma_tile(a.contiguous(), b.t().contiguous(), c)
|
| 179 |
+
_sync()
|
| 180 |
+
ref = a.float() @ b.float()
|
| 181 |
+
if not torch.equal(c, ref):
|
| 182 |
+
worst = max(worst, float((c - ref).abs().max().item()))
|
| 183 |
+
return {"exact": worst == 0.0, "max_abs_error": worst,
|
| 184 |
+
"trials": trials}
|
| 185 |
+
|
| 186 |
+
|
| 187 |
def probe_device(device="cuda", quick=False):
|
| 188 |
"""Empirical device dossier. Each entry is measured by a dedicated
|
| 189 |
probe kernel and carries units, method, the SM clock it ran under, and
|
|
|
|
| 200 |
"vram_bytes": props.total_memory,
|
| 201 |
"torch": torch.__version__,
|
| 202 |
"cuda_runtime": torch.version.cuda,
|
| 203 |
+
# instrument settings: readings depend on them, so the
|
| 204 |
+
# dossier records them (None when nvidia-smi is unavailable)
|
| 205 |
+
**_smi_settings(torch.device(device).index or 0),
|
| 206 |
}
|
| 207 |
}
|
| 208 |
sink = torch.zeros(2, dtype=torch.float32, device=device)
|
|
|
|
| 378 |
"register-fragment mma_sync loops (wmma; fp8 and "
|
| 379 |
"2:4-sparse fp16 via inline PTX m16n8k32; sparse "
|
| 380 |
"counted dense-equivalent, the vendor convention); "
|
| 381 |
+
"flops derive from the mean accumulator read-back "
|
| 382 |
+
"with every fragment element observed, never the "
|
| 383 |
+
"declared loop shape",
|
| 384 |
clk, "medium",
|
| 385 |
"dense-tile rate without memory traffic; real "
|
| 386 |
"kernels see this only when staging hides behind it")
|
build/torch213-cxx11-cu132-x86_64-linux/_metakernel_cuda_1f7e92c.abi3.so
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:66a6ad5e00968d603f637618e95f9da33e961ffc9c45dbba6ab68f41cb4a75ab
|
| 3 |
-
size 1111792
|
|
|
|
|
|
|
|
|
|
|
|
build/torch213-cxx11-cu132-x86_64-linux/_metakernel_cuda_917bc5f.abi3.so
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6efea4765c379bf969504745ec258647b750e5102a67f52d65b75163845adca9
|
| 3 |
+
size 1188488
|
build/torch213-cxx11-cu132-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _metakernel_cuda_917bc5f
|
| 3 |
+
ops = torch.ops._metakernel_cuda_917bc5f
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_metakernel_cuda_917bc5f::{op_name}"
|
build/torch213-cxx11-cu132-x86_64-linux/_pinned.py
CHANGED
|
@@ -209,83 +209,86 @@ PINNED = {
|
|
| 209 |
},
|
| 210 |
"sm89_nvidiartx6000adagenerati": {
|
| 211 |
"atomics_f32": {
|
| 212 |
-
"clock_ghz": 2.
|
| 213 |
"confidence": "high",
|
| 214 |
"method": "atomicAdd hammer; curve sweeps the number of distinct global addresses from 1 (full contention) to one per thread",
|
| 215 |
"units": "Gop/s",
|
| 216 |
"value": {
|
| 217 |
"curve_slots": {
|
| 218 |
-
"1": 0.
|
| 219 |
-
"145408":
|
| 220 |
-
"4096":
|
| 221 |
-
"512": 55.
|
| 222 |
-
"64": 13.
|
| 223 |
-
"8": 5.
|
| 224 |
},
|
| 225 |
-
"shared_same_addr": 12.
|
| 226 |
}
|
| 227 |
},
|
| 228 |
"clock": {
|
| 229 |
"confidence": "high",
|
| 230 |
-
"final_ghz": 2.
|
| 231 |
-
"max_ghz": 2.
|
| 232 |
"method": "24 back-to-back FMA spin windows of 30M ticks; wall/ticks per window",
|
| 233 |
-
"min_ghz": 2.
|
| 234 |
"sag_pct": 0.3,
|
| 235 |
"units": "GHz"
|
| 236 |
},
|
| 237 |
"device": {
|
| 238 |
"cuda_runtime": "12.6",
|
|
|
|
|
|
|
| 239 |
"l2_bytes": 100663296,
|
| 240 |
"name": "NVIDIA RTX 6000 Ada Generation",
|
|
|
|
| 241 |
"sm_arch": "sm89",
|
| 242 |
"sms": 142,
|
| 243 |
"torch": "2.10.0+cu126",
|
| 244 |
"vram_bytes": 48305274880
|
| 245 |
},
|
| 246 |
"dram_bw": {
|
| 247 |
-
"clock_ghz": 2.
|
| 248 |
"confidence": "high",
|
| 249 |
"method": "streaming triad c=a+s*b per access width; read-only fold; write-only fill; random float4 gather (16B granules, nominal traffic)",
|
| 250 |
"note": "gather moves full cache lines per 16B granule, so its nominal number is the achievable rate for random access, not a line-efficiency claim",
|
| 251 |
"units": "GB/s",
|
| 252 |
"value": {
|
| 253 |
-
"random_gather_16B":
|
| 254 |
-
"read_only":
|
| 255 |
-
"triad_16B":
|
| 256 |
-
"triad_4B":
|
| 257 |
-
"triad_8B":
|
| 258 |
-
"write_only":
|
| 259 |
}
|
| 260 |
},
|
| 261 |
"fma_f32": {
|
| 262 |
-
"clock_ghz": 2.
|
| 263 |
"confidence": "high",
|
| 264 |
"method": "register-resident FMA chains",
|
| 265 |
"units": "TFLOP/s",
|
| 266 |
-
"value":
|
| 267 |
},
|
| 268 |
"fma_f64": {
|
| 269 |
-
"clock_ghz": 2.
|
| 270 |
"confidence": "high",
|
| 271 |
"method": "register-resident double FMA chains (the DFMA pipe)",
|
| 272 |
"units": "TFLOP/s",
|
| 273 |
-
"value": 1.
|
| 274 |
},
|
| 275 |
"grid_barrier": {
|
| 276 |
-
"clock_ghz": 2.
|
| 277 |
"confidence": "high",
|
| 278 |
"method": "cooperative kernel, 142 blocks x 256 threads",
|
| 279 |
"units": "us per grid.sync",
|
| 280 |
"value": 0.54
|
| 281 |
},
|
| 282 |
"l2_bw": {
|
| 283 |
-
"clock_ghz": 2.
|
| 284 |
"confidence": "medium",
|
| 285 |
"method": "in-kernel repeated triad passes over 72 MB resident working set",
|
| 286 |
"note": "first pass streams from HBM; amortized over 64 passes",
|
| 287 |
"units": "GB/s",
|
| 288 |
-
"value":
|
| 289 |
},
|
| 290 |
"latency": {
|
| 291 |
"clock_ghz": 2.687,
|
|
@@ -294,37 +297,37 @@ PINNED = {
|
|
| 294 |
"note": "smem includes index arithmetic; HBM includes residual TLB effects at large footprints",
|
| 295 |
"units": "cycles (single-lane dependent loads)",
|
| 296 |
"value": {
|
| 297 |
-
"dram_cycles":
|
| 298 |
-
"l1_cycles": 45.
|
| 299 |
-
"l2_cycles":
|
| 300 |
"ns_per_cycle": 0.372,
|
| 301 |
"smem_cycles": 30.0
|
| 302 |
}
|
| 303 |
},
|
| 304 |
"launch_overhead": {
|
| 305 |
-
"clock_ghz": 2.
|
| 306 |
"confidence": "high",
|
| 307 |
"method": "empty-kernel trains, queued vs launch+sync",
|
| 308 |
"note": "host-dependent: includes torch op dispatch",
|
| 309 |
"units": "us",
|
| 310 |
"value": {
|
| 311 |
-
"queued_us": 5.
|
| 312 |
-
"round_trip_us": 14.
|
| 313 |
}
|
| 314 |
},
|
| 315 |
"mma": {
|
| 316 |
-
"clock_ghz": 2.
|
| 317 |
"confidence": "medium",
|
| 318 |
-
"method": "register-fragment mma_sync loops (wmma; fp8 and 2:4-sparse fp16 via inline PTX m16n8k32; sparse counted dense-equivalent, the vendor convention); flops
|
| 319 |
"note": "dense-tile rate without memory traffic; real kernels see this only when staging hides behind it",
|
| 320 |
"units": "TFLOP/s (TOP/s for int8)",
|
| 321 |
"value": {
|
| 322 |
-
"bf16":
|
| 323 |
-
"fp16":
|
| 324 |
-
"fp16_sparse_2_4":
|
| 325 |
-
"fp8_e4m3":
|
| 326 |
-
"int8":
|
| 327 |
-
"tf32":
|
| 328 |
},
|
| 329 |
"verified_k_lanes": {
|
| 330 |
"bf16": {
|
|
@@ -354,7 +357,7 @@ PINNED = {
|
|
| 354 |
}
|
| 355 |
},
|
| 356 |
"occupancy_blocks_per_sm": {
|
| 357 |
-
"clock_ghz": 2.
|
| 358 |
"confidence": "high",
|
| 359 |
"method": "occupancy API on the float4 triad kernel",
|
| 360 |
"note": "API-derived, not timing-derived",
|
|
@@ -387,49 +390,49 @@ PINNED = {
|
|
| 387 |
}
|
| 388 |
},
|
| 389 |
"occupancy_knees_fma_tflops": {
|
| 390 |
-
"clock_ghz": 2.
|
| 391 |
"confidence": "high",
|
| 392 |
"method": "a single dependent FMA chain per thread, timed at forced (threads, dyn smem) occupancies over fixed total work; throughput is proportional to resident threads until the pipe saturates, so the cliff marks where occupancy stops covering latency",
|
| 393 |
"note": "timing-derived counterpart to the API table above",
|
| 394 |
"units": "TFLOP/s",
|
| 395 |
"value": {
|
| 396 |
"t1024": {
|
| 397 |
-
"0KB":
|
| 398 |
-
"32KB":
|
| 399 |
-
"48KB":
|
| 400 |
},
|
| 401 |
"t128": {
|
| 402 |
-
"0KB":
|
| 403 |
-
"32KB": 60.
|
| 404 |
-
"48KB":
|
| 405 |
},
|
| 406 |
"t256": {
|
| 407 |
-
"0KB":
|
| 408 |
-
"32KB":
|
| 409 |
-
"48KB":
|
| 410 |
}
|
| 411 |
}
|
| 412 |
},
|
| 413 |
"smem_bw": {
|
| 414 |
-
"clock_ghz": 2.
|
| 415 |
"confidence": "medium",
|
| 416 |
"method": "block-resident read+write streaming (8 B per thread-iteration), aggregated across SMs",
|
| 417 |
"note": "bank-conflict-light access pattern; a conflicted pattern can be far lower",
|
| 418 |
"units": "GB/s",
|
| 419 |
-
"value":
|
| 420 |
},
|
| 421 |
"transfer_bw": {
|
| 422 |
-
"clock_ghz": 2.
|
| 423 |
"confidence": "high",
|
| 424 |
"method": "256 MB torch copies, cudaEvent-timed",
|
| 425 |
"note": "pageable numbers include the staging copy; d2d counts one direction of traffic",
|
| 426 |
"units": "GB/s",
|
| 427 |
"value": {
|
| 428 |
-
"d2d":
|
| 429 |
-
"d2h_pageable":
|
| 430 |
-
"d2h_pinned": 26.
|
| 431 |
-
"h2d_pageable":
|
| 432 |
-
"h2d_pinned":
|
| 433 |
}
|
| 434 |
}
|
| 435 |
}
|
|
|
|
| 209 |
},
|
| 210 |
"sm89_nvidiartx6000adagenerati": {
|
| 211 |
"atomics_f32": {
|
| 212 |
+
"clock_ghz": 2.706,
|
| 213 |
"confidence": "high",
|
| 214 |
"method": "atomicAdd hammer; curve sweeps the number of distinct global addresses from 1 (full contention) to one per thread",
|
| 215 |
"units": "Gop/s",
|
| 216 |
"value": {
|
| 217 |
"curve_slots": {
|
| 218 |
+
"1": 0.72,
|
| 219 |
+
"145408": 483.54,
|
| 220 |
+
"4096": 209.84,
|
| 221 |
+
"512": 55.6,
|
| 222 |
+
"64": 13.82,
|
| 223 |
+
"8": 5.77
|
| 224 |
},
|
| 225 |
+
"shared_same_addr": 12.88
|
| 226 |
}
|
| 227 |
},
|
| 228 |
"clock": {
|
| 229 |
"confidence": "high",
|
| 230 |
+
"final_ghz": 2.699,
|
| 231 |
+
"max_ghz": 2.706,
|
| 232 |
"method": "24 back-to-back FMA spin windows of 30M ticks; wall/ticks per window",
|
| 233 |
+
"min_ghz": 2.501,
|
| 234 |
"sag_pct": 0.3,
|
| 235 |
"units": "GHz"
|
| 236 |
},
|
| 237 |
"device": {
|
| 238 |
"cuda_runtime": "12.6",
|
| 239 |
+
"driver": "595.97",
|
| 240 |
+
"ecc": "Enabled",
|
| 241 |
"l2_bytes": 100663296,
|
| 242 |
"name": "NVIDIA RTX 6000 Ada Generation",
|
| 243 |
+
"power_limit_w": 300.0,
|
| 244 |
"sm_arch": "sm89",
|
| 245 |
"sms": 142,
|
| 246 |
"torch": "2.10.0+cu126",
|
| 247 |
"vram_bytes": 48305274880
|
| 248 |
},
|
| 249 |
"dram_bw": {
|
| 250 |
+
"clock_ghz": 2.706,
|
| 251 |
"confidence": "high",
|
| 252 |
"method": "streaming triad c=a+s*b per access width; read-only fold; write-only fill; random float4 gather (16B granules, nominal traffic)",
|
| 253 |
"note": "gather moves full cache lines per 16B granule, so its nominal number is the achievable rate for random access, not a line-efficiency claim",
|
| 254 |
"units": "GB/s",
|
| 255 |
"value": {
|
| 256 |
+
"random_gather_16B": 218.5,
|
| 257 |
+
"read_only": 771.0,
|
| 258 |
+
"triad_16B": 663.1,
|
| 259 |
+
"triad_4B": 638.3,
|
| 260 |
+
"triad_8B": 705.3,
|
| 261 |
+
"write_only": 766.5
|
| 262 |
}
|
| 263 |
},
|
| 264 |
"fma_f32": {
|
| 265 |
+
"clock_ghz": 2.706,
|
| 266 |
"confidence": "high",
|
| 267 |
"method": "register-resident FMA chains",
|
| 268 |
"units": "TFLOP/s",
|
| 269 |
+
"value": 90.85
|
| 270 |
},
|
| 271 |
"fma_f64": {
|
| 272 |
+
"clock_ghz": 2.706,
|
| 273 |
"confidence": "high",
|
| 274 |
"method": "register-resident double FMA chains (the DFMA pipe)",
|
| 275 |
"units": "TFLOP/s",
|
| 276 |
+
"value": 1.282
|
| 277 |
},
|
| 278 |
"grid_barrier": {
|
| 279 |
+
"clock_ghz": 2.706,
|
| 280 |
"confidence": "high",
|
| 281 |
"method": "cooperative kernel, 142 blocks x 256 threads",
|
| 282 |
"units": "us per grid.sync",
|
| 283 |
"value": 0.54
|
| 284 |
},
|
| 285 |
"l2_bw": {
|
| 286 |
+
"clock_ghz": 2.706,
|
| 287 |
"confidence": "medium",
|
| 288 |
"method": "in-kernel repeated triad passes over 72 MB resident working set",
|
| 289 |
"note": "first pass streams from HBM; amortized over 64 passes",
|
| 290 |
"units": "GB/s",
|
| 291 |
+
"value": 9325.3
|
| 292 |
},
|
| 293 |
"latency": {
|
| 294 |
"clock_ghz": 2.687,
|
|
|
|
| 297 |
"note": "smem includes index arithmetic; HBM includes residual TLB effects at large footprints",
|
| 298 |
"units": "cycles (single-lane dependent loads)",
|
| 299 |
"value": {
|
| 300 |
+
"dram_cycles": 649.4,
|
| 301 |
+
"l1_cycles": 45.8,
|
| 302 |
+
"l2_cycles": 291.5,
|
| 303 |
"ns_per_cycle": 0.372,
|
| 304 |
"smem_cycles": 30.0
|
| 305 |
}
|
| 306 |
},
|
| 307 |
"launch_overhead": {
|
| 308 |
+
"clock_ghz": 2.706,
|
| 309 |
"confidence": "high",
|
| 310 |
"method": "empty-kernel trains, queued vs launch+sync",
|
| 311 |
"note": "host-dependent: includes torch op dispatch",
|
| 312 |
"units": "us",
|
| 313 |
"value": {
|
| 314 |
+
"queued_us": 5.55,
|
| 315 |
+
"round_trip_us": 14.1
|
| 316 |
}
|
| 317 |
},
|
| 318 |
"mma": {
|
| 319 |
+
"clock_ghz": 2.706,
|
| 320 |
"confidence": "medium",
|
| 321 |
+
"method": "register-fragment mma_sync loops (wmma; fp8 and 2:4-sparse fp16 via inline PTX m16n8k32; sparse counted dense-equivalent, the vendor convention); flops derive from the mean accumulator read-back with every fragment element observed, never the declared loop shape",
|
| 322 |
"note": "dense-tile rate without memory traffic; real kernels see this only when staging hides behind it",
|
| 323 |
"units": "TFLOP/s (TOP/s for int8)",
|
| 324 |
"value": {
|
| 325 |
+
"bf16": 365.5,
|
| 326 |
+
"fp16": 375.9,
|
| 327 |
+
"fp16_sparse_2_4": 713.4,
|
| 328 |
+
"fp8_e4m3": 193.7,
|
| 329 |
+
"int8": 770.4,
|
| 330 |
+
"tf32": 177.1
|
| 331 |
},
|
| 332 |
"verified_k_lanes": {
|
| 333 |
"bf16": {
|
|
|
|
| 357 |
}
|
| 358 |
},
|
| 359 |
"occupancy_blocks_per_sm": {
|
| 360 |
+
"clock_ghz": 2.706,
|
| 361 |
"confidence": "high",
|
| 362 |
"method": "occupancy API on the float4 triad kernel",
|
| 363 |
"note": "API-derived, not timing-derived",
|
|
|
|
| 390 |
}
|
| 391 |
},
|
| 392 |
"occupancy_knees_fma_tflops": {
|
| 393 |
+
"clock_ghz": 2.706,
|
| 394 |
"confidence": "high",
|
| 395 |
"method": "a single dependent FMA chain per thread, timed at forced (threads, dyn smem) occupancies over fixed total work; throughput is proportional to resident threads until the pipe saturates, so the cliff marks where occupancy stops covering latency",
|
| 396 |
"note": "timing-derived counterpart to the API table above",
|
| 397 |
"units": "TFLOP/s",
|
| 398 |
"value": {
|
| 399 |
"t1024": {
|
| 400 |
+
"0KB": 75.5,
|
| 401 |
+
"32KB": 73.66,
|
| 402 |
+
"48KB": 74.95
|
| 403 |
},
|
| 404 |
"t128": {
|
| 405 |
+
"0KB": 79.86,
|
| 406 |
+
"32KB": 60.31,
|
| 407 |
+
"48KB": 44.57
|
| 408 |
},
|
| 409 |
"t256": {
|
| 410 |
+
"0KB": 81.69,
|
| 411 |
+
"32KB": 79.48,
|
| 412 |
+
"48KB": 71.47
|
| 413 |
}
|
| 414 |
}
|
| 415 |
},
|
| 416 |
"smem_bw": {
|
| 417 |
+
"clock_ghz": 2.706,
|
| 418 |
"confidence": "medium",
|
| 419 |
"method": "block-resident read+write streaming (8 B per thread-iteration), aggregated across SMs",
|
| 420 |
"note": "bank-conflict-light access pattern; a conflicted pattern can be far lower",
|
| 421 |
"units": "GB/s",
|
| 422 |
+
"value": 21250.0
|
| 423 |
},
|
| 424 |
"transfer_bw": {
|
| 425 |
+
"clock_ghz": 2.706,
|
| 426 |
"confidence": "high",
|
| 427 |
"method": "256 MB torch copies, cudaEvent-timed",
|
| 428 |
"note": "pageable numbers include the staging copy; d2d counts one direction of traffic",
|
| 429 |
"units": "GB/s",
|
| 430 |
"value": {
|
| 431 |
+
"d2d": 330.7,
|
| 432 |
+
"d2h_pageable": 15.6,
|
| 433 |
+
"d2h_pinned": 26.2,
|
| 434 |
+
"h2d_pageable": 16.6,
|
| 435 |
+
"h2d_pinned": 24.0
|
| 436 |
}
|
| 437 |
}
|
| 438 |
}
|
build/torch213-cxx11-cu132-x86_64-linux/metadata.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"name": "metakernel",
|
| 3 |
-
"id": "
|
| 4 |
"version": 1,
|
| 5 |
"license": "Apache-2.0",
|
| 6 |
"python-depends": [],
|
|
@@ -18,10 +18,10 @@
|
|
| 18 |
"digest": {
|
| 19 |
"algorithm": "sha256",
|
| 20 |
"files": {
|
| 21 |
-
"__init__.py": "
|
| 22 |
-
"
|
| 23 |
-
"_ops.py": "
|
| 24 |
-
"_pinned.py": "
|
| 25 |
"metakernel/__init__.py": "DFYPlrhXwYjEqCl/8n0SmWGZV8NFml5DPhMjKfv98GY="
|
| 26 |
}
|
| 27 |
},
|
|
@@ -32,7 +32,7 @@
|
|
| 32 |
"dirty": false
|
| 33 |
},
|
| 34 |
"kernel": {
|
| 35 |
-
"sha": "
|
| 36 |
"dirty": false
|
| 37 |
}
|
| 38 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"name": "metakernel",
|
| 3 |
+
"id": "_metakernel_cuda_917bc5f",
|
| 4 |
"version": 1,
|
| 5 |
"license": "Apache-2.0",
|
| 6 |
"python-depends": [],
|
|
|
|
| 18 |
"digest": {
|
| 19 |
"algorithm": "sha256",
|
| 20 |
"files": {
|
| 21 |
+
"__init__.py": "j+f09TbMQC/dkaD/Ls5Ig7CHJ/yTI1syrDZhJVpz4rA=",
|
| 22 |
+
"_metakernel_cuda_917bc5f.abi3.so": "bv6kdlw3m/lpUEdF7CWGR7dQ5RAqZ/UtZbdRY4Ra3Kk=",
|
| 23 |
+
"_ops.py": "HaN7LmS0+rYVmkKdGje8u4il8c3tQT0x4w4iwQvC8qY=",
|
| 24 |
+
"_pinned.py": "cRCc88scJyKco8+sKHXkGFaeXl07lvtC4hrfO/gQ1HU=",
|
| 25 |
"metakernel/__init__.py": "DFYPlrhXwYjEqCl/8n0SmWGZV8NFml5DPhMjKfv98GY="
|
| 26 |
}
|
| 27 |
},
|
|
|
|
| 32 |
"dirty": false
|
| 33 |
},
|
| 34 |
"kernel": {
|
| 35 |
+
"sha": "917bc5f20b9abdcd0f8afec590cc2eaa27764e8c",
|
| 36 |
"dirty": false
|
| 37 |
}
|
| 38 |
}
|