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

[FEA] Multi-Segment Configuration #102

Open
1 task
ryanolson opened this issue Jun 29, 2022 · 0 comments
Open
1 task

[FEA] Multi-Segment Configuration #102

ryanolson opened this issue Jun 29, 2022 · 0 comments
Assignees
Labels
feature request New feature or request

Comments

@ryanolson
Copy link
Contributor

The default configuration hard coded into Executor is to create one copy of each segment on partition 0 for each segment in the pipeline definition.

Resolution of this issue should:

  • provide a configuration definition to the pipeline definition on the number of each types of segments that should be created based on the local knowledge of the number of partitions available on the specific machine.

This means we might need to first register the pipeline definition with the executor and return to the user a pipeline manager object. The pipeline manager object will have both the knowledge of the pipeline definition as well as the resources visible to the executor.

auto pipeline = make_pipeline();
// define segments

// configure options
auto options = make_options().enable_performance_opts();

// construct the executor and runtime resources
Executor executor(std::move(options));

// register the pipeline and receive back the configuration object
auto manager = executor.register_pipeline(std::move(pipeline));

// set properties on manager
auto device_count = manager->device_count();
manager->make_segment_assignment("seg_1", 0);
for(int i=0; i<device_count; i++)
{
    // make two copies of "seg_2" per cuda device
    manager->make_segment_assignment("seg_2", i);
    manager->make_segment_assignment("seg_2", i);
}

// execute pipeline
manager->start();

// await pipeline
manager->join();

Another way to do this is to annotate the segment definition with scaling options. One could annotate "seg_2" with a SCALE_BY_DEVICE with a value of 2. This is however more of a global configuration, where as the method above lets you perform the configuration on a machine by machine basis.

For the multi-segment, single machine, the two forms are equivalent. But in the multi-segment, multi-machine scenario, the annotations on the segment might be too restrictive, where applying a per machine configuration either by code (above) or by a file, would allow you to specialize each machine individually.

@ryanolson ryanolson added the feature request New feature or request label Jun 29, 2022
@jarmak-nv jarmak-nv moved this to Todo in MRC Boards Jul 22, 2022
@mdemoret-nv mdemoret-nv added this to the 23.11 - MNMG milestone Aug 21, 2023
@mdemoret-nv mdemoret-nv self-assigned this Aug 21, 2023
@mdemoret-nv mdemoret-nv modified the milestones: 23.11 - MNMG, 24.03 - MNMG Dec 7, 2023
@mdemoret-nv mdemoret-nv removed this from the 24.03 - MNMG milestone Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
Status: Todo
Status: Todo
Development

No branches or pull requests

2 participants