Skip to content

Commit

Permalink
Fix deadlocks by enabling eager module loading in libcudacxx tests. (#…
Browse files Browse the repository at this point in the history
…3585)

* Try using eager loading in lit to fix barrier deadlock

* Use override to limit testing

* Revert "Use override to limit testing"

This reverts commit 86edec4.
wmaxey authored Jan 30, 2025
1 parent 73db01e commit 0ecae03
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions libcudacxx/test/utils/libcudacxx/test/config.py
Original file line number Diff line number Diff line change
@@ -78,6 +78,7 @@ def __init__(self, lit_config, config):
self.link_shared = self.get_lit_bool("enable_shared", default=True)
self.debug_build = self.get_lit_bool("debug_build", default=False)
self.exec_env = dict(os.environ)
self.exec_env["CUDA_MODULE_LOADING"] = "EAGER"
self.use_target = False
self.use_system_cxx_lib = False
self.use_clang_verify = False
@@ -201,7 +202,8 @@ def get_modules_enabled(self):
def make_static_lib_name(self, name):
"""Return the full filename for the specified library name"""
if self.is_windows:
assert name == "c++" # Only allow libc++ to use this function for now.
# Only allow libc++ to use this function for now.
assert name == "c++"
return "lib" + name + ".lib"
else:
return "lib" + name + ".a"
@@ -308,7 +310,7 @@ def configure_cxx(self):
cxx is not None and os.path.basename(cxx) == "clang-cl.exe"
)

## Build CXXCompiler manually for NVRTCC
# Build CXXCompiler manually for NVRTCC
if nvrtc is True:
cxx_type = "nvrtcc"
self.cxx = CXXCompiler(
@@ -751,7 +753,7 @@ def configure_compile_flags(self):
if compute_archs == "native":
compute_archs = self.get_compute_capabilities()

compute_archs = set(sorted(re.split("\s|;|,", compute_archs)))
compute_archs = set(sorted(re.split("\\s|;|,", compute_archs)))
for s in compute_archs:
# Split arch and mode i.e. 80-virtual -> 80, virtual
arch, *mode = re.split("-", s)

0 comments on commit 0ecae03

Please sign in to comment.