cuda: remove arch specific flag; add /lib64 to LIBPATH for libcuda.so for most Linux systems
parent
5908499c67
commit
d1d9516890
|
@ -2,19 +2,19 @@
|
|||
|
||||
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# Copyright 2010 California Institute of Technology. ALL RIGHTS RESERVED.
|
||||
#
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
#
|
||||
# United States Government Sponsorship acknowledged. This software is subject to
|
||||
# U.S. export control laws and regulations and has been classified as 'EAR99 NLR'
|
||||
# (No [Export] License Required except when exporting to an embargoed country,
|
||||
|
@ -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