Skip to content
Snippets Groups Projects
Commit 18ed75f3 authored by Stephan Seitz's avatar Stephan Seitz
Browse files

Link against cudart

parent 3a3bd16a
No related branches found
No related tags found
No related merge requests found
Pipeline #18275 failed
...@@ -14,9 +14,9 @@ import sysconfig ...@@ -14,9 +14,9 @@ import sysconfig
from os.path import exists, join from os.path import exists, join
import p_tqdm import p_tqdm
import pystencils import pystencils
from pystencils.cpu.cpujit import get_cache_config, get_compiler_config, get_pystencils_include_path from pystencils.cpu.cpujit import get_cache_config, get_compiler_config, get_pystencils_include_path
from pystencils_autodiff._file_io import read_file, write_file from pystencils_autodiff._file_io import read_file, write_file
_hash = hashlib.md5 _hash = hashlib.md5
...@@ -35,6 +35,7 @@ if get_compiler_config()['os'] != 'windows': ...@@ -35,6 +35,7 @@ if get_compiler_config()['os'] != 'windows':
_position_independent_flag = "-fPIC" _position_independent_flag = "-fPIC"
_compile_env = os.environ.copy() _compile_env = os.environ.copy()
_object_file_extension = '.o' _object_file_extension = '.o'
_link_cudart = '-lcudart'
else: else:
_do_not_link_flag = '-c' _do_not_link_flag = '-c'
_output_flag = '-o' _output_flag = '-o'
...@@ -75,7 +76,7 @@ def link(object_files, destination_file=None, overwrite_destination_file=True, a ...@@ -75,7 +76,7 @@ def link(object_files, destination_file=None, overwrite_destination_file=True, a
*_tf_link_flags, *_tf_link_flags,
*_include_flags, *_include_flags,
*additional_link_flags, *additional_link_flags,
'-lcudart', _link_cudart,
_shared_object_flag, _shared_object_flag,
_output_flag] _output_flag]
if not destination_file: if not destination_file:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment