fn main() {
    println("=== GPU MATMUL VERIFICATION ===")

    // Small test we can verify by hand
    let a = tensor(1.0, 2.0, 3.0, 4.0)
    let a = t_reshape(a, 2, 2)
    let b = tensor(5.0, 6.0, 7.0, 8.0)
    let b = t_reshape(b, 2, 2)

    // Expected: [[1*5+2*7, 1*6+2*8], [3*5+4*7, 3*6+4*8]] = [[19, 22], [43, 50]]
    let c = matmul(a, b)
    println("matmul result: " + c)
    println("Expected: [[19, 22], [43, 50]]")

    // Now test with Silkie-sized tensors
    let n = load_model("examples/silkie_full.safetensors")
    println("Loaded " + n + " tensors")
    let embed = model_get("token_embedding.weight")
    println("Embedding shape: " + embed)

    // Do a forward pass matmul
    let x = t_randn(1, 512)
    let w = model_get("layers.0.attention.in_proj_weight")
    let result = matmul(x, transpose(w))
    let s = tensor_sum(result)
    println("Forward matmul sum: " + s)
    println("=== DONE ===")
}
