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

Fixes for resource scoping #726

Merged
merged 4 commits into from
May 17, 2023
Merged

Conversation

magnatelee
Copy link
Contributor

This PR fixes two bugs in the resource scoping code:

  1. Node ranges weren't correctly computed to be half-open intervals
  2. The base mapper was trying to find initial processors out of empty processor ranges

@magnatelee magnatelee added the category:bug-fix PR is a bug fix and will be classified as such in release notes label May 16, 2023
@magnatelee magnatelee requested a review from jjwilke May 16, 2023 05:34
Copy link

@jjwilke jjwilke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Appears to be working in tests.

One nit question.

output.initial_proc = local_range.first();
auto target = legate_mapper_->task_target(legate_task, options);
// The initial processor just needs to have the same kind as the eventual target of this task
output.initial_proc = machine.procs(target).front();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a scenario in which even this might be empty?

Copy link
Contributor Author

@magnatelee magnatelee May 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no there isn't. that should have already been caught at this line: https://github.com/nv-legate/legate.core/blob/branch-23.05/legate/core/context.py#L177

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link

@jjwilke jjwilke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New segfault... hang on...

output.initial_proc = local_range.first();
auto target = legate_mapper_->task_target(legate_task, options);
// The initial processor just needs to have the same kind as the eventual target of this task
output.initial_proc = machine.procs(target).front();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@magnatelee magnatelee merged commit 59b5923 into nv-legate:branch-23.05 May 17, 2023
@magnatelee magnatelee deleted the scoping-fix branch May 17, 2023 21:07
manopapad pushed a commit that referenced this pull request Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:bug-fix PR is a bug fix and will be classified as such in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants