Skip to content

[Discussion / Feedback] ONNX Backend: Benchmarks, Questions, and Issues #1238

Description

@seniorfish

This issue is to collect discussions and feedback regarding the ONNX backend. Feel free to post your thoughts.

#1234 has been merged, bringing large speedups on Intel GPUs and NPUs, as well as a generic DirectML backend that may perform better than OpenCL on the latest transformer models.

Prebuilt DirectML binaries are available at https://github.com/lightvector/KataGo/actions/workflows/onnx-backend.yml. Open the latest run and download the files you need from artifacts.

The OpenVINO backend is currently only built when lightvector manually triggers a run or tags a commit. If you want to test it, you can use https://github.com/seniorfish/KataGo/releases/tag/v1.17.2-onnx-openvino, but note that this is not the latest version. For configuration, you can refer to gtp_example.cfg.

Future plans:

  1. There are reports that the NPU backend is not working on the largest b40 net; I will investigate this. If the backend crashes on your device, please let me know.
  2. Optimize the OpenVINO batching strategy and fine-tune config options, which may require more benchmark data across various processors.
  3. onnxbackend.cpp seems a bit messy with many special cases in the code. I might look into refactoring it for better maintainability as more execution providers might be added in the future.
  4. Discuss the possibility of adding more Execution Providers supported by ONNX Runtime. Examples have already come up: MIGraphX (Add MIGraphX backend for AMD GPUs (ROCm) — 2.94x over OpenCL on MI300X #1235) and WebAssembly (Add ONNX Runtime backend support (OpenVINO / DirectML / TensorRT / CPU, Windows & Linux) #1222 (comment)). I think running KataGo in the browser would be very interesting.
  5. Take suggestions posted under this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions