Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance better without GUI Hardware Acceleration? #53

Open
rooklift opened this issue Jun 4, 2022 · 10 comments
Open

Performance better without GUI Hardware Acceleration? #53

rooklift opened this issue Jun 4, 2022 · 10 comments
Labels
performance Things are too slow / laggy

Comments

@rooklift
Copy link
Owner

rooklift commented Jun 4, 2022

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 rooklift added the performance Things are too slow / laggy label Jun 4, 2022
@rooklift rooklift changed the title Performance better with Disable Hardware Acceleration Performance better with Disable Hardware Acceleration? Jun 5, 2022
@rooklift rooklift pinned this issue Jun 5, 2022
@rooklift rooklift changed the title Performance better with Disable Hardware Acceleration? Performance better without GUI Hardware Acceleration? Jun 5, 2022
@rooklift
Copy link
Owner Author

rooklift commented Jun 5, 2022

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

@ParmuzinAlexander
Copy link
Contributor

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

@rooklift
Copy link
Owner Author

rooklift commented Jun 5, 2022

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
Copy link
Contributor

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

@rooklift
Copy link
Owner Author

rooklift commented Jun 5, 2022

OK, thanks for checking.

@HackYardo
Copy link

HackYardo commented Jun 21, 2022

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
Copy link
Owner Author

rooklift commented Jun 21, 2022

Thanks for the speed report.

As for data structures, Ogatak has 2 structures:

  • A tree of nodes, each of which says how the position for that node has changed from the previous node. (An SGF file is exactly a tree of nodes that contain this info, so this works well for SGF.)

  • The actual board struct, which is much like you imagine it, though it also contains some additional information such as prisoner count, ko square (if any), and player to move.

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:

  • Link (pointer, reference, etc) to parent node (or null when the node is the root node).
  • List of child nodes (possibly empty).
  • Zero or more keys and values - e.g. B[dd] is how an SGF file says that there's a black move at coordinates dd.

@rooklift
Copy link
Owner Author

rooklift commented Jun 21, 2022

😱 ? 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
Copy link

HackYardo commented Jun 24, 2022

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
Copy link
Owner Author

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.

@rooklift rooklift unpinned this issue Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Things are too slow / laggy
Projects
None yet
Development

No branches or pull requests

3 participants