Week 5 — Coding Projects

Core

Compute norms and simulate basic probability experiments.

  • NumPy: Simulate dice and coin experiments. Implement L¹, L², and L^∞ norms manually. Plot empirical probability convergence.
  • Metal: Row-wise norm kernel over a large matrix. Optionally count threshold events in parallel. · Reading: MBT — compute buffer processing, reductions or batched compute foundations.
  • Vulkan: Compute shader for row norms. · Reading: Vulkan Book — compute buffer iteration, workgroup sizing, storage buffer patterns.
  • CUDA: Batched norm kernel. · Reading: CUDA Book — reduction-adjacent compute kernels, efficient memory access.
  • Stretch: Histogram of norms in high dimension. Add histogram generation.
  • Verify: GPU norm results match CPU · Empirical frequencies stabilize with larger N.