microsoft / onnxruntime-extensions

onnxruntime-extensions: A specialized pre- and post- processing library for ONNX Runtime
MIT License
295 stars 80 forks source link

Fix the pipeline breaks dues to the MSVC 19.40 and numpy 2.0 release #747

Closed wenbingl closed 2 weeks ago

wenbingl commented 2 weeks ago

inspired by this PR: https://github.com/microsoft/onnxruntime/pull/21004

wenbingl commented 2 weeks ago

@snnn any idea why the following command line doesn't work

2024-06-14T23:22:52.1858496Z "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -S D:\a_work\1\s -B .scb\temp.win-amd64-cpython-312\Release -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=D:\a_work\1\s.scb\lib.win-amd64-cpython-312\onnxruntime_extensions -DOCOS_ENABLE_CTEST=OFF -DOCOS_BUILD_PYTHON=ON -DOCOS_PYTHON_MODULE_PATH=D:\a_work\1\s.scb\lib.win-amd64-cpython-312\onnxruntime_extensions_extensions_pydll.cp312-win_amd64.pyd -DCMAKE_BUILD_TYPE=Release -DOCOS_USE_CUDA=ON "-T cuda=D:\a_work_temp\v11.8" -DCMAKE_CUDA_FLAGS_INIT=--allow-unsupported-compiler -DCMAKE_CUDA_ARCHITECTURES=70;86

snnn commented 2 weeks ago

Use the latest cmake

snnn commented 2 weeks ago

Remove "python -m pip install cmake"

snnn commented 2 weeks ago

The machine already has cmake

snnn commented 2 weeks ago

Do not use C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe Use

 C:\Program Files\CMake\bin\cmake.exe
snnn commented 2 weeks ago

I deleted one of the cmake from the VM image. Then one of the failed pipelines passed.

wenbingl commented 2 weeks ago

I deleted one of the cmake from the VM image. Then one of the failed pipelines passed.

Why is there no C:\program files\cmake... in CUDA Windows machine?

snnn commented 2 weeks ago

I deleted one of the cmake from the VM image. Then one of the failed pipelines passed.

Why is there no C:\program files\cmake... in CUDA Windows machine?

It shouldn't. Could you give me a link of the log?

wenbingl commented 2 weeks ago

I deleted one of the cmake from the VM image. Then one of the failed pipelines passed.

Why is there no C:\program files\cmake... in CUDA Windows machine?

It shouldn't. Could you give me a link of the log?

There is no direct log. Python code detected ProgramFiles/CMake firstly then falled back to VS/cmake. In this log, https://dev.azure.com/onnxruntime/onnxruntime/_build/results?buildId=1409852&view=logs&j=1130dc32-b83a-5b28-25cb-8e5ca42e48d6&t=524fdcc1-2f40-5737-3487-03bf6009139b, it did fallback to vs/cmake.

woinck commented 1 week ago

Hi @wenbingl , CMake 3.30 is failing with this PR due to this line: https://github.com/microsoft/onnxruntime-extensions/blob/3b275b16bc7a11fb89f82546d1209a161ab057ca/CMakeLists.txt#L41 I think it's because it's missing SET argument in cmake_policy. Is it possible to fix it? Thanks!

wenbingl commented 1 week ago

Hi @wenbingl , CMake 3.30 is failing with this PR due to this line:

https://github.com/microsoft/onnxruntime-extensions/blob/3b275b16bc7a11fb89f82546d1209a161ab057ca/CMakeLists.txt#L41

I think it's because it's missing SET argument in cmake_policy. Is it possible to fix it? Thanks!

Thanks for the reporting, here is the fixing: https://github.com/microsoft/onnxruntime-extensions/pull/754