conda-forge / onnxruntime-feedstock

A conda-smithy repository for onnxruntime.
BSD 3-Clause "New" or "Revised" License
1 stars 19 forks source link

Rebuild for CUDA 11.8 w/arch support with additional fixes #72

Closed traversaro closed 9 months ago

traversaro commented 1 year ago

Based on https://github.com/conda-forge/onnxruntime-feedstock/pull/71 with additional fixes.

Checklist

conda-forge-webservices[bot] commented 1 year ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

traversaro commented 1 year ago

@conda-forge-admin, please rerender

traversaro commented 1 year ago

Windows and aarch64 are failing with error:

[694/1181] Building CUDA object CMakeFiles/onnxruntime_providers_cuda.dir$SRC_DIR/onnxruntime/core/providers/cuda/generator/range_impl.cu.o
FAILED: CMakeFiles/onnxruntime_providers_cuda.dir$SRC_DIR/onnxruntime/core/providers/cuda/generator/range_impl.cu.o 
$BUILD_PREFIX/bin/nvcc -forward-unknown-to-host-compiler -DCPUINFO_SUPPORTED_PLATFORM=1 -DEIGEN_MPL2_ONLY -DEIGEN_USE_THREADS -DNSYNC_ATOMIC_CPP11 -DONNX_ML=1 -DONNX_NAMESPACE=onnx -DONNX_USE_LITE_PROTO=1 -DORT_ENABLE_STREAM -DPLATFORM_POSIX -DUSE_CUDA=1 -DUSE_FLASH_ATTENTION=1 -D_GNU_SOURCE -D__ONNX_NO_DOC_STRINGS -Donnxruntime_providers_cuda_EXPORTS -I$SRC_DIR/include/onnxruntime -I$SRC_DIR/include/onnxruntime/core/session -I$SRC_DIR/build-ci/Release/_deps/pytorch_cpuinfo-src/include -I$SRC_DIR/build-ci/Release/_deps/google_nsync-src/public -I$SRC_DIR/build-ci/Release -I$SRC_DIR/onnxruntime -I$SRC_DIR/build-ci/Release/_deps/abseil_cpp-src -I$SRC_DIR/build-ci/Release/_deps/safeint-src -I$SRC_DIR/build-ci/Release/_deps/gsl-src/include -I$SRC_DIR/build-ci/Release/_deps/onnx-src -I$SRC_DIR/build-ci/Release/_deps/onnx-build -I$SRC_DIR/build-ci/Release/_deps/protobuf-src/src -I$SRC_DIR/build-ci/Release/_deps/flatbuffers-src/include -I$PREFIX/include -I$SRC_DIR/build-ci/Release/_deps/cutlass-src/include -I$SRC_DIR/build-ci/Release/_deps/cutlass-src/examples -I$SRC_DIR/build-ci/Release/_deps/eigen-src -I/usr/local/cuda/targets/sbsa-linux/include -I$SRC_DIR/build-ci/Release/_deps/mp11-src/include --expt-relaxed-constexpr --Werror default-stream-launch -Xcudafe "--diag_suppress=bad_friend_decl" -Xcudafe "--diag_suppress=unsigned_compare_with_zero" -Xcudafe "--diag_suppress=expr_has_no_effect" -O3 -DNDEBUG -arch=all -Xcompiler=-fPIC --diag-suppress 554 --compiler-options -Wall --compiler-options -Wno-deprecated-copy --compiler-options -Wno-nonnull-compare -Xcompiler -Wno-nonnull-compare --threads 1 -Xcompiler -Wno-reorder -Xcompiler -Wno-error=sign-compare -MD -MT CMakeFiles/onnxruntime_providers_cuda.dir$SRC_DIR/onnxruntime/core/providers/cuda/generator/range_impl.cu.o -MF CMakeFiles/onnxruntime_providers_cuda.dir$SRC_DIR/onnxruntime/core/providers/cuda/generator/range_impl.cu.o.d -x cu -c $SRC_DIR/onnxruntime/core/providers/cuda/generator/range_impl.cu -o CMakeFiles/onnxruntime_providers_cuda.dir$SRC_DIR/onnxruntime/core/providers/cuda/generator/range_impl.cu.o
nvcc warning : The 'compute_35', 'compute_37', 'sm_35', and 'sm_37' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
$SRC_DIR/onnxruntime/core/providers/cuda/generator/range_impl.cu:4:10: fatal error: cub/cub.cuh: No such file or directory
    4 | #include <cub/cub.cuh>
      |          ^~~~~~~~~~~~~
compilation terminated.
traversaro commented 1 year ago

@conda-forge-admin, please rerender

github-actions[bot] commented 1 year ago

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you, but it looks like there was nothing to do.

This message was generated by GitHub actions workflow run https://github.com/conda-forge/onnxruntime-feedstock/actions/runs/6216127305.

traversaro commented 1 year ago

Some Win64 builds are still failing with:

[903/1768] Building CUDA object CMakeFiles\onnxruntime_providers_cuda.dir\D_\bld\onnxruntime_1694989450384\work\onnxruntime\core\providers\cuda\generator\range_impl.cu.obj
FAILED: CMakeFiles/onnxruntime_providers_cuda.dir/D_/bld/onnxruntime_1694989450384/work/onnxruntime/core/providers/cuda/generator/range_impl.cu.obj 
C:\PROGRA~1\NVIDIA~2\CUDA\v11.2\bin\nvcc.exe -forward-unknown-to-host-compiler -DCPUINFO_SUPPORTED_PLATFORM=1 -DEIGEN_HAS_CONSTEXPR -DEIGEN_HAS_CXX11_ATOMIC -DEIGEN_HAS_CXX11_MATH -DEIGEN_HAS_VARIADIC_TEMPLATES -DEIGEN_MPL2_ONLY -DEIGEN_STRONG_INLINE=inline -DEIGEN_USE_THREADS -DNOGDI -DNOMINMAX -DNTDDI_VERSION=0x0A000000 -DONNX_ML=1 -DONNX_NAMESPACE=onnx -DONNX_USE_LITE_PROTO=1 -DORT_ENABLE_STREAM -DPLATFORM_WINDOWS -DUSE_CUDA=1 -DWIN32_LEAN_AND_MEAN -DWINAPI_FAMILY=100 -DWINVER=0x0A00 -D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS -D_USE_MATH_DEFINES -D_WIN32_WINNT=0x0A00 -D__ONNX_NO_DOC_STRINGS -Donnxruntime_providers_cuda_EXPORTS -I%SRC_DIR%\include\onnxruntime -I%SRC_DIR%\include\onnxruntime\core\session -I%SRC_DIR%\build-ci\Release\_deps\pytorch_cpuinfo-src\include -I%SRC_DIR%\build-ci\Release -I%SRC_DIR%\onnxruntime -I%SRC_DIR%\build-ci\Release\_deps\abseil_cpp-src -I%SRC_DIR%\build-ci\Release\_deps\safeint-src -I%SRC_DIR%\build-ci\Release\_deps\gsl-src\include -I%SRC_DIR%\build-ci\Release\_deps\onnx-src -I%SRC_DIR%\build-ci\Release\_deps\onnx-build -I%SRC_DIR%\build-ci\Release\_deps\protobuf-src\src -I%SRC_DIR%\build-ci\Release\_deps\flatbuffers-src\include -I%PREFIX%\Library\include -I%SRC_DIR%\build-ci\Release\_deps\eigen-src -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\include" -I%SRC_DIR%\build-ci\Release\_deps\mp11-src\include -D_WINDOWS -Xcompiler=" /EHsc" --expt-relaxed-constexpr --Werror default-stream-launch -Xcudafe "--diag_suppress=bad_friend_decl" -Xcudafe "--diag_suppress=unsigned_compare_with_zero" -Xcudafe "--diag_suppress=expr_has_no_effect" -Xcompiler="-O2 -Ob2" -DNDEBUG -std=c++17 "--generate-code=arch=compute_35,code=[sm_35]" "--generate-code=arch=compute_37,code=[sm_37]" "--generate-code=arch=compute_50,code=[sm_50]" "--generate-code=arch=compute_52,code=[sm_52]" "--generate-code=arch=compute_53,code=[sm_53]" "--generate-code=arch=compute_60,code=[sm_60]" "--generate-code=arch=compute_61,code=[sm_61]" "--generate-code=arch=compute_62,code=[sm_62]" "--generate-code=arch=compute_70,code=[sm_70]" "--generate-code=arch=compute_72,code=[sm_72]" "--generate-code=arch=compute_75,code=[sm_75]" "--generate-code=arch=compute_80,code=[sm_80]" "--generate-code=arch=compute_86,code=[compute_86,sm_86]" -Xcompiler=-MD --diag-suppress 554 --compiler-options /utf-8 --compiler-options /sdl --compiler-options /experimental:external --compiler-options /external:W0 --compiler-options /external:templates- --compiler-options /external:ID:/bld/onnxruntime_1694989450384/work/cmake --compiler-options /external:ID:/bld/onnxruntime_1694989450384/work/build-ci/Release --compiler-options /wd4251 --compiler-options /wd4201 --compiler-options /wd5054 --compiler-options /w15038 -Xcompiler /guard:cf -Xcompiler /Qspectre -Xcompiler /wd4251 -Xcompiler /wd4201 -Xcompiler /wd5054 -Xcompiler /w15038 -Xcompiler /wd4834 -Xcompiler /wd4127 -MD -MT CMakeFiles\onnxruntime_providers_cuda.dir\D_\bld\onnxruntime_1694989450384\work\onnxruntime\core\providers\cuda\generator\range_impl.cu.obj -MF CMakeFiles\onnxruntime_providers_cuda.dir\D_\bld\onnxruntime_1694989450384\work\onnxruntime\core\providers\cuda\generator\range_impl.cu.obj.d -x cu -c %SRC_DIR%\onnxruntime\core\providers\cuda\generator\range_impl.cu -o CMakeFiles\onnxruntime_providers_cuda.dir\D_\bld\onnxruntime_1694989450384\work\onnxruntime\core\providers\cuda\generator\range_impl.cu.obj -Xcompiler=-FdCMakeFiles\onnxruntime_providers_cuda.dir\,-FS
%PREFIX%\Library\include\cuda\std\detail/libcxx/include/type_traits(4842): error: identifier "__builtin_is_constant_evaluated" is undefined

%PREFIX%\Library\include\cuda\std\detail/libcxx/include/type_traits(4847): error: identifier "__builtin_is_constant_evaluated" is undefined

2 errors detected in the compilation of "D:/bld/onnxruntime_1694989450384/work/onnxruntime/core/providers/cuda/generator/range_impl.cu".

nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).

range_impl.cu

[904/1768] Building CUDA object CMakeFiles\onnxruntime_providers_cuda.dir\D_\bld\onnxruntime_1694989450384\work\onnxruntime\core\providers\cuda\generator\random_impl.cu.obj
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).

random_impl.cu

[905/1768] Building CUDA object CMakeFiles\onnxruntime_providers_cuda.dir\D_\bld\onnxruntime_1694989450384\work\onnxruntime\core\providers\cuda\math\binary_elementwise_ops_impl.cu.obj
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).

binary_elementwise_ops_impl.cu
cbourjau commented 12 months ago

It appears that the update to onnxruntime 1.16.0 requires a bump of the Windows compiler toolchain to vs2022 (see https://github.com/conda-forge/onnxruntime-feedstock/pull/74). Might either or both (update to 1.16.0 and/or vs2022) help with the Windows issue you are seeing here?

traversaro commented 12 months ago

It appears that the update to onnxruntime 1.16.0 requires a bump of the Windows compiler toolchain to vs2022 (see #74). Might either or both (update to 1.16.0 and/or vs2022) help with the Windows issue you are seeing here?

I am not sure, but I guess it is worth trying it after the update.

jakirkham commented 10 months ago

@conda-forge-admin , please re-render

conda-forge-webservices[bot] commented 10 months ago

Hi! This is the friendly automated conda-forge-linting service.

I was trying to look for recipes to lint for you, but it appears we have a merge conflict. Please try to merge or rebase with the base branch to resolve this conflict.

Please ping the 'conda-forge/core' team (using the @ notation in a comment) if you believe this is a bug.

jakirkham commented 9 months ago

CUDA 11.8 was just added in this PR: https://github.com/conda-forge/onnxruntime-feedstock/pull/87

Are there other fixes we should incorporate from here?

traversaro commented 9 months ago

CUDA 11.8 was just added in this PR: #87

Are there other fixes we should incorporate from here?

I quickly checked and it seems no, let's close.

jakirkham commented 9 months ago

Thanks Silvio! 🙏

If we do find something still needed, we can always follow up 🙂