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

auto-detect native CUDA arch #31

Closed
wants to merge 2 commits into from
Closed

auto-detect native CUDA arch #31

wants to merge 2 commits into from

Conversation

casperdcl
Copy link
Member

@casperdcl casperdcl self-assigned this May 21, 2023
@casperdcl casperdcl mentioned this pull request May 21, 2023
try:
from miutil import cuinfo
nvcc_arch_raw = map(cuinfo.compute_capability, range(cuinfo.num_devices()))
nvcc_arches = {"%d%d" % i for i in nvcc_arch_raw if i >= (3, 5)}
Copy link
Member Author

Choose a reason for hiding this comment

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

@codecov
Copy link

codecov bot commented May 21, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (942b686) 100.00% compared to head (4464e5a) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #31   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         4           
  Lines          182       182           
=========================================
  Hits           182       182           

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@casperdcl casperdcl force-pushed the auto-arch branch 2 times, most recently from 3354fda to a133446 Compare May 21, 2023 09:06
Comment on lines +30 to +33
# work-around for https://gitlab.kitware.com/cmake/cmake/-/issues/24921 to
# detect local GPU architectures
# (inspired by ${CMAKE_ROOT}/Modules/CMakeTestCUDACompiler.cmake)
message(WARNING "overriding CMAKE_CUDA_ARCHITECTURES")
Copy link
Member Author

Choose a reason for hiding this comment

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

not guaranteed to always exist:

  • ${CMAKE_ROOT}/Modules/CMakeTestCUDACompiler.cmake
  • ${CMAKE_ROOT}/Modules/CMakeDetermineCompilerABI.cmake
  • ${CMAKE_CUDA_ARCHITECTURES_ALL}

also overriding potentially user-specified CMAKE_CUDA_ARCHITECTURES isn't ideal

This was referenced Dec 8, 2023
casperdcl added a commit that referenced this pull request Dec 8, 2023
casperdcl added a commit that referenced this pull request Dec 8, 2023
casperdcl added a commit that referenced this pull request Dec 8, 2023
casperdcl added a commit that referenced this pull request Dec 8, 2023
@casperdcl casperdcl closed this in #34 Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant