LeelaChessZero / lc0

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

add support for onnxruntime-rocm to the onnx backend #1897

Closed borg323 closed 1 year ago

borg323 commented 1 year ago

This adds support for onnxruntime-rocm to the onnx backend. Note that not all amd gpus are supported, see supported gpus. Notably, tests with a 7900XTX failed, but it is likely those gpus will be added soon (https://github.com/ROCmSoftwarePlatform/MIOpen/issues/2097#issuecomment-1542364392). During testing we also found the onnxruntime Run() call requires locking (like DirectML) even though this is undocumented. Finally there is support for building lc0 with a locally built onnxruntime, as the header files are in different locations.