r/CUDA • u/NoVibeCoding • 15h ago
Hackathon: Implement PTX Compiler
We're running a hackathon to build a simplified PTX compiler running from October 21st to October 27th, 2026.
The goal is to generate efficient PTX from an internal kernel representation. The parser is provided, so you don't need to implement the full CUDA compiler frontend, and you don't need to find an efficient schedule. The goal is to generate efficient PTX code to run the program.
Here is an example of IR for RMSNorm:
Tile[a0, a1_co] (N=8192)
for a1 in a1_co..1024:128
in2 = load x[a0, a1]
f32 v1 = multiply(in2, in2)
f32 acc0 <- add(acc0, v1)
WarpShuffle(acc0, length=32)
Smem float acc0_smem[4]
if ((lane == 0)):
acc0_smem[warp] = acc0
Sync
TreeHalve(acc0, length=4, tid=warp)
in1 = load mean_count[0]
f32 v0 = reciprocal(in1)
f32 v2 = multiply(acc0, v0)
in0 = load add_c1[0]
f32 v3 = add(in0, v2)
f32 v4 = sqrt(v3)
f32 v5 = reciprocal(v4)
for a2 in a1_co..1024:128
in3 = load x[a0, a2]
f32 v6 = multiply(in3, v5)
in4 = load w[a2]
f32 v7 = multiply(in4, v6)
mul_1[a0, a2] = v7 Tile[a0, a1_co] (N=8192)
for a1 in a1_co..1024:128
in2 = load x[a0, a1]
f32 v1 = multiply(in2, in2)
f32 acc0 <- add(acc0, v1)
WarpShuffle(acc0, length=32)
Smem float acc0_smem[4]
if ((lane == 0)):
acc0_smem[warp] = acc0
Sync
TreeHalve(acc0, length=4, tid=warp)
in1 = load mean_count[0]
f32 v0 = reciprocal(in1)
f32 v2 = multiply(acc0, v0)
in0 = load add_c1[0]
f32 v3 = add(in0, v2)
f32 v4 = sqrt(v3)
f32 v5 = reciprocal(v4)
for a2 in a1_co..1024:128
in3 = load x[a0, a2]
f32 v6 = multiply(in3, v5)
in4 = load w[a2]
f32 v7 = multiply(in4, v6)
mul_1[a0, a2] = v7
The prize pool is $ 2,750, and we offer internship opportunities to participants with interesting submissions.
Info: https://riftstack.ai/hackathon
Intro lectures:




