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

Updated amg.py to allow batching of large mask sets and avoid over-sized torch.nonzero() calls #569

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

MartinKlefas
Copy link

@MartinKlefas MartinKlefas commented Sep 21, 2023

Fixes issue where Tensor.nonzero would fail on GPU for tensors containing more than INT_MAX elements.

Changes made:

  • Implemented a chunking mechanism to handle tensors in manageable sizes.
  • Each chunk's size is safely under the INT_MAX limit.
  • Non-zero indices from each chunk are concatenated to produce the final result.

This resolves the issue reported in #554 which correlates with the PyTorch issue pytorch/pytorch#51871.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 21, 2023
Copy link

@ron44-5 ron44-5 left a comment

Choose a reason for hiding this comment

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

Delete all permanently and remove all bug reset harder

@MartinKlefas
Copy link
Author

Delete all permanently and remove all bug reset harder

Hi, sorry if I've misunderstood something - but are these instructions for changes I need to make to the PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants