Cycles: scons cuda kernel compile now does one kernel at a time, to reduce memory

usage.
This commit is contained in:
Brecht Van Lommel 2011-12-06 12:29:54 +00:00
parent fca9c231a0
commit cd1e78f1b7

@ -34,6 +34,7 @@ if env['WITH_BF_CYCLES_CUDA_BINARIES']:
# dependencies
dependencies = ['kernel.cu'] + kernel.Glob('*.h') + kernel.Glob('../util/*.h') + kernel.Glob('svm/*.h')
last_cubin_file = None
# add command for each cuda architecture
for arch in cuda_archs:
@ -46,5 +47,10 @@ if env['WITH_BF_CYCLES_CUDA_BINARIES']:
kernel_binaries.append(cubin_file)
# trick to compile one kernel at a time to reduce memory usage
if last_cubin_file:
kernel.Depends(cubin_file, last_cubin_file)
last_cubin_file = cubin_file
Return('kernel_binaries')