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

[cuda] correct env variables for newer cuda versions #12244

Merged
merged 2 commits into from
Jul 9, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ports/cuda/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: cuda
Version: 10.1-1
Version: 10.1-2
Neumann-A marked this conversation as resolved.
Show resolved Hide resolved
Description: A parallel computing platform and programming model
Homepage: https://developer.nvidia.com/cuda-toolkit
14 changes: 10 additions & 4 deletions ports/cuda/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,18 @@
#note: this port must be kept in sync with CUDNN port: every time one is upgraded, the other must be too
set(CUDA_REQUIRED_VERSION "10.1.0")

set(CUDA_PATHS
ENV CUDA_PATH
ENV CUDA_BIN_PATH
ENV CUDA_PATH_V11_0
ENV CUDA_PATH_V10_2
ENV CUDA_PATH_V10_1)

if (VCPKG_TARGET_IS_WINDOWS)
find_program(NVCC
NAMES nvcc.exe
PATHS
ENV CUDA_PATH
ENV CUDA_BIN_PATH
${CUDA_PATHS}
PATH_SUFFIXES bin bin64
DOC "Toolkit location."
NO_DEFAULT_PATH
Expand Down Expand Up @@ -38,8 +44,7 @@ else()
find_program(NVCC
NAMES nvcc
PATHS
ENV CUDA_PATH
ENV CUDA_BIN_PATH
${CUDA_PATHS}
PATHS ${FOUND_PATH}
PATH_SUFFIXES bin bin64
DOC "Toolkit location."
Expand All @@ -57,6 +62,7 @@ endif()


if (error_code)
message(STATUS "Executing ${NVCC} --version resulted in error: ${error_code}")
message(FATAL_ERROR "Could not find CUDA. Before continuing, please download and install CUDA (v${CUDA_REQUIRED_VERSION} or higher) from:"
"\n https://developer.nvidia.com/cuda-downloads\n")
endif()
Expand Down
2 changes: 2 additions & 0 deletions toolsrc/src/vcpkg/base/system.process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ namespace vcpkg
L"CUDA_PATH_V9_1",
L"CUDA_PATH_V10_0",
L"CUDA_PATH_V10_1",
L"CUDA_PATH_V10_2",
L"CUDA_PATH_V11_0",
L"CUDA_TOOLKIT_ROOT_DIR",
// Environmental variable generated automatically by CUDA after installation
L"NVCUDASAMPLES_ROOT",
Expand Down