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

Remove all usages of unnecessary `-lcudart`

parent b34c172c
No related branches found
No related tags found
No related merge requests found
...@@ -16,13 +16,13 @@ from sysconfig import get_paths ...@@ -16,13 +16,13 @@ from sysconfig import get_paths
import pytest import pytest
import sympy import sympy
from pystencils_autodiff import create_backward_assignments
from pystencils_autodiff._file_io import write_file
from pystencils_autodiff.backends.astnodes import TensorflowModule
import pystencils import pystencils
from pystencils.cpu.cpujit import get_compiler_config from pystencils.cpu.cpujit import get_compiler_config
from pystencils.include import get_pystencils_include_path from pystencils.include import get_pystencils_include_path
from pystencils_autodiff import create_backward_assignments
from pystencils_autodiff._file_io import write_file
from pystencils_autodiff.backends.astnodes import TensorflowModule
def test_detect_cpu_vs_cpu(): def test_detect_cpu_vs_cpu():
...@@ -125,11 +125,9 @@ def test_native_tensorflow_compilation_gpu(): ...@@ -125,11 +125,9 @@ def test_native_tensorflow_compilation_gpu():
# 'g++-6', # 'g++-6',
command = ['nvcc', command = ['nvcc',
temp_file.name, temp_file.name,
'-lcudart',
'--expt-relaxed-constexpr', '--expt-relaxed-constexpr',
'-ccbin', '-ccbin',
get_compiler_config()['tensorflow_host_compiler'], get_compiler_config()['tensorflow_host_compiler'],
'-lcudart',
'-std=c++14', '-std=c++14',
'-x', '-x',
'cu', 'cu',
...@@ -141,13 +139,12 @@ def test_native_tensorflow_compilation_gpu(): ...@@ -141,13 +139,12 @@ def test_native_tensorflow_compilation_gpu():
subprocess.check_call(command) subprocess.check_call(command)
# command = ['clang-7', '-shared', temp_file.name, '--cuda-path=/usr/include', '-std=c++14', command = ['c++', '-fPIC', 'foo_gpu.o',
# '-fPIC', '-lcudart', '-o', 'foo.so'] + compile_flags + link_flags + extra_flags
command = ['c++', '-fPIC', '-lcudart', 'foo_gpu.o',
'-shared', '-o', 'foo_gpu.so'] + link_flags '-shared', '-o', 'foo_gpu.so'] + link_flags
subprocess.check_call(command) subprocess.check_call(command)
lib = tf.load_op_library(join(os.getcwd(), 'foo_gpu.so')) lib = tf.load_op_library(join(os.getcwd(), 'foo_gpu.so'))
assert 'call_forward2' in dir(lib) assert 'call_forward2' in dir(lib)
#
assert 'call_backward2' in dir(lib) assert 'call_backward2' in dir(lib)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment