-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable cuda feature in onnxruntime package #5
Conversation
As expected the build is failing with:
|
Cool, now the compilation works fine but apparently just compiling in Debug mode takes ~3 hours, and so the compilation fails due to running out of time in ~6 hours:
|
Let's pivot the PR to try to compile onnxruntime with cuda support to check if that takes less time. |
As suggested in https://answers.opencv.org/question/5090/why-opencv-building-is-so-slow-with-cuda/, probably we could modify the opencv port to compile only the specific cuda architectures we are interested (by checking our dev systems and the deploy systems). |
Build is now failing:
We need to either debug on a machine or upload the logs. |
The error is:
Probably this happens due to this snippet of code: https://github.com/microsoft/onnxruntime/blob/v1.15.1/cmake/external/onnxruntime_external_deps.cmake#L283-L297 , in which for CUDA only the custom downloaded GSL is supported, as there is added this patch: https://github.com/microsoft/onnxruntime/blob/3649376f09d238394cf0c22de14db3f4e8c11310/cmake/patches/gsl/1064.patch#L4 . The patch was contributed upstream in microsoft/GSL#1064, but unfortunatly no release was done since that PR was merged. So we need to also prepare a different version of this port with that patch included. |
Locally I am encountering microsoft/onnxruntime#16942, but this should not be a problem in the CI were we are using CUDA 12.1.0 . |
Now it fails with:
|
New error:
|
The problem is that the cutlass dependency is not properly handled, and so the corresponding header are not found. Apparently, it is a dependency required by attention/transformers related code (see https://github.com/microsoft/onnxruntime/blob/063e9054b8056037c6c2af8de7acd0b66dadbac9/cmake/onnxruntime_providers.cmake#L533, not that they also include an header of an example, so in general it would be difficult to handled that via find_package). At at the moment we are not interested in transformers/LLM for this specific package, we can just disable the |
However, just for knoledge. The changes in the patches seems to be upstreamed in NVIDIA/cutlass@1eef5c3 and other changes, so probably just using cutlass 3.2 would be a good one to use via find_package . |
The new error is:
This error is just microsoft/onnxruntime#16000 and I had already encountered in conda-forge/onnxruntime-feedstock#63 (comment) . I can just bring the same patch also here. |
CI successful in ~3 h and 22 minutes. Let's merge, we can then try also to build static triplet in a new PR. |
No description provided.