From b849ec01a1256414b570591862c944f608f90cb4 Mon Sep 17 00:00:00 2001 From: vasilij_t <50655377+h3artful@users.noreply.github.com> Date: Sat, 28 Nov 2026 15:41:12 +0100 Subject: [PATCH] (test) first commit w/ access token --- lec5/vasilijt-lab5/README-lab5-eng.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 lec5/vasilijt-lab5/README-lab5-eng.md diff --git a/lec5/vasilijt-lab5/README-lab5-eng.md b/lec5/vasilijt-lab5/README-lab5-eng.md new file mode 100644 index 0000000..cf7e5ac --- /dev/null +++ b/lec5/vasilijt-lab5/README-lab5-eng.md @@ -0,0 +1,9 @@ +## Independent Practice + +**Assignment** (≈60 minutes) + +1. Implement SAXPY in CuPy for `N` ranging from `10³` to `10⁸`. Measure kernel execution time and host↔device transfer time separately. Find the smallest `N` at which the GPU is faster. +2. Perform one stencil update in three ways: with CuPy slicing, with a custom kernel (`numba-cuda` or CuPy’s `RawKernel`), and with PyTorch tensors. Verify that all three results match the NumPy reference. +3. Compare block sizes of 16 × 16, 32 × 8, and 8 × 32. Choose the best-performing size and explain the differences in terms of memory access coalescing. +4. Fill in the “One Task, Five Implementations” table for NumPy, Numba `prange`, CuPy, a custom kernel, and PyTorch. Record the execution time, speedup, implementation effort, and limitations for each. +5. Keep an optimization log with at least two iterations. Use the sequence “hypothesis → change → measurement → conclusion” for each iteration. \ No newline at end of file