LeelaChessZero / lc0

The rewritten engine, originally for tensorflow. Now all other backends have been ported here.
GNU General Public License v3.0
2.44k stars 529 forks source link

option for onnx threads #1848

Closed borg323 closed 1 year ago

borg323 commented 1 year ago

The onnxruntime thread usage is not playing well with our search threads, at least with onnx-cpu. Restricting each evaluation to a single thread seems to be a decent performance win for more that 2 search threads with onnxruntime 1.4.0, that uses threads more aggressively. Here I introduce a threads backend option that defaults to 1 for onnx-cpu and 0 (default) otherwise.