Skip to content

Conversation

@nathanaelsee
Copy link
Contributor

Summary:
The byte size of shared objects is printed under the Shared Object List for models loaded from flatbuffer with memory planning annotations, but

  1. is not printed in compute api tests where the graph is manually constructed
  2. requires looking up the corresponding idx value in the Shared Object List and Value List to compare tensor sizes against real bytes used.

Adding a column in the Value List to print out the bytes used, for better readability & memory usage analysis.

Sample output from compute graph op test binary:

==================== Shared Object List ====================
   idx               sizes                   users
==================== Value List ============================
   idx      type               sizes node_type  storage_bytes    so_idx
     0 TENSORREF            [89,17,]   PREPACK
     1    TENSOR            [13,89,]     INPUT          18512
     2   STAGING
     3    TENSOR            [13,17,]    OUTPUT           3536
     4      BOOL
     5    TENSOR            [89,17,]   PREPACK           6256
     6   STAGING

Differential Revision: D62327284

Summary:
The byte size of shared objects is printed under the Shared Object List for models loaded from flatbuffer with memory planning annotations, but
1. is not printed in compute api tests where the graph is manually constructed
2. requires looking up the corresponding idx value in the Shared Object List and Value List to compare tensor sizes against real bytes used.

Adding a column in the Value List to print out the bytes used, for better readability & memory usage analysis.

Sample output from compute graph op test binary:
```
==================== Shared Object List ====================
   idx               sizes                   users
==================== Value List ============================
   idx      type               sizes node_type  storage_bytes    so_idx
     0 TENSORREF            [89,17,]   PREPACK
     1    TENSOR            [13,89,]     INPUT          18512
     2   STAGING
     3    TENSOR            [13,17,]    OUTPUT           3536
     4      BOOL
     5    TENSOR            [89,17,]   PREPACK           6256
     6   STAGING
```

Differential Revision: D62327284
@pytorch-bot
Copy link

pytorch-bot bot commented Sep 6, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/5155

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit da00039 with merge base 8afdc48 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@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 6, 2024
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot facebook-github-bot merged commit 8ff79ef into pytorch:main Sep 7, 2024
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. fb-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants