Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

add pren #8

Merged
merged 1 commit into from
Dec 7, 2023
Merged

add pren #8

merged 1 commit into from
Dec 7, 2023

Conversation

GreatV
Copy link
Contributor

@GreatV GreatV commented Dec 4, 2023

Export fails for both frameworks.

  • pytorch
    raise Unsupported(
torch._dynamo.exc.Unsupported: speculate_subgraph: while introspecting the user-defined autograd.Function, we were unable to trace function `trampoline_autograd_bwd` into a single graph. This means that Dynamo was unable to prove safety for this API and will fall back to eager-mode PyTorch, which could lead to a slowdown. Scroll up for the stack trace of the initial exception. The reason was: call_method GetAttrVariable(AutogradFunctionContextVariable(Function), saved_variables) __getitem__ (ConstantVariable(int),) {}

from user code:
   File "/home/greatx/repos/pren/Nets/model.py", line 46, in forward
    f3, f5, f7 = self.cnn(input)
  File "/home/greatx/repos/pren/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/greatx/repos/pren/Nets/EfficientNet.py", line 165, in forward
    x = self._swish(self._bn0(self._conv_stem(inputs)))
  File "/home/greatx/repos/pren/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/greatx/repos/pren/Nets/EfficientNet_utils.py", line 47, in forward
    return SwishImplementation.apply(x)

Set TORCH_LOGS="+dynamo" and TORCHDYNAMO_VERBOSE=1 for more information
  • paddle
ValueError: In transformed code:

    File "/home/greatx/repos/pren.paddle/Nets/model.py", line 42, in forward
        f3, f5, f7 = self.cnn(input)
    File "/home/greatx/repos/pren.paddle/Nets/EfficientNet.py", line 172, in forward
        x = self._swish(self._bn0(self._conv_stem(inputs)))
    File "/home/greatx/repos/pren.paddle/Nets/EfficientNet_utils.py", line 57, in forward
        class MemoryEfficientSwish(nn.Layer):
            def forward(self, x):
                return SwishImplementation.apply(x)
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE


    ValueError: (InvalidArgument) At least one output of `PyLayer.forward` is a `Tensor`. (at /paddle/paddle/fluid/pybind/eager_py_layer.cc:379)

@GreatV
Copy link
Contributor Author

GreatV commented Dec 6, 2023

@SigureMo SigureMo added the HappyOpenSource 快乐开源活动issue与PR label Dec 6, 2023
Copy link
Contributor

@2742195759 2742195759 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants