File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -133,15 +133,19 @@ sedinplace 's/-fvisibility=hidden//g' cmake/CMakeLists.txt cmake/adjust_global_c
133133sedinplace ' s:/Yucuda_pch.h /FIcuda_pch.h::g' cmake/onnxruntime_providers_cuda.cmake cmake/onnxruntime_providers.cmake
134134# sedinplace 's/${PROJECT_SOURCE_DIR}\/external\/cub//g' cmake/onnxruntime_providers_cuda.cmake cmake/onnxruntime_providers.cmake
135135sedinplace ' s/-Xcompiler \/Zc:__cplusplus/-Xcompiler \/Zc:__cplusplus -Xcompiler \/Zc:preprocessor/g' cmake/onnxruntime_providers_cuda.cmake cmake/onnxruntime_providers_cuda_plugin.cmake
136- sedinplace ' /#include <sal.h>/i\
137- #ifndef WIN32_LEAN_AND_MEAN\
138- #define WIN32_LEAN_AND_MEAN\
139- #endif\
140- #ifndef NOMINMAX\
141- #define NOMINMAX\
142- #endif\
143- #include <windows.h>
144- ' onnxruntime/core/providers/cuda/cu_inc/cub.cuh
136+ CUDA_HOME_UNIX=" $CUDA_HOME "
137+ if command -v cygpath > /dev/null 2>&1 ; then
138+ CUDA_HOME_UNIX=" $( cygpath -u " $CUDA_HOME " ) "
139+ fi
140+ CUDA_TCGEN05_LD_H=" $CUDA_HOME_UNIX /include/cccl/cuda/__ptx/instructions/generated/tcgen05_ld.h"
141+ if [[ -f " $CUDA_TCGEN05_LD_H " ]]; then
142+ echo " Patching CUDA CCCL tcgen05_ld.h from $CUDA_TCGEN05_LD_H "
143+ mkdir -p onnxruntime/cuda/__ptx/instructions/generated
144+ cp " $CUDA_TCGEN05_LD_H " onnxruntime/cuda/__ptx/instructions/generated/tcgen05_ld.h
145+ sedinplace ' s/__out/__cccl_out/g' onnxruntime/cuda/__ptx/instructions/generated/tcgen05_ld.h
146+ else
147+ echo " CUDA CCCL tcgen05_ld.h not found at $CUDA_TCGEN05_LD_H "
148+ fi
145149sedinplace ' /CXX>:\/permissive/a\
146150 "$<$<COMPILE_LANGUAGE:CXX>:/Zc:preprocessor>"
147151' cmake/onnxruntime_providers_cuda.cmake cmake/onnxruntime_providers_cuda_plugin.cmake
You can’t perform that action at this time.
0 commit comments