nnue-pytorch

Discussion of chess software programming and technical issues.

Moderator: Ras

jdart
Posts: 4398
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

nnue-pytorch

Post by jdart »

I have been trying to get this to work on my Linux system with a GTX 3080. I am still not quite there, but for anyone else trying this, a few hints:

1. You can't run this without an NVIDA GPU. It used to support a cpu-only mode but not anymore.

2. You need to turn Secure Boot off in your BIOS to get the NVIDIA driver to work. (At least for Linux. Note Windows 11 requires Secure Boot to be enabled). You can use the latest driver from NVIDIA.

3. I highly recommend Anaconda (https://anaconda.org/) to install the python components. If you do not have a X Windows environment you can install/use "Miniconda."

4. You need to install CUDA but not the latest version. You need 11.7.

5. If using the latest version of pytorch lightning, you need the fix mentioned in this issue: https://github.com/glinscott/nnue-pytorch/issues/212
Bjoern
Posts: 16
Joined: Mon Sep 26, 2016 8:59 pm

Re: nnue-pytorch

Post by Bjoern »

Thanks, these are valuable hints ! Merry Christmas !
User avatar
flok
Posts: 558
Joined: Tue Jul 03, 2018 10:19 am
Full name: Folkert van Heusden

Re: nnue-pytorch

Post by flok »

jdart wrote: Sat Dec 24, 2022 3:15 am I have been trying to get this to work on my Linux system with a GTX 3080. I am still not quite there, but for anyone else trying this, a few hints:

1. You can't run this without an NVIDA GPU. It used to support a cpu-only mode but not anymore.

2. You need to turn Secure Boot off in your BIOS to get the NVIDIA driver to work. (At least for Linux. Note Windows 11 requires Secure Boot to be enabled). You can use the latest driver from NVIDIA.

3. I highly recommend Anaconda (https://anaconda.org/) to install the python components. If you do not have a X Windows environment you can install/use "Miniconda."

4. You need to install CUDA but not the latest version. You need 11.7.

5. If using the latest version of pytorch lightning, you need the fix mentioned in this issue: https://github.com/glinscott/nnue-pytorch/issues/212
Which linux distribution did you use?
jdart
Posts: 4398
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: nnue-pytorch

Post by jdart »

> Which linux distribution did you use?
I am on Ubuntu 22.04
Joost Buijs
Posts: 1632
Joined: Thu Jul 16, 2009 10:47 am
Location: Almere, The Netherlands

Re: nnue-pytorch

Post by Joost Buijs »

jdart wrote: Sat Dec 24, 2022 3:15 am I have been trying to get this to work on my Linux system with a GTX 3080. I am still not quite there, but for anyone else trying this, a few hints:

1. You can't run this without an NVIDA GPU. It used to support a cpu-only mode but not anymore.
Strange, according to the PyTorch website you can still install a CPU only version 1.13.1 with:
conda install pytorch torchvision torchaudio cpuonly -c pytorch
jdart
Posts: 4398
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: nnue-pytorch

Post by jdart »

Yes, pytorch can run cpu-only, but nnue-pytorch cannot.
Joost Buijs
Posts: 1632
Joined: Thu Jul 16, 2009 10:47 am
Location: Almere, The Netherlands

Re: nnue-pytorch

Post by Joost Buijs »

jdart wrote: Sat Dec 24, 2022 5:38 pm Yes, pytorch can run cpu-only, but nnue-pytorch cannot.
Aha, I see, I didn't know there exists something like nnue-pytorch. I solely use my own trainer which uses libTorch, that is why I must have missed it.
jdart
Posts: 4398
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: nnue-pytorch

Post by jdart »

By the way, there is a recently reported malicious dependency injected into pytorch:

https://www.bleepingcomputer.com/news/s ... -holidays/

Users should ensure package "torchtriton" is not installed.