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

Seed Luus Jaakola with left cost since we already know it. #1692

Closed
wants to merge 3 commits into from

Conversation

damianr99
Copy link

Summary:
In scaleup, we already know the cost of the left hand boundary (the
plan using min-working set). It's possible the clamped random search
might probe the left-hand margin again, which wastes a (cached) call
to the partitioner, using up one of our precious iterations without
learning anything new. Instead we inform Luus Jaakola search we
already know the left margin cost, so in these cases we can choose a
new probe point that hopefully discovers a better minimum.

Reviewed By: henrylhtsang

Differential Revision: D53297896

Damian Reeves added 3 commits February 7, 2024 13:50
…orch#1690)

Summary:

EmbeddingOffloadScaleupProposer attempts to find an approximately
optimal trade-off between using extra cache memory to reduce prefetch
delay and the additional plan cost resulting from a more challenging
bin-packing of larger shards.

Currently a binary search is used under the assumption that the
cost would consistently decrease in the evaluated region. However,
investigation revealed that the cost region can be non-smooth and
multi-modal, leading to poor results with the binary search.

This diff implements the Luus Jaakola search procedure which is much
more robust and capable of navigating 'rough terrain'. In a subsequent
diff EmbeddingOffloadScaleupProposer will be updated to utilize this
approach instead of the binary search.

See https://en.wikipedia.org/wiki/Luus-Jaakola for detail.

Reviewed By: henrylhtsang

Differential Revision: D52686075
…torch#1691)

Summary:

Replace binary-search with Luus Jaakola. This works better at
navigating the non-smooth planner cost surface when exploring cost vs
cache memory.

Reviewed By: henrylhtsang

Differential Revision: D53296719
Summary:
In scaleup, we already know the cost of the left hand boundary (the
plan using min-working set). It's possible the clamped random search
might probe the left-hand margin again, which wastes a (cached) call
to the partitioner, using up one of our precious iterations without
learning anything new. Instead we inform Luus Jaakola search we
already know the left margin cost, so in these cases we can choose a
new probe point that hopefully discovers a better minimum.

Reviewed By: henrylhtsang

Differential Revision: D53297896
@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 Feb 7, 2024
@facebook-github-bot
Copy link
Contributor

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

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.

2 participants