CoolFace
Datasetpublic

GPUMODE/kernelbot-data

KernelBot Competition Data This dataset contains GPU kernel submissions from the KernelBot competition platform. Submissions are optimized GPU kernels written for specific hardware targets. Data Files AMD MI300 Submissions File Description submissions.parquet All AMD competition submissions successful_submissions.parquet AMD submissions that passed correctness tests deduplicated_submissions.parquet AMD submissions deduplicated by… See the full description on the dataset page: https://huggingface.co/datasets/GPUMODE/kernelbot-data.

sourceHugging Faceotherupdated 2mo agoView on Hugging Face
49likes1.4kdownloads
queries.sql131 linesDownload Raw Back to root
1-- Kernelbot Database Queries2-- All queries are READ ONLY. Never run INSERT/UPDATE/DELETE on production.3-- Scores are execution time in seconds. Lower is better.4 5--------------------------------------------------------------------------------6-- LIST ALL PROBLEMS7--------------------------------------------------------------------------------8SELECT9    l.id,10    l.name,11    l.deadline,12    l.description,13    array_agg(g.gpu_type) as gpu_types14FROM leaderboard.leaderboard l15LEFT JOIN leaderboard.gpu_type g ON l.id = g.leaderboard_id16GROUP BY l.id, l.name, l.deadline, l.description17ORDER BY l.id;18 19--------------------------------------------------------------------------------20-- PROBLEM IDS21--------------------------------------------------------------------------------22-- NVFP4: 595 (gemv), 597 (gemm), 598 (dual_gemm), 697 (modal_dual_gemm), 730 (group_gemm)23-- AMD: 398 (identity), 399 (fp8-mm), 430 (moe), 463 (mla-decode),24--      563 (all2all), 564 (gemm-rs), 565 (ag-gemm), 763 (mxfp4-mm),25--      764 (moe-mxfp4), 765 (mixed-mla)26-- Separate mixed-GPU export: 496 (trimul)27-- Released Helion/B200_Nebius export: 766 (causal_conv1d), 767 (fp8_quant),28--      768 (gated_deltanet_chunk_fwd_h), 769 (gated_deltanet_chunk_fwd_o),29--      770 (gated_deltanet_recompute_w_u)30-- Linear algebra export: 774 (qr_v2), 775 (eigh), 776 (cholesky)31 32--------------------------------------------------------------------------------33-- CHECK SUBMISSION COUNTS FOR A PROBLEM34--------------------------------------------------------------------------------35SELECT36    COUNT(*) as total_submissions,37    COUNT(DISTINCT user_id) as unique_users38FROM leaderboard.submission39WHERE leaderboard_id = 595;  -- Replace with problem ID40 41--------------------------------------------------------------------------------42-- EXPORT DEDUPLICATED SUBMISSIONS WITH CODE43-- Deduplicates by (user_id, code_id), keeping the fastest score44--------------------------------------------------------------------------------45WITH ranked AS (46    SELECT47        s.id as submission_id,48        s.leaderboard_id,49        l.name as problem_name,50        s.user_id,51        u.user_name,52        s.code_id,53        s.file_name,54        s.submission_time,55        s.status,56        r.score,57        r.passed,58        r.mode,59        r.runner,60        COALESCE(c.old_code, convert_from(c.code, 'UTF8')) as code,61        ROW_NUMBER() OVER (62            PARTITION BY s.leaderboard_id, s.user_id, s.code_id63            ORDER BY r.score ASC NULLS LAST64        ) as rn65    FROM leaderboard.submission s66    JOIN leaderboard.leaderboard l ON s.leaderboard_id = l.id67    LEFT JOIN leaderboard.user_info u ON s.user_id = u.id68    LEFT JOIN leaderboard.runs r ON s.id = r.submission_id AND r.mode = 'leaderboard'69    LEFT JOIN leaderboard.code_files c ON s.code_id = c.id70    WHERE s.leaderboard_id IN (595, 597, 598)  -- Replace with problem IDs71)72SELECT73    submission_id, leaderboard_id, problem_name, user_id, user_name,74    code_id, file_name, submission_time, status, score, passed, mode, runner, code75FROM ranked76WHERE rn = 177ORDER BY problem_name, score ASC NULLS LAST;78 79--------------------------------------------------------------------------------80-- CHECK RUN MODES AND SCORES81--------------------------------------------------------------------------------82SELECT83    r.mode,84    COUNT(*) as cnt,85    COUNT(r.score) as has_score,86    MIN(r.score) as min_score,87    MAX(r.score) as max_score88FROM leaderboard.runs r89JOIN leaderboard.submission s ON r.submission_id = s.id90WHERE s.leaderboard_id IN (595, 597, 598)91GROUP BY r.mode92ORDER BY cnt DESC;93 94--------------------------------------------------------------------------------95-- GET TOP N SUBMISSIONS FOR A PROBLEM96--------------------------------------------------------------------------------97SELECT98    u.user_name,99    r.score,100    s.submission_time101FROM leaderboard.submission s102JOIN leaderboard.runs r ON s.id = r.submission_id AND r.mode = 'leaderboard'103LEFT JOIN leaderboard.user_info u ON s.user_id = u.id104WHERE s.leaderboard_id = 595  -- Replace with problem ID105  AND r.passed = true106  AND r.score IS NOT NULL107ORDER BY r.score ASC108LIMIT 20;109 110--------------------------------------------------------------------------------111-- GET USER'S SUBMISSIONS OVER TIME (progression)112--------------------------------------------------------------------------------113SELECT114    s.submission_time,115    r.score,116    r.passed117FROM leaderboard.submission s118JOIN leaderboard.runs r ON s.id = r.submission_id AND r.mode = 'leaderboard'119JOIN leaderboard.user_info u ON s.user_id = u.id120WHERE u.user_name = 'gau.nernst'  -- Replace with username121  AND s.leaderboard_id = 595  -- Replace with problem ID122ORDER BY s.submission_time ASC;123 124--------------------------------------------------------------------------------125-- GET CODE FOR A SPECIFIC SUBMISSION126--------------------------------------------------------------------------------127SELECT128    COALESCE(c.old_code, convert_from(c.code, 'UTF8')) as code129FROM leaderboard.code_files c130WHERE c.id = 79741;  -- Replace with code_id131