rooklift / ogatak

KataGo analysis GUI and SGF editor
GNU Affero General Public License v3.0
80 stars 14 forks source link

Performance better without GUI Hardware Acceleration? #53

Open rooklift opened 2 years ago

rooklift commented 2 years ago

Recently performance (of KataGo) has become better (for me) when Ogatak is configured not to use hardware acceleration - I wish I knew the exact reason, as this didn't used to be so. Maybe some Windows update?

If anyone is or isn't experiencing the same, feel free to say "me too" or "not me" in the comments...

rooklift commented 2 years ago

I actually wonder if I'm tripping some Nvidia anti-bitcoin-mining flag or something.

ParmuzinAlexander commented 2 years ago

What difference are we talking about? I see 0.3%. https://imgur.com/aGogmlg

rooklift commented 2 years ago

Huh, I hadn't even thought of looking at the Task Manager, though it doesn't give useful numbers for me.

Uh, if you have time I would ask you measure it by running an analysis on a game (go to the root position and press F12) and just timing it by clock. Then compare with the opposite setting for hardware acceleration.

My results for my test game were 102 seconds vs 78 seconds.

ParmuzinAlexander commented 2 years ago

I don't see the difference in Ogatak 1.5.0 & 1.5.6 with CUDA & TensorRT and not the latest drivers.

rooklift commented 2 years ago

OK, thanks for checking.

HackYardo commented 2 years ago

In my case, OpenCL, around:

# Ogatak
speedwith = 0.78
speedwithout = 1

# Sabaki
speedwith = 0.81
speedwithout  = 1

# Sabaki : Ogatak
1 : 0.36 

😱 ? why analyze mode slow so far from gtp mode

OFF TOPIC: I don't know object-oriented programming, JavaScript, tree data structure, etc, I wonder how does Ogatak jump between two positions? I want to implement this by recording positions' matrices, every element of every matrix has 3 values: 0 for empty, 1 for white, -1 for black. Any suggestions please?

rooklift commented 2 years ago

Thanks for the speed report.

As for data structures, Ogatak has 2 structures:

Each node has an associated board. Note that changing the contents of a node is dangerous if you're not careful since it requires changing both the assocated board and also the boards of any child nodes.

A node contains the following:

rooklift commented 2 years ago

😱 ? why analyze mode slow so far from gtp mode

Is it? How exactly are you doing a speed test with Sabaki?

Depending on what exactly you're doing, it could be the Wide Root Noise setting (in the Analysis menu).

HackYardo commented 2 years ago

As for data structures, Ogatak has 2 structures: ... A node contains the following: ...

The structures of Ogatak is inspiring 👍 , thinks a mountain ⛰️ . I will try tree or dictionary data structures in my own repo.

Is it? How exactly are you doing a speed test with Sabaki?

Sorry for late reply, the hot days 🥵 slow down everything... It is because I used different models in Sabaki and in Ogatak, Ogatak is faster than Sabaki actually. I test again, it's amazing 😃 :

# the same one model
# the default gtp/analysis config
# the same one sgf file at the same one move
# speed without gui accelerate:
method speed
LizGoban 1
Sabaki 1.84
Ogatak 2.59
KataGoGtpCli 2.55

It seems that Ogatak is the fastest one and even faster than CLI! 😱

rooklift commented 2 years ago

Hmm - I've not done anything to make that true so I don't know the reason really, maybe something about the precise options you've selected in either the config file or Ogatak's various settings, who knows.

Anyway, glad to hear it's not slower, thanks.