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

Generate artifact: pyronn_layers.so

parent 86199ffa
Branches
No related merge requests found
Pipeline #17949 passed with stage
in 3 minutes and 40 seconds
......@@ -11,7 +11,7 @@ full:
- python setup.py test
tags:
- docker
#artifacts:
#when: always
#paths:
#- htmlcov
- cuda
artifacts:
paths:
- 'pyronn_layers.so'
......@@ -2,6 +2,7 @@
import glob
import os.path
import tensorflow as tf
from pkg_resources import DistributionNotFound, get_distribution
import pyronn_layers
......@@ -24,10 +25,12 @@ assert _pyronn_layers_sources, "Could not find the source files of PYRO-NN-Layer
"Did you check out the Git submodule (`git submodule update --init --recursive`)?"
_pyronn_layers_module = pystencils_autodiff.tensorflow_jit.compile_sources_and_load(
_pyronn_layers_module_file = pystencils_autodiff.tensorflow_jit.compile_sources_and_load(
[],
_pyronn_layers_sources,
additional_compile_flags=['-I' + _pyronn_layers_dir, '-DGOOGLE_CUDA']) # TODO: msvc! \D
additional_compile_flags=['-I' + _pyronn_layers_dir, '-DGOOGLE_CUDA'],
compile_only=True) # TODO: msvc! \D
_pyronn_layers_module = tf.load_op_library(_pyronn_layers_module_file)
for obj in dir(_pyronn_layers_module):
setattr(pyronn_layers, obj, getattr(_pyronn_layers_module, obj))
......@@ -7,7 +7,13 @@
"""
"""
from shutil import copyfile
def test_import():
import pyronn_layers
def test_compile_pyronn_layers_so():
import pyronn_layers
copyfile(pyronn_layers._pyronn_layers_module_file, 'pyronn_layers.so')
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment