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.sql125 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), 730 (group_gemm)23-- AMD: 398 (identity), 399 (fp8-mm), 430 (moe), 463 (mla-decode),24--      563 (all2all), 564 (gemm-rs), 565 (ag-gemm)25 26--------------------------------------------------------------------------------27-- CHECK SUBMISSION COUNTS FOR A PROBLEM28--------------------------------------------------------------------------------29SELECT30    COUNT(*) as total_submissions,31    COUNT(DISTINCT user_id) as unique_users32FROM leaderboard.submission33WHERE leaderboard_id = 595;  -- Replace with problem ID34 35--------------------------------------------------------------------------------36-- EXPORT DEDUPLICATED SUBMISSIONS WITH CODE37-- Deduplicates by (user_id, code_id), keeping the fastest score38--------------------------------------------------------------------------------39WITH ranked AS (40    SELECT41        s.id as submission_id,42        s.leaderboard_id,43        l.name as problem_name,44        s.user_id,45        u.user_name,46        s.code_id,47        s.file_name,48        s.submission_time,49        s.status,50        r.score,51        r.passed,52        r.mode,53        r.runner,54        COALESCE(c.old_code, convert_from(c.code, 'UTF8')) as code,55        ROW_NUMBER() OVER (56            PARTITION BY s.leaderboard_id, s.user_id, s.code_id57            ORDER BY r.score ASC NULLS LAST58        ) as rn59    FROM leaderboard.submission s60    JOIN leaderboard.leaderboard l ON s.leaderboard_id = l.id61    LEFT JOIN leaderboard.user_info u ON s.user_id = u.id62    LEFT JOIN leaderboard.runs r ON s.id = r.submission_id AND r.mode = 'leaderboard'63    LEFT JOIN leaderboard.code_files c ON s.code_id = c.id64    WHERE s.leaderboard_id IN (595, 597, 598)  -- Replace with problem IDs65)66SELECT67    submission_id, leaderboard_id, problem_name, user_id, user_name,68    code_id, file_name, submission_time, status, score, passed, mode, runner, code69FROM ranked70WHERE rn = 171ORDER BY problem_name, score ASC NULLS LAST;72 73--------------------------------------------------------------------------------74-- CHECK RUN MODES AND SCORES75--------------------------------------------------------------------------------76SELECT77    r.mode,78    COUNT(*) as cnt,79    COUNT(r.score) as has_score,80    MIN(r.score) as min_score,81    MAX(r.score) as max_score82FROM leaderboard.runs r83JOIN leaderboard.submission s ON r.submission_id = s.id84WHERE s.leaderboard_id IN (595, 597, 598)85GROUP BY r.mode86ORDER BY cnt DESC;87 88--------------------------------------------------------------------------------89-- GET TOP N SUBMISSIONS FOR A PROBLEM90--------------------------------------------------------------------------------91SELECT92    u.user_name,93    r.score,94    s.submission_time95FROM leaderboard.submission s96JOIN leaderboard.runs r ON s.id = r.submission_id AND r.mode = 'leaderboard'97LEFT JOIN leaderboard.user_info u ON s.user_id = u.id98WHERE s.leaderboard_id = 595  -- Replace with problem ID99  AND r.passed = true100  AND r.score IS NOT NULL101ORDER BY r.score ASC102LIMIT 20;103 104--------------------------------------------------------------------------------105-- GET USER'S SUBMISSIONS OVER TIME (progression)106--------------------------------------------------------------------------------107SELECT108    s.submission_time,109    r.score,110    r.passed111FROM leaderboard.submission s112JOIN leaderboard.runs r ON s.id = r.submission_id AND r.mode = 'leaderboard'113JOIN leaderboard.user_info u ON s.user_id = u.id114WHERE u.user_name = 'gau.nernst'  -- Replace with username115  AND s.leaderboard_id = 595  -- Replace with problem ID116ORDER BY s.submission_time ASC;117 118--------------------------------------------------------------------------------119-- GET CODE FOR A SPECIFIC SUBMISSION120--------------------------------------------------------------------------------121SELECT122    COALESCE(c.old_code, convert_from(c.code, 'UTF8')) as code123FROM leaderboard.code_files c124WHERE c.id = 79741;  -- Replace with code_id125