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

Conversion keeps failing when trying to sub-sample a tensor using a list #321

Open
aneeshbhattacharya opened this issue Oct 26, 2024 · 1 comment
Assignees
Labels
status:awaiting user response When awaiting user response status:more data needed This label needs to be added to stale issues and PRs. type:bug Bug

Comments

@aneeshbhattacharya
Copy link

Description of the bug:

Bad StatusOr access: FAILED_PRECONDITION: DNN library initialization failed. Look at the errors above for more details.

While executing %nonzero : [num_users=2] = call_function[target=torch.ops.aten.nonzero.default](args = (%write_mlir_debuginfo_10317,), kwargs = {})
Original traceback:
File "/home/rvt/Desktop/XFeat/xfeat-port-dlc/src/accelerated_features/modules/xfeat_full_with_matcher.py", line 90, in forward
idx0, idx1 = self.match(desc1[0], desc2[0]) # Since we are only matching 1 image at a time, simply match
File "/home/rvt/Desktop/XFeat/xfeat-port-dlc/src/accelerated_features/modules/xfeat_full_with_matcher.py", line 215, in match
valid_indices = torch.nonzero(combined_mask)[:, 0] # [K], where K is number of valid matches

/home/rvt/.conda/envs/latest_ai_edge/lib/python3.11/site-packages/torch/utils/pytree.py:803: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad(True), rather than torch.tensor(sourceTensor).
leaves = list(leaves)
E1026 01:21:50.875000 87860 site-packages/torch/fx/experimental/recording.py:298] failed while running _rename_unbacked_to(*(u0, u6), **{})
Traceback (most recent call last):

NOTE: Same issue also occurs with an operation torch.mask_select() and tensor[list]

Actual vs expected behavior:

No response

Any other information you'd like to share?

No response

@pkgoogle pkgoogle self-assigned this Oct 28, 2024
@pkgoogle
Copy link
Contributor

Hi @aneeshbhattacharya, can you please share more context/code which produces the error (preferably the more code the better). Also please share code snippets with triple backticks for better formatting:

Example how it should look when editing:
```py
# Example python code
```

produced comment:

# Example python code

Thanks for your help.

@pkgoogle pkgoogle added status:awaiting user response When awaiting user response status:more data needed This label needs to be added to stale issues and PRs. labels Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:awaiting user response When awaiting user response status:more data needed This label needs to be added to stale issues and PRs. type:bug Bug
Projects
None yet
Development

No branches or pull requests

2 participants