From 41386b7766b268354b146350af0deb289e5735b2 Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Thu, 23 Jul 2026 13:37:08 -0600 Subject: [PATCH] =?UTF-8?q?Revert=20"fix:=20exclude=20host-only=20MemoryUs?= =?UTF-8?q?age.cpp=20from=20CUDA=20compilation=20(nvcc=2012=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 179d2bf58b52c0b2bb1d63e8f62eb5fc00a20dad. --- CMakeLists.txt | 7 +------ cmake/kynema-driver-utils.cmake | 14 -------------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a41ff3..3c10495 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,14 +82,9 @@ endif() if(KYNEMA_DRIVER_ENABLE_CUDA) include(kynema-driver-utils) - # Host-only sources that must not be compiled as CUDA (i.e. must bypass - # nvcc/cudafe++) — see set_cuda_build_properties() for details. - set(_kynema_host_only_srcs - "${CMAKE_SOURCE_DIR}/src/MemoryUsage.cpp" - ) set(kyntargets "${KYNEMA_DRIVER_LIB_NAME};${KYNEMA_DRIVER_EXE_NAME}") foreach(tgt IN LISTS kyntargets) - set_cuda_build_properties(${tgt} ${_kynema_host_only_srcs}) + set_cuda_build_properties(${tgt}) endforeach() endif() diff --git a/cmake/kynema-driver-utils.cmake b/cmake/kynema-driver-utils.cmake index ee42c90..3712400 100644 --- a/cmake/kynema-driver-utils.cmake +++ b/cmake/kynema-driver-utils.cmake @@ -1,20 +1,6 @@ function(set_cuda_build_properties target) - # Optional additional arguments: a list of host-only source file paths that - # must not be compiled as CUDA. These files are explicitly kept as LANGUAGE CXX - # so they bypass nvcc/cudafe++, which crashes on GCC 13 (libstdc++ 13) headers - # such as stl_construct.h when using nvcc 12.8.1 (cudafe++ internal assertion - # failure at lexical.c in find_allocated_name_reference). - set(_host_only_srcs ${ARGN}) - get_target_property(_tgt_src ${target} SOURCES) list(FILTER _tgt_src INCLUDE REGEX "\\.cpp") - - # Remove host-only sources from the CUDA list and mark them as plain CXX. - if(_host_only_srcs) - list(REMOVE_ITEM _tgt_src ${_host_only_srcs}) - set_source_files_properties(${_host_only_srcs} PROPERTIES LANGUAGE CXX) - endif() - set_source_files_properties(${_tgt_src} PROPERTIES LANGUAGE CUDA) set_target_properties(${target} PROPERTIES CUDA_ARCHITECTURES "${KYNEMA_DRIVER_CUDA_ARCH}") set_target_properties(${target} PROPERTIES CUDA_RESOLVE_DEVICE_SYMBOLS ON)