Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pystencils_autodiff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
pycodegen
pystencils_autodiff
Commits
3b970251
Commit
3b970251
authored
5 years ago
by
Stephan Seitz
Browse files
Options
Downloads
Patches
Plain Diff
Remove all usages of unnecessary `-lcudart`
parent
b34c172c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_native_tensorflow_compilation.py
+5
-8
5 additions, 8 deletions
tests/test_native_tensorflow_compilation.py
with
5 additions
and
8 deletions
tests/test_native_tensorflow_compilation.py
+
5
−
8
View file @
3b970251
...
@@ -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
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment