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

patchcore torch.pairwise_distance OOM on larger datasets #110

Closed
opassos opened this issue Feb 21, 2022 · 4 comments
Closed

patchcore torch.pairwise_distance OOM on larger datasets #110

opassos opened this issue Feb 21, 2022 · 4 comments
Assignees
Labels
Enhancement New feature or request Model
Milestone

Comments

@opassos
Copy link

opassos commented Feb 21, 2022

I get CUDA memory blowing when doing larger datasets

return torch.pairwise_distance(x1, x2, p, eps, keepdim)
RuntimeError: CUDA out of memory. Tried to allocate 724.00 MiB (GPU 0; 11.00 GiB total capacity; 7.62 GiB already allocated; 190.31 MiB free; 8.77 GiB reserved in total by PyTorch)

Is there anything that could be done here? like moving this computation to CPU?

@innat
Copy link
Contributor

innat commented Feb 23, 2022

@opassos Have you faced this patchcore issue #111?

@samet-akcay
Copy link
Contributor

Hi @opassos, yeah, as you said, we could make device type optional in the components. Currently almost all of them (ie., model, anomaly-map generators, metric computation) are on GPU, which may not be always efficient.

@daMichaelB
Copy link

I guess i have the same problem. I opened up this discussion #115 as i was not aware of this issue

@samet-akcay samet-akcay added Model Enhancement New feature or request labels Apr 1, 2022
@samet-akcay samet-akcay added this to the Backlog milestone Apr 4, 2022
@samet-akcay samet-akcay modified the milestones: Backlog, v0.2.7 Apr 8, 2022
@samet-akcay samet-akcay modified the milestones: v0.2.7, v0.2.8 Apr 20, 2022
@samet-akcay samet-akcay removed this from the v0.3.1 milestone Jun 27, 2022
@ashwinvaidya17 ashwinvaidya17 added this to the Backlog milestone Oct 3, 2022
@samet-akcay
Copy link
Contributor

Closing as this has been addressed in #1267

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Model
Projects
None yet
Development

No branches or pull requests

6 participants