Skip to content

Conversation

danthe3rd
Copy link
Contributor

Summary: Should make debugging a bit easier

Test Plan:
Example error in https://www.internalfb.com/intern/aibench/details/884106485190261 (open log for Portal or Portal+):

The following operation failed in the TorchScript interpreter.
Traceback of TorchScript, serialized code (most recent call last):
  File "code/__torch__/torch/backends/_nnapi/prepare.py", line 29, in forward
    _0 = uninitialized(__torch__.torch.classes._nnapi.Compilation)
    if torch.__is__(self.comp, None):
      _1 = (self).init(args, )
            ~~~~~~~~~~ <--- HERE
    else:
      pass
  File "code/__torch__/torch/backends/_nnapi/prepare.py", line 97, in init
    comp = __torch__.torch.classes._nnapi.Compilation.__new__(__torch__.torch.classes._nnapi.Compilation)
    _22 = (comp).__init__()
    _23 = (comp).init(self.ser_model, self.weights, )
           ~~~~~~~~~~ <--- HERE
    self.comp = comp
    return None

Traceback of TorchScript, original code (most recent call last):
  File "/data/users/dhaziza/fbsource/fbcode/buck-out/dev/gen/mobile-vision/d2go/projects/facegen/tools/export_to_app#link-tree/torch/backends/_nnapi/prepare.py", line 47, in forward
    def forward(self, args: List[torch.Tensor]) -> List[torch.Tensor]:
        if self.comp is None:
            self.init(args)
            ~~~~~~~~~ <--- HERE
        comp = self.comp
        assert comp is not None
  File "/data/users/dhaziza/fbsource/fbcode/buck-out/dev/gen/mobile-vision/d2go/projects/facegen/tools/export_to_app#link-tree/torch/backends/_nnapi/prepare.py", line 42, in init
        self.weights = [w.contiguous() for w in self.weights]
        comp = torch.classes._nnapi.Compilation()
        comp.init(self.ser_model, self.weights)
        ~~~~~~~~~ <--- HERE
        self.comp = comp
RuntimeError: [enforce fail at nnapi_model_loader.cpp:171] result == ANEURALNETWORKS_NO_ERROR. NNAPI returned error: 4

Reviewed By: axitkhurana

Differential Revision: D28287450

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented May 27, 2021

💊 CI failures summary and remediations

As of commit adc60a4 (more details on the Dr. CI page):


💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D28287450

Summary:
Pull Request resolved: pytorch#59106

Should make debugging a bit easier

Test Plan:
Example error in https://www.internalfb.com/intern/aibench/details/884106485190261 (open log for Portal or Portal+):
```
The following operation failed in the TorchScript interpreter.
Traceback of TorchScript, serialized code (most recent call last):
  File "code/__torch__/torch/backends/_nnapi/prepare.py", line 29, in forward
    _0 = uninitialized(__torch__.torch.classes._nnapi.Compilation)
    if torch.__is__(self.comp, None):
      _1 = (self).init(args, )
            ~~~~~~~~~~ <--- HERE
    else:
      pass
  File "code/__torch__/torch/backends/_nnapi/prepare.py", line 97, in init
    comp = __torch__.torch.classes._nnapi.Compilation.__new__(__torch__.torch.classes._nnapi.Compilation)
    _22 = (comp).__init__()
    _23 = (comp).init(self.ser_model, self.weights, )
           ~~~~~~~~~~ <--- HERE
    self.comp = comp
    return None

Traceback of TorchScript, original code (most recent call last):
  File "/data/users/dhaziza/fbsource/fbcode/buck-out/dev/gen/mobile-vision/d2go/projects/facegen/tools/export_to_app#link-tree/torch/backends/_nnapi/prepare.py", line 47, in forward
    def forward(self, args: List[torch.Tensor]) -> List[torch.Tensor]:
        if self.comp is None:
            self.init(args)
            ~~~~~~~~~ <--- HERE
        comp = self.comp
        assert comp is not None
  File "/data/users/dhaziza/fbsource/fbcode/buck-out/dev/gen/mobile-vision/d2go/projects/facegen/tools/export_to_app#link-tree/torch/backends/_nnapi/prepare.py", line 42, in init
        self.weights = [w.contiguous() for w in self.weights]
        comp = torch.classes._nnapi.Compilation()
        comp.init(self.ser_model, self.weights)
        ~~~~~~~~~ <--- HERE
        self.comp = comp
RuntimeError: [enforce fail at nnapi_model_loader.cpp:171] result == ANEURALNETWORKS_NO_ERROR. NNAPI returned error: 4
```

Reviewed By: axitkhurana

Differential Revision: D28287450

fbshipit-source-id: bafba672dbbbab6a5caf69f7b3cd0009a5382b5b
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D28287450

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 0b040e1.

deniskokarev pushed a commit to deniskokarev/pytorch that referenced this pull request Jun 9, 2021
Summary:
Pull Request resolved: pytorch#59106

Should make debugging a bit easier

Test Plan:
Example error in https://www.internalfb.com/intern/aibench/details/884106485190261 (open log for Portal or Portal+):
```
The following operation failed in the TorchScript interpreter.
Traceback of TorchScript, serialized code (most recent call last):
  File "code/__torch__/torch/backends/_nnapi/prepare.py", line 29, in forward
    _0 = uninitialized(__torch__.torch.classes._nnapi.Compilation)
    if torch.__is__(self.comp, None):
      _1 = (self).init(args, )
            ~~~~~~~~~~ <--- HERE
    else:
      pass
  File "code/__torch__/torch/backends/_nnapi/prepare.py", line 97, in init
    comp = __torch__.torch.classes._nnapi.Compilation.__new__(__torch__.torch.classes._nnapi.Compilation)
    _22 = (comp).__init__()
    _23 = (comp).init(self.ser_model, self.weights, )
           ~~~~~~~~~~ <--- HERE
    self.comp = comp
    return None

Traceback of TorchScript, original code (most recent call last):
  File "/data/users/dhaziza/fbsource/fbcode/buck-out/dev/gen/mobile-vision/d2go/projects/facegen/tools/export_to_app#link-tree/torch/backends/_nnapi/prepare.py", line 47, in forward
    def forward(self, args: List[torch.Tensor]) -> List[torch.Tensor]:
        if self.comp is None:
            self.init(args)
            ~~~~~~~~~ <--- HERE
        comp = self.comp
        assert comp is not None
  File "/data/users/dhaziza/fbsource/fbcode/buck-out/dev/gen/mobile-vision/d2go/projects/facegen/tools/export_to_app#link-tree/torch/backends/_nnapi/prepare.py", line 42, in init
        self.weights = [w.contiguous() for w in self.weights]
        comp = torch.classes._nnapi.Compilation()
        comp.init(self.ser_model, self.weights)
        ~~~~~~~~~ <--- HERE
        self.comp = comp
RuntimeError: [enforce fail at nnapi_model_loader.cpp:171] result == ANEURALNETWORKS_NO_ERROR. NNAPI returned error: 4
```

Reviewed By: axitkhurana

Differential Revision: D28287450

fbshipit-source-id: ccd10301e1492f8879f9d6dd57b60c4e683ebb9e
@danthe3rd danthe3rd deleted the export-D28287450 branch October 21, 2021 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants