Up-to-date instructions for enabling GPU acceleration

No, CUDA is a platform and programming interface (API) developed by NVIDIA and works only with their GPUs.

Cheers
Tom
 
All instructions for Pixinsight CUDA acceleration I've seen are too old to cover the latest generation of GPUs, so I wrote a tutorial. This should work on anything from GTX900 to RTX4000-series.

Even if you already got it to work using an older version of CUDA, it's a worthwhile update that will give a hefty speed boost with some GPUs.

https://rikutalvio.blogspot.com/2023/02/pixinsight-cuda.html
Thanks for your efforts - works well with the BXT,SXT and NXT tools, but….
…… since I`ve activated the GPU via CUDA, there are Image Registration issues, seems that StarAllignment in this process doesńt work well anymore ….. differences up to 30 Pixels in the registrated images (all work done with WBBP 2.5.9 in standard configuration) - checked it with older data, same bad results with the registrated images.

Anyone here who gets the same bad results, especially with longer focal length and resolution < 1arcs/px?
Any other idea what could be wrong?

Thanks an CS
 
Ablenkungsmanöver (leading you in the wrong direction).
Thanks, so any other idea what could be wrong in the registration process?

My WFL with my OSC:
WBPP: Integration of the 3 sep. RGB channels (Cal with Flats, Darkflats, Darks), CC, Debayer, Reg., LN)
Using the registrated Images (XDRZ,XNML) for Drizzle Integration: scale 1, shrink 0.9, Enable CFA drizzle
Afterwards Channel Combination of the 3 integrated channels to an RGB - works fine since I blinked my last registrated images of M106 one week ago, that were not proper star alligned (detected by unregular star shapes in the integrated image)

Thanks an CS
 
I followed the instructions and was rewarded with at Windows 10 system running StarXTerminator and BlurXTerminator much more rapidly than before. A big win. Thanks for researching and sharing it.

However, I normally use the other boot on this box (Kubuntu 22.04) for my PI processing. I have yet to succeed in getting CUDA acceleration to work there. I'm still hoping to find a similar document for Linux that points out the "gotchas" like this one does for windows...

Today I succeeded in getting the XTerminator family processes using my Nvidia GPU (GeForce RTX 3050). Definitely speeds thing up and means I don't have to flip back to Windows to run them.

Essentially I started by removing (purging, deleting, etc) the existing Nvidia drivers, Cuda, CuDNN, and Tensorflow components existing on my Linux system from previous failed attempts. Starting with installing an older Nvidia driver (470.161.03) instead of the current one and selecting the other components based on what Tensorflow 2.9.0 is reported to support, Cuda 11.2 and CuDNN 8.7.0.

By following a few different descriptions (Linux and Windows, here and on CN) and much searching online I succeeded in beating down the various issues I was having. Being a trial and error Linux user I learned a goodly number of little details today that I will likely have forgotten by tomorrow. (I don't feel sufficiently clued-in to write a how-to, but will say by following what others wrote I was able to piece things together.)

My system is an AMD Ryzen 9 5900X with 64GiB with the RTX 3050 GPU running Kubuntu 22.04.2 LTS (which beats the pants off the old MacBook Pro I was using (2016) until last fall.)
 
Today I succeeded in getting the XTerminator family processes using my Nvidia GPU (GeForce RTX 3050). Definitely speeds thing up and means I don't have to flip back to Windows to run them.

Essentially I started by removing (purging, deleting, etc) the existing Nvidia drivers, Cuda, CuDNN, and Tensorflow components existing on my Linux system from previous failed attempts. Starting with installing an older Nvidia driver (470.161.03) instead of the current one and selecting the other components based on what Tensorflow 2.9.0 is reported to support, Cuda 11.2 and CuDNN 8.7.0.
I also finally got it working with Ubuntu 22.04 today, but I managed to keep using the latest NVIDIA drivers (version 525, which are shipped with Ubuntu).

The trick was to install CUDA 11.8 using the "runfile" option (rather than downloading dpkgs), and then install libcudnn from the NVIDIA developer site using a trick where the deb packages are extracted from the downloaded file and installed individually. These two steps are explained in detail here:

The final step is then based on this post (just the steps starting with "Installed libtensorflow-gpu"):

Works great with all the Xterminators! And I'm sure the speedup will be worth the many hours it took me to figure this out.
 
@RT--
Thanks a bunch RT.
Received my GTX 1660 Ti yesterday and installed it last night.
I looked at many instruction sets and yours looked like the smoothest.
Well, it was. Smooth as it gets. Took no time with no issues at all.
StarXTerminator times went from 4+ minutes to 14-15 seconds.
Thanks a bunch!

Jim
 
Last edited:
@RT--
Thanks a bunch RT.
Received my GTX 1660 Ti yesterday and installed it last night.
I looked at many instruction sets and yours looked like the smoothest.
Well, it was. Smooth as it gets. Took no time with no issues at all.
StarXTerminator times went from 4+ minutes to 14-15 seconds.
Thanks a bunch!

Jim
Nice to hear things working as intended. 🙂
 
Near perfect instructions. The only hiccup I had was in step 2. After selecting the Options, and clicking Next button, the window left my view. Only after starting step 3 and noticing the stated target folder was missing, did I dig down and find the NVidia Installer windows was still open and pending the Install. As they say, all's well that ends well. The Xterminator plugins showed a 10x speed improvement.

Thanks,
Mike
 
Thank you so much! I just bought a new PC (a 13th gen i7 with DDR5) and BlurXterminator on M31 integration took 39min 45sec to complete its run without CUDA acceleration, an 54.9sec with CUDA acceleration! huge improvement!
Instructions are perfect, just followed it step by step and I got it done! (on a Win11pro Italian language)

Once agai, a big big thank you!🙏🙏🙏🙏:D:D:D
 
All instructions for Pixinsight CUDA acceleration I've seen are too old to cover the latest generation of GPUs, so I wrote a tutorial. This should work on anything from GTX900 to RTX4000-series.

Even if you already got it to work using an older version of CUDA, it's a worthwhile update that will give a hefty speed boost with some GPUs.

https://rikutalvio.blogspot.com/2023/02/pixinsight-cuda.html
Thank you very much for publishing these instructions. I've just replaced my graphics card (AMD) with a GeForce 1660 Super. Everything worked fine and starXterminator now takes 52 seconds to remove the stars from an APS-C size file. Down from 18min 37sec. I can't even get down stairs to make a cup of tea now ! very happy, best wishes and many thanks.
Martin
 
Hi RT,

I've just followed your excellent instructions with dramatic results. StarXTerminator down from 3min to 12s. Thank you!

Just some notes, in case it helps others...

1) I screwed up step one. I forgot to load the new tensorflow.dll. Doh!
The result was that the RC-Astro tools failed to load and were removed during PI start up.
Re-doing step 1, deleting "c:\Program Files\Pixinsight\updates.xri" and using "Pixinsight > Resources > Update > Check for updates" fixed that problem.
Follow the instructions!!!!!

2) Having corrected (1), StarTerminator still wasn't running any faster (3min).
So I checked / re-did all the steps. Still no improvement.
I did a re-boot and StarTerminator's speed increased (do System Environment Variables need a reboot?)
Perhaps it's worth adding a "reboot" recommendation to step 5?

3) After the correct configuration, the first run of StarXTerminator took 1min (instead of 3min - and excellent improvement).
It seemed to be an initial configuration (?). Interestingly, it didn't show "Pixinsight > Process Console" for quite a time. But when it did the % counter increased rapidly.
Subsequent, StarXTerminator runs took 15s. Even when restarting Pixinsight.

The laptop is a Dell G16, 32GB memory and NVIDIA GeForce RTX 4070.

Once again, thanks for your detailed notes.

Cheers, Jim
 
Last edited:
Hi RT,

I've just followed your excellent instructions with dramatic results. StarXTerminator down from 3min to 12s. Thank you!

Just some notes, in case it helps others...

1) I screwed up step one. I forgot to load the new tensorflow.dll. Doh!
The result was that the RC-Astro tools failed to load and were removed during PI start up.
Re-doing step 1, deleting "c:\Program Files\Pixinsight\updates.xri" and using "Pixinsight > Resources > Update > Check for updates" fixed that problem.
Follow the instructions!!!!!

2) Having corrected (1), StarTerminator still wasn't running any faster (3min).
So I checked / re-did all the steps. Still no improvement.
I did a re-boot and StarTerminator's speed increased (do System Environment Variables need a reboot?)
Perhaps it's worth adding a "reboot" recommendation to step 5?

3) After the correct configuration, the first run of StarXTerminator took 1min (instead of 3min - and excellent improvement).
It seemed to be an initial configuration (?). Interestingly, it didn't show "Pixinsight > Process Console" for quite a time. But when it did the % counter increased rapidly.
Subsequent, StarXTerminator runs took 15s. Even when restarting Pixinsight.

The laptop is a Dell G16, 32GB memory and NVIDIA GeForce RTX 4070.

Once again, thanks for your detailed notes.

Cheers, Jim

Interesting, so you renamed the dll but didn't add the new one? Then running without it caused all those issues?

A reboot is not required by anything in this guide. You probably had something hang in the background.
 
Interesting, so you renamed the dll but didn't add the new one? Then running without it caused all those issues?

A reboot is not required by anything in this guide. You probably had something hang in the background.

No. I missed the whole of step 1! So it was usingvthe original tensorflow.dll. it was only when I followed the "if it fails" instructions, that I had missed the complete step.

I was surprised I need a reboot. So you are almost certainly right. So something in my original error probably caused a persistent error condition.

I really only mentioned my findings in case it triggers a thought for someone else who might see a problem.

Once again, thanks for your excellent notes.👍🙂

Cheers, Jim
 
Thanks for the excellent instructions. I upgraded my 1660 to a 4070 ti and was a bit disappointed in how little the GPU acceleration improved with the new card. After removing the old instructions and following this process, my 4070 ti is clocking in at 3.4 times faster than the 1660. These instructions make a huge difference with the latest Nvidia cards!
 
Back
Top