Week 1 — Coding Projects

Core

Build vector math primitives and a first “hello GPU” buffer pipeline.

  • NumPy: Implement vector add, scalar multiply, dot product, and L2 norm. Verify distributive and scalar laws numerically. Store vertices of a triangle as arrays.
  • Metal: Render a triangle and write one compute kernel for vector addition. · Reading: MBT — app setup, Metal device/command queue, buffers, first render pipeline, first compute pipeline.
  • Vulkan: Render a triangle and create a vertex buffer with triangle data uploaded. · Reading: Vulkan Book — project setup, instance/device/swapchain basics, first graphics pipeline, vertex buffers.
  • CUDA: Write a vector-add kernel, launch over a 1D array, and verify against CPU. · Reading: CUDA Book — CUDA execution model, kernel launch basics, memory copies, thread/block indexing.
  • Stretch: Batched vector add for shape (N, D).
  • Verify: Triangle renders · GPU vector add matches CPU exactly for simple inputs.