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

support cuda 12, rerender build #29

Merged
merged 23 commits into from
Jul 15, 2024
Merged

Conversation

tlambert03
Copy link
Member

@tlambert03 tlambert03 commented Nov 18, 2023

This updates stuff for CUDA 12.

one casualty is the camcor.cu file which provides camera correction code (which probably doesn't need to be in this library anyway, but I could update it again if need be).

cmakelists is simplified as well to take advantage of built in cuda support

@tlambert03
Copy link
Member Author

hey @jakirkham, I'm trying to resolve the cuda12 issue in this PR. (this PR both rerenders the build for our own testing on CI, and attempts to resolve the problems)

I have two questions at the moment:

  1. Do my changes in this file look like the appropriate way to update my usage of textures? https://github.com/scopetools/cudadecon/pull/29/files#diff-9abc71004e1c0d79515d58fc17ac3f7eed7ee6de7cbf08d02c9aa7f37afcbd06. Note, in addition to using a cudaTextureObject, I no longer use a global pointer, but rather create and destroy the texture object inside of the respective functions and pass the object to the kernel
  2. i'm still getting the following error in the build logs for cuda12
    [ 28%] Building NVCC (Device) object CMakeFiles/libcudaDecon.dir/libcudaDecon_generated_geometryTransform.cu.o
    nvcc warning : incompatible redefinition for option 'compiler-bindir', the last value of this option was used
    nvcc warning : incompatible redefinition for option 'compiler-bindir', the last value of this option was used
    sh: cicc: command not found
    CMake Error at libcudaDecon_generated_geometryTransform.cu.o.Release.cmake:280 (message):
      Error generating file
      /home/conda/feedstock_root/build_artifacts/cudadecon_1700321515453/work/cmake_build/CMakeFiles/libcudaDecon.dir//./libcudaDecon_generated_geometryTransform.cu.o
    

from the nvidia forum it seems to suggest that cuda wasn't installed setup correctly?

@tlambert03
Copy link
Member Author

perhaps relevant info, I also updated the conda_build_config in this PR, to try to match the ci_support files that were getting generated in conda-forge/cudadecon-feedstock#27 ... so might have made an error there

@jakirkham
Copy link

jakirkham commented Nov 28, 2023

Sorry for the delay Talley

So cicc should be in $BUILD_PREFIX/nvvm/bin/cicc (for reference) also it should be accessible from $BUILD_PREFIX/targets/x86_64-linux/nvvm/bin/cicc as we symlink nvvm there (please see this reference)

It seems like CMake (IIUC where cicc is called from) expects cicc to be on the path. So we could manually add it to the $PATH. Admittedly that is a bit of a hack, but it would at least help us confirm what is happening

Know that only answers half of your question. Though let's start there and see how things go

@tlambert03 tlambert03 changed the title rerender build, add cuda 12 to config support cuda 12, rerender build Nov 28, 2023
@tlambert03
Copy link
Member Author

thanks @jakirkham. Things look to be building well now on both cuda 11 and 12!

  • I added export PATH="$PATH:$BUILD_PREFIX/nvvm/bin/" to recipe/build.sh

  • I had to use gcc 10 to build cuda 12, otherwise (with gcc12) i get:

    /lattice/home/tjl10/mambaforge/envs/cbuild/x86_64-conda-linux-gnu/include/c++/12.3.0/type_traits:77:52: error: redefinition of 'constexpr const _Tp std::integral_constant<_Tp, __v>::value'
       77 |   template<typename _Tp, _Tp __v>
          |                                                    ^                           
    /lattice/home/tjl10/mambaforge/envs/cbuild/x86_64-conda-linux-gnu/include/c++/12.3.0/type_traits:64:29: note: 'constexpr const _Tp value' previously declared here
       64 |       static constexpr _Tp                  value = __v;
          |                             ^~~~~
    CMake Error at libcudaDecon_generated_geometryTransform.cu.o.Release.cmake:280 (message):
      Error generating file
    

@jakirkham
Copy link

Huzzah! 🎉

Thanks Talley! 🙏

Do you happen to have the log where GCC 12 didn't work?

Also curious would GCC 11 work?

@tlambert03
Copy link
Member Author

@jakirkham
Copy link

jakirkham commented Nov 28, 2023

Thanks Talley! 🙏

Ah one other thing...

Noted we are using find_package(CUDA). Though this is deprecated

find_package(CUDA REQUIRED)

Could we instead use enable_language(CUDA) and find_package(CUDAToolkit REQUIRED)?

IOW making a change like this?

- find_package(CUDA REQUIRED) 
+ enable_language(CUDA)
+ find_package(CUDAToolkit REQUIRED)

@tlambert03
Copy link
Member Author

I actually did try to do that briefly in 6722213

it worked for linux, but failed to find cuComplex.h for windows ... I tried to get a similar thing happening locally, but wasn't successful so I reverted. But I think it's very close... maybe you have thoughts?

@jakirkham
Copy link

Maybe I missed it, but was find_package(CUDAToolkit REQUIRED) added in that change somewhere?

@tlambert03
Copy link
Member Author

Nope! I'll try that

@robertmaynard
Copy link

Thanks Talley! 🙏

Ah one other thing...

Noted we are using find_package(CUDA). Though this is deprecated

find_package(CUDA REQUIRED)

Could we instead use enable_language(CUDA) and find_package(CUDAToolkit REQUIRED)?

IOW making a change like this?

- find_package(CUDA REQUIRED) 
+ enable_language(CUDA)
+ find_package(CUDAToolkit REQUIRED)

That is insufficient, as cudadecon uses functions like CUDA_ADD_EXECUTABLE which are also deprecated. The project will need to port the following:

  • Remove cuda_add calls and instead use add_library and add_executable
  • Switch CUDA_NVCC_FLAGS to either CMAKE_CUDA_FLAGS or target_compile_options with a CUDA generator expression
  • Drop add_dependencies as not needed now
  • Switch CUDA_ADD_CUFFT_TO_TARGET to target_link_libraries(<target> PRIVATE CUDA::cufft) ( combined with a call to find_package(CUDAToolkit REQUIRED)
  • Bump your minimum required to CMake 3.20 as this is required for CUDAToolkit

@tlambert03
Copy link
Member Author

yeah, 6722213 had all of those changes ... (it didn't just use enable language). i just left out the call to find_package(CUDAToolkit...)

@tlambert03
Copy link
Member Author

It looks like adding find package cudatoolkit didn't resolve the missing complex.h issue on windows. Linux works fine though. @robertmaynard Any thoughts on what I might be missing?

@robertmaynard
Copy link

It looks like adding find package cudatoolkit didn't resolve the missing complex.h issue on windows. Linux works fine though. @robertmaynard Any thoughts on what I might be missing?

The RL-Biggs-Andrews.cpp is a C++ source file and therefore not being compiled by nvcc. So the include paths aren't being properly setup for this compilation since the CUDA sources get the include for 'free' since the include is implicit in nvcc. IIRC conda sets up this include as a C++ include for Linux so that is why you aren't seeing the failure there.

Your failures with 672221384e648e78dc2cc2a64f91ec303c00cb90 are also due to to trying to use find_library directly to locate cufft as by default find_library won't search where the CUDA toolkit is normally installed. If you had used the CUDA::cufft target from find_package(CUDAToolkit) that properly link to the correct cufft, and also the other needed linux libraries such as rt ( which you could therefore drop from your CMakeLists.txt ).

By linking to the CUDA::cufft target you also bring in the needed compiler include flags to find the headers, so your RL-Biggs-Andrews.cpp would be able to find the cuComplex header.

In general when using C++ and the CUDA toolkit you want to use find_package(CUDAToolkit REQUIRED) and also expand your target_link_libraries to capture the CUDA components you are using. At a minimum this might be CUDA::toolkit which would be just the headers if you aren't launching kernels or calling library functions

Comment on lines +3 to +4
export PATH="$PATH:$BUILD_PREFIX/nvvm/bin/"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am curious if we still need this after the CMake changes

Suggested change
export PATH="$PATH:$BUILD_PREFIX/nvvm/bin/"
# todo: see if we can drop this and still find `cicc`
# export PATH="$PATH:$BUILD_PREFIX/nvvm/bin/"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The above changes won't fix this, as CMake isn't what is invoking cicc. This points to some issue with the env

I thought nvcc needs to be in the HOST not BUILD as it doesn't change when cross-compiling

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvcc needs to be in requirements/build as it is a build tool

Independent of that nvcc still has some content that that could depend on the target architecture ( conda-forge/cuda-nvcc-impl-feedstock#4 )

We do add nvvm/bin to the path in nvcc.profile. Is it possible this path needs to be changed? If so, is there a good way to check what nvcc thinks this path is now?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvcc needs to be in requirements/build as it is a build tool

👍 I must be mixing things up. Looking at other projects the bigger difference is they are using {{ compiler('cuda') }} and not directly the cuda-nvcc package. That might the source of the issue

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good. It can be confusing 😅

Yeah {{ compiler('cuda') }} is Jinja {{ }} with a special function compiler, which takes the str provided (in this case cuda) and appends _compiler to that to form the variant key (so cuda_compiler). It then uses this variant key to look for what cuda_compiler should be. There are a few places it will look for this variant key one being conda_build_config.yaml, which in this case specifies these options:

cuda_compiler:
- nvcc
- cuda-nvcc

nvcc refers to conda-forge/nvcc-feedstock, which we used for CUDA 11 builds. cuda-nvcc refers to conda-forge/cuda-nvcc-feedstock, which we have added for CUDA 12. Depending on whether a CUDA 11 or 12 build is done, it will pick from these

There is one last step where conda-build converts the cuda_compiler selected into the compiler used, which is it adds _{{ target_platform }} to it. IOW nvcc would become nvcc_linux-64 for builds targeting Linux x86_64 on CUDA 11. Or cuda-nvcc would become cuda-nvcc_linux-aarch64 for builds targeting Linux ARM 64-bit. The package installed will be selected to run on the build platform

Hopefully that makes more sense

@tlambert03
Copy link
Member Author

thanks a lot for your time @robertmaynard, much appreciated. Yeah I switched the CUDA::cufft syntax in 9379425 ... and i did at least get different errors on windows 😂

I'll reread your comments, and keep digging a bit. thanks again both!

@robertmaynard
Copy link

thanks a lot for your time @robertmaynard, much appreciated. Yeah I switched the CUDA::cufft syntax in 9379425 ... and i did at least get different errors on windows 😂

I'll reread your comments, and keep digging a bit. thanks again both!

Happy to help. It looks like the Buffer target needs to link to CUDA::toolkit as it includes cuda headers / functions

@jakirkham
Copy link

Were you able to make more progress here Talley?

No worries if not. Just wanted to check in 🙂

@tlambert03
Copy link
Member Author

ahh, shoot :) dropped the ball again didn't I @jakirkham 😂
Last time we were going back and forth I was just about to head off for a work trip, then (you know how it goes) never got back to this. So, it's about where I left it above. I think I was close though!

@LourensVeen
Copy link

I'm seeing this too, and I think it's because nvcc.profile isn't found. More at conda-forge/cuda-nvcc-impl-feedstock#9 (comment)

@tlambert03
Copy link
Member Author

thanks so much for commenting here @LourensVeen, I appreciate it.

I see in that thread you said:

Adding a symlink at ${CONDA_PREFIX)/targets/x86_64-linux/bin/nvcc.profile to ${CONDA_PREFIX}/bin/nvcc.profile fixes the problem.

and

I've now also added a symlink for the bin/crt directory, to avoid errors linking code that uses the driver API with the stubs.

sorry to ask a basic question: but can can you clarify where you're adding those symlinks? That is, if I'd like to manually patch things so as to get this building on CI again, how might I directly modify my own recipe (or ci_support or other files)

@tlambert03
Copy link
Member Author

tlambert03 commented Jul 15, 2024

@jakirkham, i've actually got one working windows build now! (on cuda12) 🎉

can you spot why it might not be working with cuda11.2?

2024-07-15T16:02:23.3769403Z %SRC_DIR%>pushd C:\Program Files\Microsoft Visual Studio\2022\Enterprise\ 
2024-07-15T16:02:23.3778792Z 
2024-07-15T16:02:23.3779488Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise>CALL "VC\Auxiliary\Build\vcvars64.bat" -vcvars_ver=14.29 10.0.22621.0 
2024-07-15T16:02:24.1200070Z **********************************************************************
2024-07-15T16:02:24.1200677Z ** Visual Studio 2022 Developer Command Prompt v17.10.3
2024-07-15T16:02:24.1201492Z ** Copyright (c) 2022 Microsoft Corporation
2024-07-15T16:02:24.1201850Z **********************************************************************
2024-07-15T16:02:30.1211150Z [vcvarsall.bat] Environment initialized for: 'x64'
2024-07-15T16:02:47.1800214Z -- The CXX compiler identification is MSVC 19.29.30154.0
2024-07-15T16:03:01.6586890Z -- The CUDA compiler identification is NVIDIA 11.2.152
2024-07-15T16:03:01.6798924Z -- Detecting CXX compiler ABI info
2024-07-15T16:03:05.2881976Z -- Detecting CXX compiler ABI info - done
2024-07-15T16:03:05.3039546Z -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64/cl.exe - skipped
2024-07-15T16:03:05.3045166Z -- Detecting CXX compile features
2024-07-15T16:03:05.3060648Z -- Detecting CXX compile features - done
2024-07-15T16:03:05.3151602Z -- Detecting CUDA compiler ABI info
2024-07-15T16:03:08.9562844Z -- Detecting CUDA compiler ABI info - done
2024-07-15T16:03:09.0035901Z -- Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2/bin/nvcc.exe - skipped
2024-07-15T16:03:09.8329724Z -- Detecting CUDA compile features
2024-07-15T16:03:09.8339225Z -- Detecting CUDA compile features - done
2024-07-15T16:03:10.7383358Z -- Found OpenMP_CXX: -openmp (found version "2.0")
2024-07-15T16:03:10.7389772Z -- Found OpenMP: TRUE (found version "2.0")
2024-07-15T16:03:10.7440070Z -- Tiff Library: D:/bld/cudadecon_1721059005793/_h_env/Library/lib/tiff.lib
2024-07-15T16:03:10.7440490Z CMake Warning (dev) at CMakeLists.txt:117 (find_package):
2024-07-15T16:03:10.7440748Z -- FFTW3 Library: fftw3f
2024-07-15T16:03:10.7441265Z   Policy CMP0167 is not set: The FindBoost module is removed.  Run "cmake
2024-07-15T16:03:10.7441760Z   --help-policy CMP0167" for policy details.  Use the cmake_policy command to
2024-07-15T16:03:10.7442105Z   set the policy and suppress this warning.
2024-07-15T16:03:10.7442289Z 
2024-07-15T16:03:10.7442836Z This warning is for project developers.  Use -Wno-dev to suppress it.
2024-07-15T16:03:10.7443078Z 
2024-07-15T16:03:10.7669579Z -- Found Boost: D:/bld/cudadecon_1721059005793/_h_env/Library/lib/cmake/Boost-1.82.0/BoostConfig.cmake (found version "1.82.0") found components: program_options filesystem system
2024-07-15T16:03:10.7741177Z -- Found CUDAToolkit: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2/include (found version "11.2.152")
2024-07-15T16:03:12.8375571Z -- CUDA version : 11.2.152
2024-07-15T16:03:12.8423688Z -- Configuring done (42.6s)
2024-07-15T16:03:12.8838291Z -- Generating done (0.0s)
2024-07-15T16:03:12.8851686Z -- Build files have been written to: D:/bld/cudadecon_1721059005793/work/cmake_build
2024-07-15T16:03:17.8953813Z [1/20] Building CUDA object CMakeFiles\libcudaDecon.dir\geometryTransform.cu.obj
2024-07-15T16:03:17.8954594Z FAILED: CMakeFiles/libcudaDecon.dir/geometryTransform.cu.obj 
2024-07-15T16:03:17.8957218Z C:\PROGRA~1\NVIDIA~2\CUDA\v11.2\bin\nvcc.exe -forward-unknown-to-host-compiler -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_PROGRAM_OPTIONS_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DBOOST_SYSTEM_NO_LIB -Dcimg_display=0 -DlibcudaDecon_EXPORTS -I%SRC_DIR%\src -I%SRC_DIR%\src\Buffers -I%BUILD_PREFIX%\Library\lib -I\common\inc -isystem "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\include" -isystem %PREFIX%\Library\include -D_WINDOWS -Xcompiler=" /EHsc" -Xcompiler="-O2 -Ob2" -DNDEBUG -std=c++14 "--generate-code=arch=compute_35,code=[sm_35]" "--generate-code=arch=compute_50,code=[sm_50]" "--generate-code=arch=compute_60,code=[sm_60]" "--generate-code=arch=compute_70,code=[sm_70]" "--generate-code=arch=compute_80,code=[compute_80,sm_80]" -Xcompiler=-MD -MD -MT CMakeFiles\libcudaDecon.dir\geometryTransform.cu.obj -MF CMakeFiles\libcudaDecon.dir\geometryTransform.cu.obj.d -x cu -c %SRC_DIR%\src\geometryTransform.cu -o CMakeFiles\libcudaDecon.dir\geometryTransform.cu.obj -Xcompiler=-FdCMakeFiles\libcudaDecon.dir\,-FS
2024-07-15T16:03:17.8971543Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.29.30133\include\xutility(1260): error: expected a "("
2024-07-15T16:03:17.8973086Z           detected during instantiation of "void std::_Adl_verify_range(const _Iter &, const _Sentinel &) [with _Iter=const char *, _Sentinel=const char *]" 
2024-07-15T16:03:17.8973453Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.29.30133\include\xlocale(1971): here
2024-07-15T16:03:17.8973589Z 
2024-07-15T16:03:17.8973870Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.29.30133\include\xutility(1261): error: identifier "_Verify_range" is undefined
2024-07-15T16:03:17.8974226Z           detected during instantiation of "void std::_Adl_verify_range(const _Iter &, const _Sentinel &) [with _Iter=const char *, _Sentinel=const char *]" 
2024-07-15T16:03:17.8974597Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.29.30133\include\xlocale(1971): here
2024-07-15T16:03:17.8974734Z 
2024-07-15T16:03:17.8974969Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.29.30133\include\xutility(1260): error: expected a "("
2024-07-15T16:03:17.8975299Z           detected during instantiation of "void std::_Adl_verify_range(const _Iter &, const _Sentinel &) [with _Iter=__wchar_t *, _Sentinel=__wchar_t *]" 
2024-07-15T16:03:17.8975652Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.29.30133\include\xlocale(1972): here
2024-07-15T16:03:17.8975783Z 
2024-07-15T16:03:17.8976000Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.29.30133\include\xutility(1261): error: identifier "_Verify_range" is undefined
2024-07-15T16:03:17.8976389Z           detected during instantiation of "void std::_Adl_verify_range(const _Iter &, const _Sentinel &) [with _Iter=__wchar_t *, _Sentinel=__wchar_t *]" 
2024-07-15T16:03:17.8976823Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.29.30133\include\xlocale(1972): here
2024-07-15T16:03:17.8977458Z 
2024-07-15T16:03:17.8978337Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.29.30133\include\xutility(1260): error: expected a "("
2024-07-15T16:03:17.8978907Z           detected during instantiation of "void std::_Adl_verify_range(const _Iter &, const _Sentinel &) [with _Iter=const __wchar_t *, _Sentinel=const __wchar_t *]" 
2024-07-15T16:03:17.8979271Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.29.30133\include\xlocale(2007): here
2024-07-15T16:03:17.8979470Z 
2024-07-15T16:03:17.8979692Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.29.30133\include\xutility(1261): error: identifier "_Verify_range" is undefined
2024-07-15T16:03:17.8980094Z           detected during instantiation of "void std::_Adl_verify_range(const _Iter &, const _Sentinel &) [with _Iter=const __wchar_t *, _Sentinel=const __wchar_t *]" 
2024-07-15T16:03:17.8980425Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.29.30133\include\xlocale(2007): here
2024-07-15T16:03:17.8980554Z 
2024-07-15T16:03:17.8980790Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.29.30133\include\xutility(1260): error: expected a "("
2024-07-15T16:03:17.8981108Z           detected during instantiation of "void std::_Adl_verify_range(const _Iter &, const _Sentinel &) [with _Iter=char *, _Sentinel=char *]" 
2024-07-15T16:03:17.8981453Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.29.30133\include\xlocale(2008): here
2024-07-15T16:03:17.8981719Z 
2024-07-15T16:03:17.8981971Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.29.30133\include\xutility(1261): error: identifier "_Verify_range" is undefined
2024-07-15T16:03:17.8982311Z           detected during instantiation of "void std::_Adl_verify_range(const _Iter &, const _Sentinel &) [with _Iter=char *, _Sentinel=char *]" 
2024-07-15T16:03:17.8982647Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.29.30133\include\xlocale(2008): here
2024-07-15T16:03:17.8982774Z 
2024-07-15T16:03:17.8982970Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.29.30133\include\xutility(1260): error: expected a "("
2024-07-15T16:03:17.8983351Z           detected during instantiation of "void std::_Adl_verify_range(const _Iter &, const _Sentinel &) [with _Iter=unsigned short *, _Sentinel=unsigned short *]" 
2024-07-15T16:03:17.8983671Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.29.30133\include\xlocale(2171): here

differences I notice between the working one and the non-working one:

  • the broken one is looking outside the environment Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2/bin/nvcc.exe
  • the working one is looking inside the environment Check for working CUDA compiler: D:/bld/cudadecon_1721058710555/_build_env/Library/bin/nvcc.exe
  • both are using CXX compiler identification is MSVC 19.29.30154.0

(working one logs begin around here)

@tlambert03
Copy link
Member Author

since I'd ❤️❤️❤️❤️ to get this 🐒 of my 🔙 ... 😂

I'm gonna merge this as is, without support for cuda 11.2 on windows. will open a new PR

@tlambert03 tlambert03 merged commit 21f7a80 into scopetools:main Jul 15, 2024
4 checks passed
@tlambert03 tlambert03 deleted the rerender branch July 15, 2024 19:53
@jakirkham
Copy link

Hooray!!! 🥳 🍾

Thanks Talley! 👏

Nice to see this reach completion 😄

Will comment in the other issues/PRs

@tlambert03 tlambert03 mentioned this pull request Jul 15, 2024
@LourensVeen
Copy link

LourensVeen commented Jul 16, 2024

thanks so much for commenting here @LourensVeen, I appreciate it.

I see in that thread you said:

Adding a symlink at ${CONDA_PREFIX)/targets/x86_64-linux/bin/nvcc.profile to ${CONDA_PREFIX}/bin/nvcc.profile fixes the problem.

and

I've now also added a symlink for the bin/crt directory, to avoid errors linking code that uses the driver API with the stubs.

sorry to ask a basic question: but can can you clarify where you're adding those symlinks? That is, if I'd like to manually patch things so as to get this building on CI again, how might I directly modify my own recipe (or ci_support or other files)

(Not sure if this is still relevant, but I thought I'd reply anyway, would love to know if you found another solution.)

Ah, I haven't actually tried to patch things while building a package. I'm trying to renovate some old code, and I'm still trying to get it to build against conda-installed dependencies locally. So I made an env and activated it and patched it using

$ ln -s ${CONDA_PREFIX}/bin/nvcc.profile ${CONDA_PREFIX}/targets/x86_64-linux/bin/nvcc.profile
$ ln -s ${CONDA_PREFIX}/bin/crt ${CONDA_PREFIX}/targets/x86_64-linux/bin/crt

In a build environment, I think you want to use ${BUILD_PREFIX} instead of ${CONDA_PREFIX}, but I haven't tried that yet.

@tlambert03
Copy link
Member Author

thanks @LourensVeen. Yeah the final thing that did it for me seems like it was likely unrelated: I just needed to add

include_directories(
   ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}
)

in one of my nested CMake files. still don't know why I needed that only for windows, but it's all building now and i'm gonna move on with my life 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants