Skip to content
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

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

Merged
merged 13 commits into from
Jun 17, 2024
4 changes: 3 additions & 1 deletion .pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,9 @@ stages:

- script: |
set CUDA_PATH=$(Agent.TempDirectory)\v11.8
call .\build.bat -T cuda="%CUDA_PATH%" -DOCOS_ENABLE_CTEST=ON -DOCOS_USE_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=70;86^
call .\build.bat -T cuda="%CUDA_PATH%" -DOCOS_ENABLE_CTEST=ON^
-DCMAKE_CUDA_FLAGS_INIT=--allow-unsupported-compiler^
wenbingl marked this conversation as resolved.
Show resolved Hide resolved
-DOCOS_USE_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=70;86^
-DOCOS_ONNXRUNTIME_VERSION="$(ORT_VERSION)" -DONNXRUNTIME_PKG_DIR=.\onnxruntime-win-x64-gpu-$(ORT_VERSION)
displayName: build the customop library with onnxruntime

Expand Down
2 changes: 2 additions & 0 deletions .pyproject/cmdclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ def build_cmake(self, extension):
if sys.platform == "win32":
cuda_path = os.environ.get("CUDA_PATH")
cmake_args += [f'-T cuda={cuda_path}']
# TODO: temporarily add a flag for MSVC 19.40
cmake_args += ['-DCMAKE_CUDA_FLAGS_INIT=--allow-unsupported-compiler']
wenbingl marked this conversation as resolved.
Show resolved Hide resolved
f_ver = ext_fullpath.parent / "_version.py"
with f_ver.open('a') as _f:
_f.writelines(["\n", f"cuda = \"{cuda_ver}\"", "\n"])
Expand Down
13 changes: 13 additions & 0 deletions cmake/externals/opencv-no-rtti.patch
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,19 @@ index d95e5db163..db185453df 100644
include(cmake/OpenCVCompilerOptions.cmake)

ocv_cmake_hook(POST_COMPILER_OPTIONS)
diff --git a/cmake/OpenCVDetectCXXCompiler.cmake b/cmake/OpenCVDetectCXXCompiler.cmake
index 7f229cde96..92e204a5b9 100644
--- a/cmake/OpenCVDetectCXXCompiler.cmake
+++ b/cmake/OpenCVDetectCXXCompiler.cmake
@@ -171,7 +171,7 @@ elseif(MSVC)
wenbingl marked this conversation as resolved.
Show resolved Hide resolved
set(OpenCV_RUNTIME vc15)
elseif(MSVC_VERSION MATCHES "^192[0-9]$")
set(OpenCV_RUNTIME vc16)
- elseif(MSVC_VERSION MATCHES "^193[0-9]$")
+ elseif(MSVC_VERSION MATCHES "^19[34][0-9]$")
set(OpenCV_RUNTIME vc17)
else()
message(WARNING "OpenCV does not recognize MSVC_VERSION \"${MSVC_VERSION}\". Cannot set OpenCV_RUNTIME")
diff --git a/modules/core/include/opencv2/core/ocl.hpp b/modules/core/include/opencv2/core/ocl.hpp
index 4503fa00dd..642b0508d0 100644
--- a/modules/core/include/opencv2/core/ocl.hpp
Expand Down
Loading