Skip to content

Fixes the "nonzero is not supported for tensors with more than INT_MAX elements" in get_all_triplets_indices#689

Merged
KevinMusgrave merged 2 commits intoKevinMusgrave:devfrom
mkmenta:remove-big-tensor-nonzero
Apr 1, 2024
Merged

Fixes the "nonzero is not supported for tensors with more than INT_MAX elements" in get_all_triplets_indices#689
KevinMusgrave merged 2 commits intoKevinMusgrave:devfrom
mkmenta:remove-big-tensor-nonzero

Conversation

@mkmenta
Copy link
Copy Markdown
Contributor

@mkmenta mkmenta commented Mar 8, 2024

This solves #688

@mkmenta
Copy link
Copy Markdown
Contributor Author

mkmenta commented Mar 8, 2024

I am not sure if there could be other places where changing the torch.where could be beneficial (in case this implementation is accepted).

I think that in get_all_pairs_indices it would be hard to have a tensor with INT_MAX elements because the tensors used in the torch.where in this case are just len(labels)*len(ref_labels).

@KevinMusgrave
Copy link
Copy Markdown
Owner

Thanks!

@KevinMusgrave KevinMusgrave merged commit cfafd3b into KevinMusgrave:dev Apr 1, 2024
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