Not logged inCSS-Forum
Forum CSS-Online Help Search Login
CSS-Shop Impressum Datenschutz
Up Topic Hauptforen / CSS-Forum / Lc0 setup Hilfe
- - By Clemens Keck Date 2019-02-07 11:39
Hallo Leute

ich hab jetzt meine RTX 2070 .
Lc0 schafft gerade mal 7 - 9 kNs.
Was mache ich falsch? Es ist keine Veränderung, egal was ich in die leere backend Zeile einfüge.
cudnn
oder
cudnn-fp16

stimmt die Schreibweise nicht? Oder fehlen dlls? hab aber alles runtergeladen von der Lc0 site.oder gehören die dlls in ein Windows verzeichnis?

wer weis Rat?

C.K.
Parent - By Guenter Stertenbrink Date 2019-02-07 11:58 Edited 2019-02-07 12:02
frag am besten im Lc0 Forum, da hab ich mehrere solche Posts gesehen - mit guten Antworten

https://groups.google.com/forum/#!forum/lczero

https://groups.google.com/forum/#!topic/lczero/15rdLuQOjyY

achja, und Andreas Strangmueller hatte einen thread hier  kurzlich zur rtx2060
(s.u. 12:01 MEZ)
Parent - By Wolfgang Battig Date 2019-02-07 11:59 Edited 2019-02-07 12:06
Hi Clemens,

Andreas Strangmüller hatte im Thread "Leela Zero (Lc0) - NVIDIA Geforce RTX 2060" (http://forum.computerschach.de/cgi-bin/mwf/topic_show.pl?tid=10194) viele Einstellungen erläutert und ausgetestet, die bei ihm die Performance von anfangs unter 8000 auf schlussendlich über 32000 rollouts gepusht haben.

Allein der Parameter backend=cudnn-fp16 sollte fast eine Verdreifachung bringen.

Welches GUI nutzt Du?
Unter Arena z.B. kann man die Optionen einfach via Linksklick ins Enginefenster und Auswahl des Menüpunktes "Konfiguriere "Enginename"" aufrufen und verändern. Alternativ Strg+1. Sollte unter Shredder Classic und CB-Fritz ähnlich funktionieren.

Fast vergessen: aktuellsten Treiber von der Nvidia-Seite verwenden

Viele Grüße
Parent - By Andreas Strangmüller Date 2019-02-07 12:54
Hallo Clemens,

hier sind die Einstellungen meiner RTX 2060 unter Arena.

In der leeren Zeile BackendOptions ist nichts einzutragen. Backend ist unbedingt auf cudnn-fp16 abzuändern.
Die Werte für Threads, NNChacheSize, MinibatchSize und MaxCollisionEvents habe ich verändert, alle anderen Einstellungen sind Standard.



Vielleicht kannst Du uns ein paar Werte Deiner RTX 2070 mitteilen.

Viele Grüße,
Andreas
Parent - By Clemens Keck Date 2019-02-07 12:54
Also
in der Fritz GUI klappt es, komme so auf ca 32 - 33 kNs nach einer Minute.
In der Infinitychess GUI wird der Parameter "backend" nicht angezeigt
Lediglich backend options

Irgendeine Idee wie man backend cudnn-fp16 in der Infinitychess GUI eingeben könnte?

C.K.
Parent - - By Clemens Keck Date 2019-02-07 13:46
wie könnte man lc0 mit dem lc0.config file und den angegebenen Parametern zum laufen bringen?

C.K.
Parent - - By Andreas Strangmüller Date 2019-02-07 14:04 Edited 2019-02-07 14:19
Erstelle im Lc0-Verzeichnis eine Textdatei mit dem Namen lc0.config

Die Parameter müssen mit vorangestelltem -- eingetragen werden: Für jeden Parameter eine extra Zeile verwenden.

--backend=cudnn-fp16
--threads=4
--nncache=200000000
--max-collision-events=1024
--minibatch-size=1024

Alle Parameter erhältst Du indem Du in der Kommadozeile folgendes eingibst:
lc0 --help
Parent - By Andreas Strangmüller Date 2019-02-07 14:11
lc0 --help
       _
|   _ | |
|_ |_ |_| v0.20.2 built Feb  1 2019
Usage: lc0 [<mode>] [flags...]

Available modes. A help for a mode: lc0 <mode> --help
  uci        (default) Act as UCI engine
  selfplay   Play games with itself
  benchmark  Quick benchmark

Allowed command line flags for current mode:
  -h,  --help  Show help and exit.

  -t,  --threads=1..128
               Number of (CPU) worker threads to use.
               [UCI: Threads  DEFAULT: 2  MIN: 1  MAX: 128]

       --nncache=0..999999999
               Number of positions to store in a memory cache. A large cache can speed up
               searching, but takes memory.
               [UCI: NNCacheSize  DEFAULT: 200000  MIN: 0  MAX: 999999999]

       --slowmover=0.00..100.00
               Budgeted time for a move is multiplied by this value, causing the engine to
               spend more time (if value is greater than 1) or less time (if the value is less
               than 1).
               [UCI: Slowmover  DEFAULT: 1.00  MIN: 0.00  MAX: 100.00]

       --move-overhead=0..100000000
               Amount of time, in milliseconds, that the engine subtracts from it's total
               available time (to compensate for slow connection, interprocess communication,
               etc).
               [UCI: MoveOverheadMs  DEFAULT: 200  MIN: 0  MAX: 100000000]

  -s,  --syzygy-paths=STRING
               List of Syzygy tablebase directories, list entries separated by system separator
               (";" for Windows, ":" for Linux).
               [UCI: SyzygyPath]

       --[no-]ponder
               This option is ignored. Here to please chess GUIs.
               [UCI: Ponder  DEFAULT: true]

       --immediate-time-use=0.00..1.00
               Fraction of time saved by smart pruning, which is added to the budget to the
               next move rather than to the entire game. When 1, all saved timeis added to the
               next move's budget; when 0, saved time is distributed among all future moves.
               [UCI: ImmediateTimeUse  DEFAULT: 1.00  MIN: 0.00  MAX: 1.00]

       --ramlimit-mb=0..100000000
               Maximum memory usage for the engine, in megabytes. The estimation is very rough,
               and can be off by a lot. For example, multiple visits to a terminal node counted
               several times, and the estimation assumes that all positions have 30 possible
               moves. When set to 0, no RAM limit is enforced.
               [UCI: RamLimitMb  DEFAULT: 0  MIN: 0  MAX: 100000000]

  -w,  --weights=STRING
               Path from which to load network weights.
               Setting it to <autodiscover> makes it search in ./ and ./weights/ subdirectories
               for the latest (by file date) file which looks like weights.
               [UCI: WeightsFile  DEFAULT: <autodiscover>]

  -b,  --backend=CHOICE
               Neural network computational backend to use.
               [UCI: Backend  DEFAULT: cudnn  VALUES: cudnn,cudnn-fp16,check,random,roundrobin,multiplexing,demux]

  -o,  --backend-opts=STRING
               Parameters of neural network backend. Exact parameters differ per backend.
               [UCI: BackendOptions]

       --minibatch-size=1..1024
               How many positions the engine tries to batch together for parallel NN
               computation. Larger batches may reduce strength a bit, especially with a small
               number of playouts.
               [UCI: MinibatchSize  DEFAULT: 256  MIN: 1  MAX: 1024]

       --max-prefetch=0..1024
               When the engine cannot gather a large enough batch for immediateuse, try to
               prefetch up to X positions which are likely to be useful soon, and put them into
               cache.
               [UCI: MaxPrefetch  DEFAULT: 32  MIN: 0  MAX: 1024]

       --cpuct=0.00..100.00
               cpuct_init constant from "UCT search" algorithm. Higher values promote more
               exploration/wider search, lower values promote more confidence/deeper search.
               [UCI: CPuct  DEFAULT: 3.00  MIN: 0.00  MAX: 100.00]

       --cpuct-base=1.00..1000000000.00
               cpuct_base constant from "UCT search" algorithm. Lower value means higher growth
               of Cpuct as number of node visits grows.
               [UCI: CPuctBase  DEFAULT: 19652.00  MIN: 1.00  MAX: 1000000000.00]

       --cpuct-factor=0.00..1000.00
               Multiplier for the cpuct growth formula.
               [UCI: CPuctFactor  DEFAULT: 2.00  MIN: 0.00  MAX: 1000.00]

       --temperature=0.00..100.00
               Tau value from softmax formula for the first move. If equal to 0, the engine
               picks the best move to make. Larger values increase randomness while making the
               move.
               [UCI: Temperature  DEFAULT: 0.00  MIN: 0.00  MAX: 100.00]

       --tempdecay-moves=0..100
               Reduce temperature for every move from the game start to this number of moves,
               decreasing linearly from initial temperature to 0. A value of 0 disables
               tempdecay.
               [UCI: TempDecayMoves  DEFAULT: 0  MIN: 0  MAX: 100]

       --temp-cutoff-move=0..1000
               Move number, starting from which endgame temperature is used rather than initial
               temperature. Setting it to 0 disables cutoff.
               [UCI: TempCutoffMove  DEFAULT: 0  MIN: 0  MAX: 1000]

       --temp-endgame=0.00..100.00
               Temperature used during endgame (starting from cutoff move). Endgame temperature
               doesn't decay.
               [UCI: TempEndgame  DEFAULT: 0.00  MIN: 0.00  MAX: 100.00]

       --temp-value-cutoff=0.00..100.00
               When move is selected using temperature, bad moves (with win probability less
               than X than the best move) are not considered at all.
               [UCI: TempValueCutoff  DEFAULT: 100.00  MIN: 0.00  MAX: 100.00]

       --temp-visit-offset=-1.00..1000.00
               Reduces visits by this value when picking a move with a temperature. When the
               offset is less than number of visits for a particular move, thatmove is not
               picked at all.
               [UCI: TempVisitOffset  DEFAULT: 0.00  MIN: -1.00  MAX: 1000.00]

  -n,  --[no-]noise
               Add Dirichlet noise to root node prior probabilities. This allows the engine to
               discover new ideas during training by exploring moves which are known to be bad.
               Not normally used during play.
               [UCI: DirichletNoise  DEFAULT: false]

       --[no-]verbose-move-stats
               Display Q, V, N, U and P values of every move candidate after each move.
               [UCI: VerboseMoveStats  DEFAULT: false]

       --smart-pruning-factor=0.00..10.00
               Do not spend time on the moves which cannot become bestmove given the remaining
               time to search. When no other move can overtake the current best, the search
               stops, saving the time. Values greater than 1 stop less promising moves from
               being considered even earlier. Values less than 1 causes hopeless moves to still
               have some attention. When set to 0, smart pruning is deactivated.

               [UCI: SmartPruningFactor  DEFAULT: 1.33  MIN: 0.00  MAX: 10.00]

       --fpu-strategy=CHOICE
               How is an eval of unvisited node determined. "reduction" subtracts
               --fpu-reduction value from the parent eval. "absolute" sets evalof unvisited
               nodes to the value specified in --fpu-value.
               [UCI: FpuStrategy  DEFAULT: reduction  VALUES: reduction,absolute]

       --fpu-reduction=-100.00..100.00
               "First Play Urgency" reduction (used when FPU strategy is "reduction"). Normally
               when a move has no visits, it's eval is assumed to be equal to parent's eval.
               With non-zero FPU reduction, eval of unvisited move is decreasedby that value,
               discouraging visits of unvisited moves, and saving those visits for (hopefully)
               more promising moves.
               [UCI: FpuReduction  DEFAULT: 1.20  MIN: -100.00  MAX: 100.00]

       --fpu-value=-1.00..1.00
               "First Play Urgency" value. When FPU strategy is "absolute", value of unvisited
               node is assumed to be equal to this value, and does not depend on parent eval.
               [UCI: FpuValue  DEFAULT: -1.00  MIN: -1.00  MAX: 1.00]

       --cache-history-length=0..7
               Length of history, in half-moves, to include into the cache key. When this value
               is less than history that NN uses to eval a position, it's possble that the
               search will use eval of the same position with different history taken from
               cache.
               [UCI: CacheHistoryLength  DEFAULT: 0  MIN: 0  MAX: 7]

       --policy-softmax-temp=0.10..10.00
               Policy softmax temperature. Higher values make priors of move candidates closer
               to each other, widening the search.
               [UCI: PolicyTemperature  DEFAULT: 2.20  MIN: 0.10  MAX: 10.00]

       --max-collision-events=1..1024
               Allowed node collision events, per batch.
               [UCI: MaxCollisionEvents  DEFAULT: 32  MIN: 1  MAX: 1024]

       --max-collision-visits=1..1000000
               Total allowed node collision visits, per batch.
               [UCI: MaxCollisionVisits  DEFAULT: 9999  MIN: 1  MAX: 1000000]

       --[no-]out-of-order-eval
               During the gathering of a batch for NN to eval, if position happens to be in the
               cache or is terminal, evaluate it right away without sending the batch to the
               NN. When off, this may only happen with the very first node of abatch; when on,
               this can happen with any node.
               [UCI: OutOfOrderEval  DEFAULT: true]

       --[no-]syzygy-fast-play
               With DTZ tablebase files, only allow the network pick from winning moves that
               have shortest DTZ to play faster (but not necessarily optimally).

               [UCI: SyzygyFastPlay  DEFAULT: true]

       --multipv=1..500
               Number of game play lines (principal variations) to show in UCI info output.
               [UCI: MultiPV  DEFAULT: 1  MIN: 1  MAX: 500]

       --score-type=CHOICE
               What to display as score. Either centipawns (the UCI default), win percentage or
               Q (the actual internal score) multiplied by 100.
               [UCI: ScoreType  DEFAULT: centipawn  VALUES: centipawn,win_percentage,Q]

       --history-fill=CHOICE
               Neural network uses 7 previous board positions in addition to the current one.
               During the first moves of the game such historical positions don't exist, but
               they can be synthesized. This parameter defines when to synthesize them (always,
               never, or only at non-standard fen position).
               [UCI: HistoryFill  DEFAULT: fen_only  VALUES: no,fen_only,always]

  -c,  --config=STRING
               Path to a configuration file. The format of the file is one command line
               parameter per line, e.g.:
               --weights=/path/to/weights
               [UCI: ConfigFile  DEFAULT: lc0.config]

  -l,  --logfile=STRING
               Write log to that file. Special value <stderr> to output the logto the console.
               [UCI: LogFile]
Parent - By Clemens Keck Date 2019-02-07 14:31
danke Andreas

das wars was ich gesucht habe.
jetzt läuft die engine in jeder GUI.

nach 3 Minuten in der Grundstellung sinds nun 38kNs.
Aber der Rechner braucht gerade 300 Watt. Die Karte läuft mit 1815MHz boosttakt.
Das ist mindestens ein 12core Stockfish(kein HT) was den Strom angeht.

jetzt noch die tbs zum laufen bringen

C.K.
Parent - - By Clemens Keck Date 2019-02-07 15:20 Upvotes 1
Wunderbares Forum, hier werden Sie geholfen

Ich habe die Hardware auf einem quad Rechner installiert. Die 4 cpus sind ja teilweise auch stark mit beteiligt wenn die engine rechnet.
Ist das normal?
Für meine TBs habe ich 3 Verzeichnisse: E:\syzygy-5;E:\6-wdl;E:\6-dtz
wie kriege ich das in den lc0.config file rein?

C.K.
Parent - By Andreas Strangmüller Date 2019-02-07 15:52
Ja, das ist normal. Soweit ich weiß sind die CPUs beim Zugriff auf die Datenbank, die WeightsFile beteiligt.

Der Auszug aus der Hilfe lautet:

-s,  --syzygy-paths=STRING
               List of Syzygy tablebase directories, list entries separated by system separator
               (";" for Windows, ":" for Linux).
               [UCI: SyzygyPath]

Das Trennzeichen der Tablebase Verzeichnisse unter Windows ist ;

Somit sollte der Eintrag in der lc0.config folgender sein:

--syzygy-paths=E:\syzygy-5;E:\6-wdl;E:\6-dtz
Parent - - By Tom Paul Date 2019-02-07 17:05
Clemens Keck schrieb:

Wunderbares Forum, hier werden Sie geholfen

Ich habe die Hardware auf einem quad Rechner installiert. Die 4 cpus sind ja teilweise auch stark mit beteiligt wenn die engine rechnet.
Ist das normal?
Für meine TBs habe ich 3 Verzeichnisse: E:\syzygy-5;E:\6-wdl;E:\6-dtz
wie kriege ich das in den lc0.config file rein?

C.K.


Kannst ja mal berichten wie viele kN/s du schaffst mit allen Feineinstellungen.
Parent - By Clemens Keck Date 2019-02-07 17:21
ich tüftel noch. Spiele gerade ein online Turnier mit. 12min + 1 sec
Einmal hat sich der Rechner aufgehängt. Hab darauf hin den nncache erhöht.
Slowmover hab ich reduziert, lc0 geht arg knapp an die Zeit. Wenn die Gegner noch 4 Minuten haben ist lc0 schon unter 60sec.
Auf die TBs wird sehr spät und sehr wenig zugegriffen.
20-25kNs meist am Anfang der Partie, 30-50 kNs im Mittelspiel, peaks über 200kNs im Endspiel.


--backend=cudnn-fp16
--threads=4
--nncache=400000000
--move-overhead=600
--slowmover=0.900
--max-collision-events=1024
--minibatch-size=1024
--syzygy-paths=E:\syzygy-5;E:\6-wdl;E:\6-dtz

>C.K.

Up Topic Hauptforen / CSS-Forum / Lc0 setup Hilfe

Powered by mwForum 2.29.3 © 1999-2014 Markus Wichitill