Chakazul / Lenia

Lenia - Mathematical Life Forms
https://chakazul.github.io/Lenia/JavaScript/Lenia.html
MIT License
3.55k stars 223 forks source link

Python (Reikna) GPU support on Windows? #20

Open thedocruby opened 2 years ago

thedocruby commented 2 years ago

Hello, I am a big fan of your work! Quick question, are there some extra steps I need to take to enable GPU support, at least on Windows? (I would be normally using linux but my dual boot setup is currently broken)

I had to tweak the dependencies to get it to work right, but I'm still using mostly the same install. I also had to install PyCUDA to get Reikna to do anything, I think this is normal but I couldn't find anything about it specifically for Lenia. However, I still get an error saying the compiler preprocessing of the CUDA shaders failed.

I have the latest stable NVIDIA graphics drivers, and an NVIDIA GTX 1650. I tried doing a clean install of the graphics drivers, and all of the CUDA test programs seem to work. Is it possible my GPU or operating system is not fully supported by Lenia Python? Or am I just overlooking something? My adapted requirements.txt file is attached below if it helps. Let me know if you need any more information.

requirements.txt

Chakazul commented 2 years ago

Hi, the GPU support in this version of Lenia in Python is not optimal, in most cases CPU version is even faster (except in higher dimensions like 3D). I only tested it with AMD Radeon GPU, NVIDIA GPUs may need some changes in the code. Anyway I'm working on a JAX version which is much better in utilizing GPU/TPU power. You can also play with LeniaX: https://github.com/morgangiraud/leniax/tree/main/leniax

thedocruby commented 2 years ago

Wow, Thanks for the comprehensive and helpful reply!

thedocruby commented 2 years ago

@Chakazul I sent you an email a couple of days ago, just want to make sure you got it. :)

ShahriarNasseri commented 1 year ago

web 3, git remote add origin.