cuda: remove arch specific flag; add /lib64 to LIBPATH for libcuda.so for most Linux systems
parent
5908499c67
commit
d1d9516890
|
@ -49,7 +49,7 @@ if envGPUampcor['GPU_ACC_ENABLED']:
|
|||
build_base += "-ccbin " + envGPUampcor['NVCC_CCBIN'] + " "
|
||||
else:
|
||||
print('Assuming default system compiler for nvcc.')
|
||||
build_base += "-arch=sm_35 -shared -Xcompiler -fPIC -O3 "
|
||||
build_base += "-shared -Xcompiler -fPIC -O3 "
|
||||
build_cmd = build_base + "-dc -m64 -o $TARGET -c $SOURCE"
|
||||
built_path = os.path.join(build, 'gpu-ampcor.o')
|
||||
linked_path = os.path.join(build, 'gpu-ampcor-linked.o')
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
nvcc -arch=sm_35 -Xcompiler -fPIC -o gpu-topo.o -c Topo.cu
|
||||
nvcc -Xcompiler -fPIC -o gpu-topo.o -c Topo.cu
|
||||
cp -f gpu-topo.o ..
|
||||
|
|
|
@ -52,7 +52,7 @@ def generate(env):
|
|||
# default flags for the NVCC compiler
|
||||
env['STATICNVCCFLAGS'] = ''
|
||||
env['SHAREDNVCCFLAGS'] = ''
|
||||
env['ENABLESHAREDNVCCFLAG'] = '-arch=sm_35 -shared -Xcompiler -fPIC'
|
||||
env['ENABLESHAREDNVCCFLAG'] = '-shared -Xcompiler -fPIC'
|
||||
|
||||
# default NVCC commands
|
||||
env['STATICNVCCCMD'] = '$NVCC -o $TARGET -c $NVCCFLAGS $STATICNVCCFLAGS $SOURCES'
|
||||
|
@ -153,7 +153,7 @@ def generate(env):
|
|||
#env.Append(LIBPATH=[cudaSDKPath + '/lib', cudaSDKPath + '/common/lib' + cudaSDKSubLibDir, cudaToolkitPath + '/lib'])
|
||||
|
||||
env.Append(CUDACPPPATH=[cudaToolkitPath + '/include'])
|
||||
env.Append(CUDALIBPATH=[cudaToolkitPath + '/lib', cudaToolkitPath + '/lib64'])
|
||||
env.Append(CUDALIBPATH=[cudaToolkitPath + '/lib', cudaToolkitPath + '/lib64', '/lib64'])
|
||||
env.Append(CUDALIBS=['cudart'])
|
||||
|
||||
def exists(env):
|
||||
|
|
Loading…
Reference in New Issue