Git Product home page Git Product logo

Comments (6)

lightvector avatar lightvector commented on July 30, 2024 4

Neat! Keep in mind that the more threads there are, the weaker the search will be per visit. So you will get more visits, but those visits will be slightly less effective, because MCTS benefits from knowing the results of the previous visits when choosing how to spend the next ones.

This means that if you're at the point where numSearchThreads is maximizing visits/second - where increasing numSearchThreads further actually starts to decrease visits/second instead of increase it - then you're probably slightly too high, because at the point where the marginal +1 thread no longer helps performance much, it will still be decreasing strength per visit a little.

from katago.

Splee99 avatar Splee99 commented on July 30, 2024

What is the relationship of numNNServerThreadsPerModel and numSearchThreads to the hardware, such as number of CPU core and number of computing unit in GPU?

from katago.

lightvector avatar lightvector commented on July 30, 2024

@Splee99 - see #28 for a description of the parameters. I'll see about adding this information to a readme or something too on the next release.

from katago.

Splee99 avatar Splee99 commented on July 30, 2024

OK, thanks. Now this maybe a separate issue. My CPU has two cores. No matter how I set those parameters, the CPU usage is always 50%. It's like the second core is not used. I'm not sure if this is a Windows issue. When running leelazero both cores are used so there is no hardware issue. Maybe you want to take a look in the next release.

from katago.

lightvector avatar lightvector commented on July 30, 2024

That's a strange problem. I'm not sure what I would even begin take a look at. With regards to threading, KataGo is pretty unremarkable, using C++ standard library and nothing else. Sadly, I also don't have a good way to test on Windows quite yet, (very grateful to alreadydone for making something work on Windows well in advance of official support).

But maybe there are still things to try. Can you give some more info? For example, is it literally always exactly 50% when searching, or does it fluctuate? Is it still true if you increase numSearchThreads to a much larger number, much past the number of cores you have? If you check in Windows, did somehow a CPU affinity get set for KataGo in particular that restricts the cores it can use? https://superuser.com/questions/181577/what-is-windows-priority-and-affinity-and-what-advatanges-does-it-provide

If it's fluctuating around 50% rather than actually pinned at 50% exactly, a boring explanation could be that given how KataGo is implemented on the GPU and the particular ratio of CPU to GPU power and latency for the system you have, maybe the CPU is simply most of the time waiting on the GPU, enough so that the average usage is never more than 50%.

from katago.

Splee99 avatar Splee99 commented on July 30, 2024

You are right that the CPU usage is indeed light, while two cores are used. I guess that's how Katago is implemented and parameter tuning doesn't help.
CPU

from katago.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.