ziadmubarak/cuda-matrix-multiplication-study ? reverse-engineered prompt
Reverse engineered prompt
Build me a CUDA matrix multiplication study that compares a simple CPU version, a basic GPU version, a shared memory tiled GPU version, and a cuBLAS version.
I want it to multiply square matrices, verify that all versions return the same result, and print clear timing and speedup numbers so I can see how each approach performs. Use an all ones test case so the correct output is easy to check, and include a small benchmark result image or simple chart if that’s straightforward. Keep the code easy to read, because the point is to understand why the tiled version is faster than the naive one, and how much faster cuBLAS is than both. If you need to look up current CUDA or cuBLAS docs online, go ahead.
Make it build cleanly on a machine with CUDA installed, and keep the code organized so each version is in its own file or clearly separated.
Are you gonna build this?
make sure you review the code using coderabbit