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

Cmake Windows integration #7604

Closed
atalman opened this issue May 18, 2023 · 5 comments · Fixed by #7417
Closed

Cmake Windows integration #7604

atalman opened this issue May 18, 2023 · 5 comments · Fixed by #7417

Comments

@atalman
Copy link
Contributor

atalman commented May 18, 2023

The PR that address CMake integration fails on GPU builds #7417

Call stack:

Call Stack (most recent call first):
  C:/Jenkins/Miniconda3/envs/py39/Library/share/cmake-3.22/Modules/CMakeDetermineCompilerId.cmake:6 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  C:/Jenkins/Miniconda3/envs/py39/Library/share/cmake-3.22/Modules/CMakeDetermineCompilerId.cmake:59 (__determine_compiler_id_test)
  C:/Jenkins/Miniconda3/envs/py39/Library/share/cmake-3.22/Modules/CMakeDetermineCUDACompiler.cmake:298 (CMAKE_DETERMINE_COMPILER_ID)
@atalman atalman changed the title Windows Cmake Windows integration May 18, 2023
@malfet
Copy link
Contributor

malfet commented May 18, 2023

Error stems somewhere from:
https://github.com/Kitware/CMake/blob/0bfd4f1ed68180d3912386fb53d559b2a9e84b1b/Modules/CMakeDetermineCompilerId.cmake#LL469C14-L469C44

Which expects environment variable to be defined here
https://github.com/Kitware/CMake/blob/0bfd4f1ed68180d3912386fb53d559b2a9e84b1b/Source/cmGlobalVisualStudio10Generator.cxx#L394
And if I understand https://github.com/Kitware/CMake/blob/0bfd4f1ed68180d3912386fb53d559b2a9e84b1b/Source/cmGlobalVisualStudio10Generator.cxx#L283 correctly, it's looking for extras\\visual_studio_integration\\MSBuildExtensions folder.
Which means, in this workflow one is trying to generate VisualStudio project, which depends on optional CUDA toolkit component, which is likely not installed in the AMI

@atalman
Copy link
Contributor Author

atalman commented May 18, 2023

Yes this is correct. The CUDA toolkit is on the path and just before the error, cuda is found:

-- Found CUDA: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.7 (found version "11.7") 

@pmeier
Copy link
Collaborator

pmeier commented May 19, 2023

We are copying some files from the extras\\visual_studio_integration\\MSBuildExtensions folder of the extracted CUDA toolkit to the VS folders:

echo Installing VS integration...
rem It's for VS 2019
if "%CUDA_VER_MAJOR%" == "10" (
xcopy /Y "%SRC_DIR%\temp_build\cuda\CUDAVisualStudioIntegration\extras\visual_studio_integration\MSBuildExtensions\*.*" "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations"
)
if "%CUDA_VER_MAJOR%" == "11" (
xcopy /Y "%SRC_DIR%\temp_build\cuda\visual_studio_integration\CUDAVisualStudioIntegration\extras\visual_studio_integration\MSBuildExtensions\*.*" "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations"
)

So maybe we just need to copy this to the right path?

While debugging this, I didn't find these files on our image directly, but had to run the CUDA installation manually again. Meaning, if we actually need these files, we likely need to rebuild the AMI.

@atalman
Copy link
Contributor Author

atalman commented May 19, 2023

@pmeier , @malfet Ok looks like the issue is exactly that this step failing :

xcopy /Y "%SRC_DIR%\temp_build\cuda\visual_studio_integration\CUDAVisualStudioIntegration\extras\visual_studio_integration\MSBuildExtensions\*.*" "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations" 

The path is not correct should be:
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\BuildCustomizations

@atalman
Copy link
Contributor Author

atalman commented May 19, 2023

This commit should fix the above issue with CUDA not found: 9baaf70

@pmeier pmeier linked a pull request May 22, 2023 that will close this issue
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 a pull request may close this issue.

3 participants