I have done two libraries for AI,
They are optimized and work properly. However, there are significant differences in performance.
The GPU library can adapt to other Nvidia graphic card and furthermore improve the time that I obtain within my circumstances. In addition, the graphics card industry is constantly improving their models and we have recently seen the clusters of the graphics card in the business.
The CPU library is stable and can work on any computer because it does not rely on Nvidia hardware, it is a completely cross-platform library that only needs Eigen library which is compatible with every OS.
I have used for the test: i7-7700k vs Nvidia GeForce GTX 1070
CPU | GPU | |
Cores/Threads | 4/8 | 1920 |
Clock rate (GHz) | 3.6 | 1.7 |
Performance
The GPU performance better than the CPU, by making big batches, the difference being most extreme. The graphics card is between 2X and 100X faster than the CPU
Batch size | Time GPU | Time CPU |
8 | 94.66 | 193.71 |
16 | 45.66 | 198.05 |
32 | 22.75 | 191.92 |
64 | 11.79 | 192.51 |
128 | 6.24 | 189.88 |
256 | 3.9 | 197.03 |
512 | 2.44 | 195.43 |
1024 | 1.55 | 190.23 |