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 nvcc on Windows #88

Closed
wants to merge 15 commits into from
Closed

Fix nvcc on Windows #88

wants to merge 15 commits into from

Conversation

leofang
Copy link
Member

@leofang leofang commented Jul 2, 2022

Close #76.

The common symptom, likely triggered after the vs2019 update, is this error

'cl.exe' is not recognized as an internal or external command,
operable program or batch file.

We need to use the --use-local-env flag to respect conda-forge's MSVC setup.

Skip MSVC environment initialization.
By default nvcc assumes that the MSVC environment needs to be initialized. This is done by executing the appropriate command file available for the MSVC installation detected or specified. Initializing the environment for each nvcc invocation can add noticeable overheads. If the environment used to invoke nvcc has already been configured, this option can be used to skip this step.

cc: @isuruf @carterbox

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

@conda-forge-linter
Copy link

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.

@leofang
Copy link
Member Author

leofang commented Jul 2, 2022

cc: @jaimergp

@leofang
Copy link
Member Author

leofang commented Jul 2, 2022

@conda-forge-admin, please rerender

@wolfv
Copy link
Member

wolfv commented Jul 2, 2022

Awesome!

@leofang
Copy link
Member Author

leofang commented Jul 2, 2022

@conda-forge-admin, please rerender

@leofang

This comment was marked as resolved.

@leofang
Copy link
Member Author

leofang commented Jul 2, 2022

I am trying to understand what's the difference between msvc in the build vs the test environment, because I am pretty sure the added flag is the solution for the building error (conda-forge/cupy-feedstock@b33baf4).

@leofang
Copy link
Member Author

leofang commented Jul 2, 2022

0f50a2f is actually wrong, but the CI did not catch it, proving my suspicion #76 (comment) is right...

And this is wrong 😑

@leofang
Copy link
Member Author

leofang commented Jul 2, 2022

My feeling is once we set --use-local-env we need to set all include and library search paths explicitly, which are done properly by any build system (setuptools, cmake, ...), but not in our simple test nvcc test_nvcc.cu.

@leofang leofang marked this pull request as draft July 3, 2022 02:36
@leofang
Copy link
Member Author

leofang commented Jul 4, 2022

My feeling is once we set --use-local-env we need to set all include and library search paths explicitly, which are done properly by any build system (setuptools, cmake, ...), but not in our simple test nvcc test_nvcc.cu.

Perhaps we should only set this flag at the build stage...

@leofang
Copy link
Member Author

leofang commented Jul 27, 2022

@jakirkham @jaimergp any chance you guys know what's going on here?

(%PREFIX%) %SRC_DIR%>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\bin\nvcc.exe" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\cl.exe" test.cu 
c:\program files\nvidia gpu computing toolkit\cuda\v11.7\include\crt/host_config.h(231): fatal error C1083: Cannot open include file: 'crtdefs.h': No such file or directory
test.cu

@leofang leofang closed this Aug 5, 2022
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.

CMake cannot verify NVCC compiler after rerender to 2019 Windows Image
3 participants