Skip to content

Commit

Permalink
Merge pull request #292 from unnonouno/link-args
Browse files Browse the repository at this point in the history
Fix link args for cusolver
  • Loading branch information
takagi committed Jul 21, 2017
2 parents aafd0eb + dcbdd41 commit 5062f61
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cupy_setup_build.py
Expand Up @@ -270,13 +270,15 @@ def make_extensions(options, compiler, use_cython):
s['libraries'] = module['libraries']

if module['name'] == 'cusolver':
args = s.setdefault('extra_compile_args', [])
compile_args = s.setdefault('extra_compile_args', [])
link_args = s.setdefault('extra_link_args', [])
# openmp is required for cusolver
if compiler.compiler_type == 'unix' and sys.platform != 'darwin':
# In mac environment, openmp is not required.
args.append('-fopenmp')
compile_args.append('-fopenmp')
link_args.append('-fopenmp')
elif compiler.compiler_type == 'msvc':
args.append('/openmp')
compile_args.append('/openmp')

if not no_cuda and module['name'] == 'thrust':
if build.get_nvcc_path() is None:
Expand Down

0 comments on commit 5062f61

Please sign in to comment.