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

Do not link against cudart as default

parent 7a292ebb
No related branches found
No related tags found
No related merge requests found
...@@ -62,7 +62,7 @@ def link(object_files, ...@@ -62,7 +62,7 @@ def link(object_files,
destination_file=None, destination_file=None,
overwrite_destination_file=True, overwrite_destination_file=True,
additional_link_flags=[], additional_link_flags=[],
link_cudart=True): link_cudart=False):
"""Compiles given :param:`source_file` to a Tensorflow shared Library. """Compiles given :param:`source_file` to a Tensorflow shared Library.
.. warning:: .. warning::
...@@ -100,7 +100,7 @@ def link_and_load(object_files, ...@@ -100,7 +100,7 @@ def link_and_load(object_files,
destination_file=None, destination_file=None,
overwrite_destination_file=True, overwrite_destination_file=True,
additional_link_flags=[], additional_link_flags=[],
link_cudart=True): link_cudart=False):
import tensorflow as tf import tensorflow as tf
destination_file = link(object_files, destination_file = link(object_files,
...@@ -190,7 +190,8 @@ def compile_sources_and_load(host_sources, ...@@ -190,7 +190,8 @@ def compile_sources_and_load(host_sources,
cuda_sources=[], cuda_sources=[],
additional_compile_flags=[], additional_compile_flags=[],
additional_link_flags=[], additional_link_flags=[],
compile_only=False): compile_only=False,
link_cudart=False):
import tensorflow as tf import tensorflow as tf
...@@ -226,7 +227,7 @@ def compile_sources_and_load(host_sources, ...@@ -226,7 +227,7 @@ def compile_sources_and_load(host_sources,
module_file = link(object_files, module_file = link(object_files,
overwrite_destination_file=False, overwrite_destination_file=False,
additional_link_flags=additional_link_flags, additional_link_flags=additional_link_flags,
link_cudart=cuda_sources) link_cudart=link_cudart and cuda_sources)
if not compile_only: if not compile_only:
module = tf.load_op_library(module_file) module = tf.load_op_library(module_file)
if module: if module:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment