Skip to content

Commit 1a3600c

Browse files
author
deshevoy
committed
[build] cuda: Add a way to disable nvprune without messing with CUDA_ARCHITECTURES
- Globally: -DCUDA_NVPRUNE=no flag - For a single PROGRAM: NO_CUDA_NVPRUNE() macro commit_hash:14d94721af664c8d8d253a1f063b8a2b4557dce5
1 parent 35559c6 commit 1a3600c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

build/conf/cuda.conf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,11 @@ macro NVCC_DEVICE_LINK(Srcs...) {
136136
SET_APPEND(_NVCC_DEVICE_SRCS ${suf=${OBJ_SUF}${NVCC_OBJ_EXT}:Srcs})
137137
.PEERDIR=build/internal/platform/cuda
138138
}
139+
140+
CUDA_NVPRUNE=yes
141+
142+
### @usage: NO_CUDA_NVPRUNE()
143+
### Disable nvprune for a PROGRAM
144+
macro NO_CUDA_NVPRUNE() {
145+
DISABLE(CUDA_NVPRUNE)
146+
}

build/ymake.core.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,6 +1127,10 @@ module _LINK_UNIT: _BASE_UNIT {
11271127
LINK_SCRIPT_EXE_FLAGS += --dynamic-cuda
11281128
}
11291129

1130+
when ($CUDA_NVPRUNE == "no") {
1131+
LDFLAGS += -L/CUDA:PRUNE=False
1132+
}
1133+
11301134
when ($SANITIZER_TYPE && $SANITIZER_TYPE != "no") {
11311135
PEERDIR += library/cpp/sanitizer/plugin
11321136
}

0 commit comments

Comments
 (0)