Skip to content

Conversation

@saitcakmak
Copy link
Contributor

Summary:
Fixes #2919

The batched indexing of the covariance tensor was consuming extraordinary amounts of memory, enough to crash servers with moderately sized tensors.

Profiling separate_mtmvn with n_test=64 (256 was crashing my server) using the repro from the above issue.

Before: Using >7GB ram and taking >800ms
{F1980143884}

After: Using ~5e-5 GB ram and taking ~20ms
{F1980143899}

Differential Revision: D78038356

Summary:
Fixes meta-pytorch#2919

The batched indexing of the covariance tensor was consuming extraordinary amounts of memory, enough to crash servers with moderately sized tensors.

Profiling `separate_mtmvn` with `n_test=64` (256 was crashing my server) using the repro from the above issue.

Before: Using >7GB ram and taking >800ms
{F1980143884}

After: Using ~5e-5 GB ram and taking ~20ms
{F1980143899}

Differential Revision: D78038356
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot facebook-github-bot added CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported labels Jul 9, 2025
@codecov
Copy link

codecov bot commented Jul 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (44299a1) to head (15861c0).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #2920   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          212       212           
  Lines        19819     19817    -2     
=========================================
- Hits         19819     19817    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 71f03ea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported Merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Excessive memory usage with ModelListGP

2 participants