Open alando46 opened 5 days ago
Hi! We're building for Win-x64 in our CI all the time, for example this.
Could you try cleaning all then perform a CPU build first? Just python build.py --parallel
should do
@skyline75489 thanks for your help. I can confirm cpu build works fine for Release and ReleaseWithDebInfo, however & ".\build.bat" --config Release --update --build --ort_home "C:\Users\music\code\onnxruntime-genai\ort_cuda_v12.6_build_dir" --skip_wheel --skip_tests --parallel --use_cuda --cuda_home "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6"
fails with the same error as above.
maybe these are only compatible with cuda 12.2? unfortunately MSVC 14.38.33130 is a hard requirement for me so hopefully that's not the issue.
It could be the CUDA version. I'm not sure. But good to hear that CPU build works. Unfortunately, we don't have support for 12.6 at this moment. Adding CUDA 12.6 support would require upstream project, that is ORT itself, to supports 12.6. Otherwise, it doesn't make much sense, right?
I will try tomorrow with 12.2. For what it's worth, main of ORT compiles with 12.6 and cuDNN 9.5. Thanks again for your help @skyline75489, i will update here when i try 12.2.
Thanks for your feedback! If you find anything wrong with the code, feel free to contact us.
I wonder if it has anything to do with the cxx standard we use to build cuda: https://github.com/microsoft/onnxruntime-genai/blob/d4d3a88dcce8336a1c4635fbbe2225951955e5ea/cmake/cxx_standard.cmake#L5-L7
Could you change that to set(CMAKE_CXX_STANDARD 20) and remove the add_compile_definitions(USE_CXX17=1) for cuda builds? Let me know if that fixes it for you.
@skyline75489 @baijumeswani thanks again for your help. I tried:
for reference, the updated cmake/cxx_standard.cmake is:
if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_LESS 10)
add_compile_definitions(USE_CXX17=1)
message("Test is using C++17 because GCC Version is less than 10")
set(CMAKE_CXX_STANDARD 17)
elseif (USE_CUDA AND CMAKE_CUDA_COMPILER)
set(CMAKE_CXX_STANDARD 20)
elseif (ANDROID)
add_compile_definitions(USE_CXX17=1)
set(CMAKE_CXX_STANDARD 17)
else ()
message("Test is using C++20")
set(CMAKE_CXX_STANDARD 20)
endif ()
and the errors are still:
Generating Code...
C:\Users\music\code\onnxruntime-genai\ortgenai_cuda_v12.2_build_dir\build\Windows\Release\_deps\onnxruntime_extensions-src\operators\audio\audio_decoder.cc(177,38): error C2653:
'ort_extensions': is not a class or namespace name [C:\Users\music\code\onnxruntime-genai\ortgenai_cuda_v12.2_build_dir\build\Windows\Release\_deps\onnxruntime_extensions-build
\noexcep_operators.vcxproj]
C:\Users\music\code\onnxruntime-genai\ortgenai_cuda_v12.2_build_dir\build\Windows\Release\_deps\onnxruntime_extensions-src\operators\audio\audio_decoder.cc(177,54): error C2065:
'narrow': undeclared identifier [C:\Users\music\code\onnxruntime-genai\ortgenai_cuda_v12.2_build_dir\build\Windows\Release\_deps\onnxruntime_extensions-build\noexcep_operators.
vcxproj]
C:\Users\music\code\onnxruntime-genai\ortgenai_cuda_v12.2_build_dir\build\Windows\Release\_deps\onnxruntime_extensions-src\operators\audio\audio_decoder.cc(177,61): error C2275:
'int64_t': expected an expression instead of a type [C:\Users\music\code\onnxruntime-genai\ortgenai_cuda_v12.2_build_dir\build\Windows\Release\_deps\onnxruntime_extensions-buil
d\noexcep_operators.vcxproj]
Traceback (most recent call last):
could this be related to my Release
build target for ort and ortgenai? I noticed for the nugget builds you are doing RelWithDebInfo
.
if helpful, i am pulling a fresh copy of the repo on every build so there shouldn't be any cmake caching issues.
is there a way to exclude building these audio components? for my usecase they aren't even needed so maybe i can skip them in the build process. the other day i tried making some changes to one of the CMakeFiles in the extensions to disable audio but i don't think i did it properly because it was still hitting this error. I also don't need opencv, maybe down the road an option to build for chat only would be helpful.
anyways, thanks for your help in debugging this issue. much appreciated.
I'm having a difficult time sorting out an issue related to the audio extensions when compiling onnxruntime-genai from source. my build command is:
Eventually this exits after hitting:
It looks like the error is coming from this line, although I'm not seeing any related issues in onnxruntime-extensions so I assume this is stemming from how i built onnxruntime or perhaps the arguments i passed when building onnxruntime-genai.
Is there anything obvious that I'm missing? Thanks in advance for any suggestions.