supertone-inc / onnxruntime-build

A build project for ONNX Runtime
29 stars 13 forks source link

How to support GPU #13

Closed ImmortalD closed 5 months ago

ImmortalD commented 5 months ago

When using the CUDAExecutionProvider, it was found that this static library is not supported. Can it be supported?

2024-04-22T07:54:43.030732Z  WARN apply_execution_providers: ort::execution_providers: An error occurred when attempting to register `CUDAExecutionProvider`: CUDA execution provider is not enabled in this build.
2024-04-22T07:54:43.030949Z  WARN apply_execution_providers: ort::execution_providers: No execution providers registered successfully. Falling back to CPU.
krazijames commented 5 months ago

We're sorry for that we cannot directly support this now. But maybe you can build this library with CUDA EP by running build-static_lib.sh with appropriate CMAKE_OPTIONS env variable. Please refer to https://onnxruntime.ai/docs/build/eps.html#cuda and https://github.com/microsoft/onnxruntime/blob/56b660f36940a919295e6f1e18ad3a9a93a10bf7/tools/ci_build/build.py to find out required CMake variables.