Commit f13da939 authored by Stephan Seitz's avatar Stephan Seitz
Browse files

Attach code to operation generated by torch_native

parent 543efa95
Pipeline #17105 failed with stage
in 2 minutes and 4 seconds
......@@ -141,7 +141,7 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'alabaster'
# html_theme = 'sphinx_rtd_theme' # official readthedocs theme used also by Martin
# html_theme = 'sphinx_rtd_theme' #official readthedocs theme used also by Martin
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
......
......@@ -122,6 +122,7 @@ def generate_torch(destination_folder,
from torch.utils.cpp_extension import load
compiled_operation = load(operation_string, required_files, verbose=True,
extra_cuda_cflags=[] if is_cuda else [])
compiled_operation.code = output
return compiled_operation
......@@ -163,6 +164,7 @@ def create_autograd_function(autodiff_obj, inputfield_to_tensor_dict, forward_lo
cls.saved = None
cls.forward = forward
cls.backward = backward
cls.code = compiled_operation.code
return cls()
else:
op = pystencils_autodiff.backends._pytorch.create_autograd_function(autodiff_obj,
......
Markdown is supported
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