Saturday, 16 December 2023

cuDNN and TensorFlow performance

 Speed testing cuDNN and TensorFlow versions


I have noticed an increase in recommendations to use newer versions of cuDNN and TensorFlow instead of those linked in my tutorial - usually claiming the older versions to be the reason for someone failing to get the GPU working in PixInsight.

The current version for cuDNN is 8.9.7, and my tutorial recommends 8.7.0. The only difference in hardware support is cuDNN 8.9.7 dropping support for Kepler GPUs and CUDA Compute Capability 3.5. All the more recent GPUs are supported by both.

TensorFlow's latest native Windows version is 2.10.0, and my tutorial uses 2.9.0. No difference in hardware compatibility. Both are also built on a very old 8.1 version of cuDNN.

So no, updating to a newer version does not magically make GPU acceleration work. If someone only got it working by using a different version, then they either had a corrupted file in their previous attempt or they first failed to follow the instructions and read them more carefully later.

One thing that will change, though, is the performance.
I have done countless tests using different versions before and after creating the tutorial. For this post I ran another set of tests with PixInsight and the processes updated to the latest versions. The results are rounded to one decimal to make them easier to read.

StarNet2: pretty much the same performance across the board.
StarXterminator: 30% difference from the fastest to the slowest!
NoiseXterminator: about 10% in favor of TensorFlow 2.9.0.
BlurXterminator: a surprise win for  8.9.7+2.10.0 - 5% faster than the slowest of the four.

Based on these findings, I will not change the links in my tutorial.
Of course this test shows only one system and one image, but the results are similar to my previous tests with other systems and images.
I encourage everyone to run comparison tests on their own system to determine the best combination.