Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Refactor sm feature selection in config.py
Browse files Browse the repository at this point in the history
  • Loading branch information
wmaxey committed Feb 11, 2022
1 parent cf54cb7 commit b264189
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .upstream-tests/utils/libcudacxx/test/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,10 @@ def configure_compile_flags(self):
self.config.available_features.add("nvrtc")
if self.cxx.type == 'nvcc':
self.cxx.compile_flags += ['--extended-lambda']
pre_sm_32 = True
pre_sm_60 = True
pre_sm_70 = True
pre_sm_80 = True
if compute_archs and self.cxx.type == 'nvcc':
pre_sm_32 = False
pre_sm_60 = False
Expand All @@ -590,19 +594,14 @@ def configure_compile_flags(self):
if enable_compute_future:
arch_flag = '-gencode=arch=compute_{0},code=compute_{0}'.format(arch)
self.cxx.compile_flags += [arch_flag]
if pre_sm_32:
self.config.available_features.add("pre-sm-32")
if pre_sm_60:
self.config.available_features.add("pre-sm-60")
if pre_sm_70:
self.config.available_features.add("pre-sm-70")
if pre_sm_80:
self.config.available_features.add("pre-sm-80")
else : # Default assume that no features are available
if pre_sm_32:
self.config.available_features.add("pre-sm-32")
if pre_sm_60:
self.config.available_features.add("pre-sm-60")
self.config.available_features.add("pre-sm-80")
if pre_sm_70:
self.config.available_features.add("pre-sm-70")
if pre_sm_80:
self.config.available_features.add("pre-sm-80")

def configure_default_compile_flags(self):
nvcc_host_compiler = self.get_lit_conf('nvcc_host_compiler')
Expand Down

0 comments on commit b264189

Please sign in to comment.