Scons/CUDA
* Added missing bitness info to the nvcc_flags. This makes sure that the nvcc compiler builds the correct cubins.
This commit is contained in:
@@ -119,6 +119,12 @@ tempbitness = int(B.arguments.get('BF_BITNESS', bitness)) # default to bitness f
|
||||
if tempbitness in (32, 64): # only set if 32 or 64 has been given
|
||||
bitness = int(tempbitness)
|
||||
|
||||
if bitness:
|
||||
B.bitness = bitness
|
||||
else:
|
||||
B.bitness = tempbitness
|
||||
|
||||
|
||||
# first check cmdline for toolset and we create env to work on
|
||||
quickie = B.arguments.get('BF_QUICK', None)
|
||||
quickdebug = B.arguments.get('BF_QUICKDEBUG', None)
|
||||
|
@@ -50,6 +50,7 @@ program_list = [] # A list holding Nodes to final binaries, used to create insta
|
||||
arguments = None
|
||||
targets = None
|
||||
resources = []
|
||||
bitness = 0
|
||||
|
||||
#some internals
|
||||
blenderdeps = [] # don't manipulate this one outside this module!
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user