diff --git a/recipes/onnxruntime/all/conandata.yml b/recipes/onnxruntime/all/conandata.yml index 1672c0e2e1979..66ce2b680bc25 100644 --- a/recipes/onnxruntime/all/conandata.yml +++ b/recipes/onnxruntime/all/conandata.yml @@ -25,6 +25,9 @@ patches: - patch_file: "patches/1.18.0-0004-abseil-no-string-view.patch" patch_description: "allow to build with abseil built without c++17 support" patch_type: "portability" + - patch_file: "patches/1.19.0-0005-fix-cutlass-cuda-provider.patch" + patch_description: "use cutlass from Conan" + patch_type: "portability" "1.18.1": - patch_file: "patches/1.17.3-0002-missing-include.patch" patch_description: "add missing '' include when abseil is built without c++17 support" @@ -80,6 +83,7 @@ patches: # ONNX versions are based on the minor version used at # https://github.com/microsoft/onnxruntime/tree/main/cmake/external onnx_version_map: + "1.19.0": "1.16.2" "1.18.1": "1.16.2" "1.17.3": "1.15.0" "1.16.3": "1.14.1" diff --git a/recipes/onnxruntime/all/conanfile.py b/recipes/onnxruntime/all/conanfile.py index ce3b31cb93581..1fffe28754fe5 100644 --- a/recipes/onnxruntime/all/conanfile.py +++ b/recipes/onnxruntime/all/conanfile.py @@ -193,7 +193,7 @@ def _patch_sources(self): if Version(self.version) >= "15.0": replace_in_file(self, os.path.join(self.source_folder, "cmake", "CMakeLists.txt"), "if (Git_FOUND)", "if (FALSE)") - if Version(self.version) >= "1.17": + if Version(self.version) >= "1.17" and Version(self.version) < "1.19": # https://github.com/microsoft/onnxruntime/commit/5bfca1dc576720627f3af8f65e25af408271079b replace_in_file(self, os.path.join(self.source_folder, "cmake", "onnxruntime_providers_cuda.cmake"), 'option(onnxruntime_NVCC_THREADS "Number of threads that NVCC can use for compilation." 1)', diff --git a/recipes/onnxruntime/all/patches/1.19.0-0005-fix-cutlass-cuda-provider.patch b/recipes/onnxruntime/all/patches/1.19.0-0005-fix-cutlass-cuda-provider.patch new file mode 100644 index 0000000000000..045674fc7bdd6 --- /dev/null +++ b/recipes/onnxruntime/all/patches/1.19.0-0005-fix-cutlass-cuda-provider.patch @@ -0,0 +1,15 @@ +diff --git a/cmake/onnxruntime_providers_cuda.cmake b/cmake/onnxruntime_providers_cuda.cmake +index 0829be05a3..c16dfd9e52 100644 +--- a/cmake/onnxruntime_providers_cuda.cmake ++++ b/cmake/onnxruntime_providers_cuda.cmake +@@ -217,8 +217,8 @@ + target_link_libraries(${target} PRIVATE CUDA::cuda_driver) + endif() + +- include(cutlass) +- target_include_directories(${target} PRIVATE ${cutlass_SOURCE_DIR}/include ${cutlass_SOURCE_DIR}/examples ${cutlass_SOURCE_DIR}/tools/util/include) ++ find_package(NvidiaCutlass) ++ target_link_libraries(${target} PRIVATE nvidia::cutlass::cutlass) + + target_include_directories(${target} PRIVATE ${ONNXRUNTIME_ROOT} ${CMAKE_CURRENT_BINARY_DIR} ${eigen_INCLUDE_DIRS} ${TVM_INCLUDES} + PUBLIC ${CUDAToolkit_INCLUDE_DIRS})