Skip to content

Conversation

pytorchbot
Copy link
Collaborator

Summary:
Executorch memory planning currently accepts a string identifier to represent the desired algorithm.

However, this makes it difficult to pass custom arguments to write more customized memory planning algorithms. This change allows users to pass the full memory planning function as an argument as opposed to just the string identifier.

Core changes in:

  • fbcode/executorch/exir/passes/memory_planning_pass.py
  • fbcode/executorch/exir/tests/test_memory_planning.py

Remaining changes are just to enforce compliance with new API at all call sites in codebase

NOTE: A less intrusive change could be to allow argument to be either string or entire custom functions. I opted for just passing only functions to simplify and avoid confusion

Reviewed By: zonglinpengmeta, mcremon-meta

Differential Revision: D60433641

Copy link

pytorch-bot bot commented Oct 10, 2024

🔗 Helpful Links

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

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

❌ 1 New Failure

As of commit 45993db with merge base eecf74f (image):

NEW FAILURE - The following job has failed:

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 Oct 10, 2024
…posed to string name (#4727)

Summary:
Pull Request resolved: #4727

Executorch memory planning currently accepts a string identifier to represent the desired algorithm.

However, this makes it difficult to pass custom arguments to write more customized memory planning algorithms. This change allows users to pass the full memory planning function as an argument as opposed to just the string identifier.

Core changes in:
- fbcode/executorch/exir/passes/memory_planning_pass.py
- fbcode/executorch/exir/tests/test_memory_planning.py

Remaining changes are just to enforce compliance with new API at all call sites in codebase

NOTE: A less intrusive change could be to allow argument to be either string or entire custom functions. I opted for just passing only functions to simplify and avoid confusion

Reviewed By: zonglinpeng, hsharma35, mcremon-meta

Differential Revision: D60433641

fbshipit-source-id: 0fe3677b7c3f4c3763cb1b4fe6d28ef814f2ecf9
(cherry picked from commit 618466e)
@dbort dbort force-pushed the cherry-pick-4727-by-pytorch_bot_bot_ branch from 20cfdf8 to 45993db Compare October 10, 2024 23:48
@dbort dbort mentioned this pull request Oct 11, 2024
@dbort dbort merged commit a2bc6bd into release/0.4 Oct 11, 2024
33 of 34 checks passed
@dbort dbort deleted the cherry-pick-4727-by-pytorch_bot_bot_ branch October 11, 2024 03:45
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