Skip to content

Commit 8fef22d

Browse files
committed
Be explicit with unified memory compilation to stay robust in changes of defaults
1 parent acb2405 commit 8fef22d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,11 +498,11 @@ function(MFC_SETUP_TARGET)
498498
# GH-200 Unified Memory Support
499499
if (MFC_Unified)
500500
target_compile_options(${ARGS_TARGET}
501-
PRIVATE -gpu=mem:unified -cuda
501+
PRIVATE -gpu=mem:unified:managedalloc -cuda
502502
)
503503
# "This option must appear in both the compile and link lines" -- NVHPC Docs
504504
target_link_options(${ARGS_TARGET}
505-
PRIVATE -gpu=mem:unified -cuda
505+
PRIVATE -gpu=mem:unified:managedalloc -cuda
506506
)
507507
endif()
508508

toolchain/templates/santis.mako

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
% endif
2828

2929
# NVHPC and CUDA env vars
30-
export NV_ACC_USE_MALLOC=0 # use cudaMallocManaged instead of malloc ( compiled using -gpu=mem:unified )
30+
export NV_ACC_USE_MALLOC=0 # use cudaMallocManaged instead of malloc ( compiled using -gpu=mem:unified:managedalloc )
3131
export NVCOMPILER_ACC_NO_MEMHINTS=1 # disable implicit compiler hints
3232
#export CUDA_BUFFER_PAGE_IN_THRESHOLD_MS=0.001 # workaround for copying to/from unpopulated buffers on GH
3333

0 commit comments

Comments
 (0)