diff options
author | Thomas Dinges <blender@dingto.org> | 2011-12-08 23:16:43 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2011-12-08 23:16:43 +0400 |
commit | 7c630aac80d6326bd5dd569bce343e386123fdac (patch) | |
tree | fb8531f617974066376f602ca7f8b244256635ce /intern | |
parent | 7797c1dc424b1f772f23a3b8730a8374012d8c8b (diff) |
Scons/CUDA
* Added missing bitness info to the nvcc_flags.
This makes sure that the nvcc compiler builds the correct cubins.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/kernel/SConscript | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/intern/cycles/kernel/SConscript b/intern/cycles/kernel/SConscript index eb99680efe4..be3c37b476c 100644 --- a/intern/cycles/kernel/SConscript +++ b/intern/cycles/kernel/SConscript @@ -1,6 +1,7 @@ #!/usr/bin/python import sys import os +import Blender as B def normpath(path): return os.path.abspath(os.path.normpath(path)) @@ -9,6 +10,12 @@ Import ('env') kernel_binaries = [] +#Bitness +if B.bitness == 32: + bits = 32 +else: + bits = 64 + if env['WITH_BF_CYCLES_CUDA_BINARIES']: kernel = env.Clone() @@ -27,7 +34,8 @@ if env['WITH_BF_CYCLES_CUDA_BINARIES']: svm_dir = os.path.join(source_dir, "../svm") # nvcc flags - nvcc_flags = "--cubin -use_fast_math --ptxas-options=\"-v\" --maxrregcount=24" + nvcc_flags = "-m%s" % (bits) + nvcc_flags += " --cubin -use_fast_math --ptxas-options=\"-v\" --maxrregcount=24" nvcc_flags += " --opencc-options -OPT:Olimit=0" nvcc_flags += " -DCCL_NAMESPACE_BEGIN= -DCCL_NAMESPACE_END= -DNVCC" nvcc_flags += " -I \"%s\" -I \"%s\"" % (util_dir, svm_dir) |