anonymous-gpu-kernel / CORPUS_AUDIT.md
anonymous-gpu-kernel's picture
Upload folder using huggingface_hub
9d6280b verified
|
Raw
History Blame Contribute Delete
4.72 kB

Corpus Audit

This document summarizes the composition of the anonymized artifact preview: source datasets, per-subset sample counts, difficulty distribution, and operator coverage. All counts below are taken directly from the release statistics files in this repository (v0.2/**/*statistics*.json) unless otherwise noted.

Overall, the released sample counts are consistent with the paper. The HIP/ROCm subsets match Table 1 exactly (64,530 total), and the Triton corpus matches at the unique-sample scale (~40K, vs. the paper's 39,893).

1. Corpus totals

HIP / ROCm

Subset Local path Samples
HIP-CudaAgent v0.2/pytorch_hip_kernel_cuda_agent_ops_6k/ 5,388
HIP-GPUMode v0.2/pytorch_hip_kernel_gpumode/ 5,910 entries / 22,397 HIP kernel variants
HIP2HIP (Optimization) v0.2/hip-to-hip/ 34,368
ROCm Libraries QA v0.2/rocm-libraries/ 2,377
Total HIP/ROCm 64,530

The HIP/ROCm total counts HIP-GPUMode by its 22,397 HIP kernel variants: 5,388 + 22,397 + 34,368 + 2,377 = 64,530. Note that HIP-GPUMode is 5,910 unique PyTorch entries; the 22,397 figure counts all generated HIP kernel variants (avg ≈ 3.8 variants/entry). The v0.2 JSON inlines 20,190 answer_code variants; the remaining variant files are available in the v0.1 hip_opt.tar archive.

Triton

Subset-level counts as released (Triton corpus):

Subset Samples
Triton-Stack 2,269
Triton-Bench (from TritonBench-8k) 7,713
Triton-GPUMode 18,000
Triton-AICE 11,911
Total Triton 39,893

Counting note. The Triton counts are consistent with the paper (Table 1: 39,893) and the public dataset card ("~40,000+" across AICE, Stack v2, TBG, and CUDA-Engg). The files are packaged with reasoning ("thinking") and task-framing variants, so a raw row count is larger than the unique-sample count while describing the same ~40K corpus. The per-subset source labels and a few packaging details are still being organized in this preview and will be finalized in the full release.

2. Difficulty distribution (L1 / L2 / L3)

Difficulty levels follow a three-tier scheme: L1 standalone single-function kernels, L2 fused operators or single-file implementations, L3 multi-file kernels with cross-module dependencies.

HIP-CudaAgent (5,388)

Level Count
L1 4,741
L2 421
L3 226

HIP-GPUMode (5,910 entries)

Level Count
L1 935
L2 455
L3 4,520

Speedup distribution (per statistics file): min 0.0025, median 5.29, avg 8.28, max 95.68.

HIP2HIP (34,368)

HIP2HIP is an optimization (HIP -> HIP) subset built on HIP-GPUMode, containing 34,368 kernel-optimization pairs. Per-entry difficulty labels are still being organized for the full release.

ROCm Libraries QA (2,377)

Sub-source L1 L2 L3 kernel_impl qa_explanation Total
rocblas_v1 571 265 203 540 499 1,039
rocblas_v2 400 241 178 629 190 819
rocsolver_v1 190 198 131 226 293 519
Total 1,161 704 512 1,395 982 2,377

Aggregated by library: rocBLAS (v1+v2) = 1,858 entries (L1 971 / L2 506 / L3 381); rocSOLVER = 519 entries (L1 190 / L2 198 / L3 131).

Triton (representative)

Level Count
L1 4,865
L2 1,268
L3 1,681

Difficulty labels are shown for a representative portion of the Triton corpus; the full per-subset difficulty labels are still being organized for the full release.

3. Operator coverage

  • rocBLAS: BLAS L1–L3 operations — asum, axpy, copy, dot, nrm2, scal, swap, gemv, ger, symv, syr, trmv, trsv, gemm, symm, syrk, syr2k, trmm, trsm, and more (see rocblas_v*_statistics.json for full histograms).
  • rocSOLVER: LAPACK factorizations/solvers/eigen/SVD — geqrf, gerqf, geqlf, getrf, potrf, gesv, posv, getrs, syev/heev, gesvd, gebrd, and more.
  • HIP (PyTorch-derived): NN modules and ops — activations (GELU, ReLU, Sigmoid, Softmax), losses (CrossEntropy, MSE, Focal, Triplet), layers (Linear, Conv, BatchNorm, LayerNorm, Attention), and fused operator compositions.
  • Triton: element-wise, reductions (sum/mean/max/softmax), GEMM, normalization, attention, convolution, and fused kernels.

4. Reproducing this audit

python3 - <<'PY'
import json, glob, os
for f in sorted(glob.glob("v0.2/**/*statistics*.json", recursive=True)):
    print("==", f)
    print(json.dumps(json.load(open(f)), indent=2)[:800])
PY