Part 3: Accelerating Calculations using GPU
dev.to·5d·
Discuss: DEV
🚀Performance
Preview
Report Post

The success of the logistic regression gave me a confidence boost, but the program’s performance felt like a punch to the gut. The naive matrix multiplication module was taking forever to complete even on a small dataset like (321 * 6). No programmer enjoys staring at the console for the program to finish its execution.

I have a CUDA-enabled GPU sitting in my machine gathering dust. I had avoided configuring it for development for two years out of sheer laziness. But, to scale up I had to conquer my laziness. I had to make my GPU perform the heavy math.

I spent some time searching alternatives. Many search results pointed to ndarray, a high-performance rust library to work with multi-dimensional arrays. It’s a great library, but using it out of the box felt like cheating, l…

Similar Posts

Loading similar posts...