Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

PixInsight GPU CUDA AI acceleration for RC Tools


symmetal

Recommended Posts

I followed all the steps in Russell Croman's guide to enable Nvidia GPUs to do the AI processing in BlurXterminator etc. but it's had no effect. One of the steps is replacing the AI tensorflow.dll in the PI bin folder, (which is a CPU only version), with a GPU enabled tensorflow.dll.

Running BlurXterminator it took exactly the same time to run before and after, and checking Task Manager, apart from a burst of GPU usage when BXT is initializing, when processing, the GPU usage is zero. The tensorflow.dll is being used, or at least checked, as removing it causes errors when loading PI, and the X modules are unavailable.

The Nvidia RTX 2070 (8GB memory) graphics card is fully CUDA compatible. I looked to see what programs there were for testing CUDA and they all just seem to be source code examples, with none ready compiled for Windows use. 😟

Has anyone successfully managed to get this working in PI?

The new tensorflow.dll is a lot smaller than the original one, presumably as most of the work is now farmed out to the GPU so something is doing the calculations, as the X Suite programs still work.

I'm using PI 1.8.9-1 in this machine, and I also tried it on my backup machine running 1.8.9-2 with a lower spec CUDA graphics card, and it's just the same.

Alan

Link to comment
Share on other sites

2 hours ago, sinbad40 said:

I got it working on my laptop (seems to hit the memory more but is working) and have it working on my main PC.  I followed this updated version to get it running, probably the same, but may have something different.

https://rikutalvio.blogspot.com/2023/02/pixinsight-cuda.html

Thanks for that. The only difference I can see is you did a custom install of Cuda, installing just the runtime libraries, while the RC version did an express install which installed everything including development files. This also installed 2 path entries automatically while your version requires 1 of these paths to be entered manually.

I'll try your method and see what happens. 🙂

Alan

Link to comment
Share on other sites

Deleted the CUDA installation and ran the network-install of runtime libs only instead but no change. 😟 Actually the GPU version of tensorflow is over twice the size of the CPU version, not smaller as I first thought, so it's possibly still running just the CPU routines still embedded in the GPU library, which is why it takes exactly the same time to run BlurXT etc. Tried adding /deleting environment variables to match those stated in Sinbad40's posting but no change.

The only difference is I'm using version 12 of CUDA and CUDnn while Sinbad40's posting uses version 11.

It would be nice if the XT processes indicated in the console area whether the CPU and/or GPU were being used for processing and if CUDA is present why it's not being used.

Alan

 

Link to comment
Share on other sites

Just updated my laptop to 1.8.9-2. Cleaned all the nvidia folders and tried getting it to work with cuda 11.8 and  12.2.1. Just crashed when it tries to use cuda. So will step back. Will take a look on the pi forum. Made sure the variables were pointing at the correct path etc. From some posts from January cuda 12 doesn't work. But that may be old news

Edited by sinbad40
Link to comment
Share on other sites

I used Cuiv's guide to install the CUDA bits & pieces for GPU acceleration. This works under Win10 Pro with a GTX980 here. 

Ten-fold speed improvement for the one comparison test I ran when 1st installed👍I'm easily convinced lol

Link to comment
Share on other sites

7 hours ago, fireballxl5 said:

I used Cuiv's guide to install the CUDA bits & pieces for GPU acceleration. This works under Win10 Pro with a GTX980 here. 

Ten-fold speed improvement for the one comparison test I ran when 1st installed👍I'm easily convinced lol

Thanks fireballxl5. The video uses the same installation info as sinbad40 posted. It's probably me worth trying the CUDA 11 files rather than the latest CUDA 12 I used, to see if it makes a difference. The tensorflow.dll for Windows is an older version than the latest release for linux systems so maybe it isn't so compatible with CUDA 12.

Alan

Link to comment
Share on other sites

I installed CUDA 11 on my lower spec PC (Nvidia GTX 960) and PI crashed and exited as soon as BlurXT finished initialization and began processing. Not good but at least it was trying to do something, unlike CUDA 12. 🙂

Not having high hopes, I thought I may as well try it on my high spec PC (Nvidia RTX 2070) and woohoo! 🤗 It worked. What BlurXT took 3min 15s to process previously, now took about 20s for the same image. Around 10x faster. Task Manager showed the GPU working hard. 😁

I left CUDA 12 installed as well as they are in separate CUDA subfolders so if the CUDA 12 issue is fixed I just have to change one environment variable to make the switch. It may work with the latest tensorflow.dll 2.10 but I used tensorflow.dll 2.90 as in the posted instructions, and as it's working fine now, I'll leave it for the moment.

Thanks all for your help. 😃

Alan

 

Link to comment
Share on other sites

I've just done this and it works for me, but make sure you follow the guide exactly. I made the mistake of installing a whole folder into the CUDA -> bin folder by mistake rather than just a few files and that made the difference to me.

Good luck.

  • Like 1
Link to comment
Share on other sites

I've also installed CUDA 11 and it's working fine. 

One thing to note: If you update PI then it will likely overwrite the tensorflow.dll file, so you have to add the original back into the PI bin folder after an update. ;) 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.