Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix led torchscript #12735

Merged
merged 2 commits into from
Jul 15, 2021
Merged

Fix led torchscript #12735

merged 2 commits into from
Jul 15, 2021

Conversation

LysandreJik
Copy link
Member

LED can't run on torchscript:

Failure
Traceback (most recent call last):
  File "/home/xxx/transformers/tests/test_modeling_common.py", line 538, in _create_and_check_torchscript
    traced_model = torch.jit.trace(
  File "/home/xxx/transformers/.env/lib/python3.8/site-packages/torch/jit/_trace.py", line 735, in trace
    return trace_module(
  File "/home/xxx/transformers/.env/lib/python3.8/site-packages/torch/jit/_trace.py", line 952, in trace_module
    module._c._create_method_from_trace(
RuntimeError: 0INTERNAL ASSERT FAILED at "/pytorch/torch/csrc/jit/ir/alias_analysis.cpp":532, please report a bug to PyTorch. We don't have an op for aten::constant_pad_nd but it isn't a special case.  Argument types: Tensor, int[], bool, 

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/xxx/transformers/tests/test_modeling_led.py", line 284, in test_torchscript
    self._create_and_check_torchscript(config, inputs_dict)
  File "/home/xxx/transformers/tests/test_modeling_common.py", line 545, in _create_and_check_torchscript
    self.fail("Couldn't trace module.")
AssertionError: Couldn't trace module.

@LysandreJik LysandreJik merged commit 959d448 into master Jul 15, 2021
@LysandreJik LysandreJik deleted the fix-led-torchscript branch July 15, 2021 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants