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

[Enhancement] Support cmake configure when system exists multiple cuda versions. #1740

Merged
merged 2 commits into from
Feb 14, 2023

Conversation

irexyc
Copy link
Collaborator

@irexyc irexyc commented Feb 9, 2023

Motivation

On windows, to support cmake use cuda as a language, one need to install cuda msbuild extensions that cuda installer provides.

When configure mmdeploy with cuda, if not specify cuda toolkit, cmake will use the highest cuda extensions found in $(VCTargetsPath)\BuildCustomizations. And it also need environment variable CUDA_PATH_V{X}_{Y} to be set.

When using find_package(CUDA), it will first search CUDA_PATH and then the dir of nvcc.exe if nvcc.exe can be found. The search path should be compatible with used extensions.

Usage.

  • If no cuda msbuild extensions installed to vs folder
    cmake  -A x64 -T v142,cuda="/path/to/cuda" ..
  • If multiple cuda msbuild extensions installed to vs folder
    cmake  -A x64 -T v142,cuda="/path/to/cuda" ..
    OR
    cmake -A x64 -T v142,cuda=x.y

Copy link
Collaborator

@RunningLeon RunningLeon left a comment

Choose a reason for hiding this comment

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

LGTM

@lvhan028 lvhan028 merged commit 599c701 into open-mmlab:master Feb 14, 2023
irexyc added a commit to irexyc/mmdeploy that referenced this pull request Feb 14, 2023
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