-
Notifications
You must be signed in to change notification settings - Fork 480
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor partitioners to make them more modular (#1696)
Summary: Pull Request resolved: #1696 # Motivation People have been wanting to test out their ideas in the partitioner for a long time. Most of the ideas involves _device_partition and OrderedDeviceHardware, e.g., D53532747 and Ashwin's commit D53674779. However, its not easy to land those changes. Hence we have this diff, which aims at making it easier to create a new partitioner from the greedy partitioner and inherit most of the functions. Just to illustrate how this diff can help creating new partitioners: * For D53532747, users can just override _device_partition. * For D53674779, users can create a new OrderedDeviceHardware and override _establish_minheap * For D45169975, users can create a new OrderedDeviceHardware which has the next shard information and override _device_partition. Or maybe create an `assign_shard_to_device()` or `assign_shard_to_devices()` interface per damianr99 suggestion. Reviewed By: damianr99, ge0405 Differential Revision: D53628705 fbshipit-source-id: fd980ac7fb187a9dc6adb87428fc22f537729eb4
- Loading branch information
1 parent
8e41b29
commit a860519
Showing
1 changed file
with
18 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters