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

Don't make copies of input Stores fully overlapping outputs #1112

Open
manopapad opened this issue Jan 8, 2024 · 0 comments
Open

Don't make copies of input Stores fully overlapping outputs #1112

manopapad opened this issue Jan 8, 2024 · 0 comments
Labels
category:improvement PR introduces an improvement and will be classified as such in release notes

Comments

@manopapad
Copy link
Contributor

Currently, if there is (full or partial) overlap between an input and an output Store in an operation, we handle this at the cuNumeric level, since the core will not do this check for us:

if store1.overlaps(store2):
  store1 = store1.copy()
task.add_input(store1)
task.add_output(store2)

However, if the following are all true:

  • store1 and store2 are backed by the same RegionField (as a corollary, they overlap fully)
  • store1 and store2 have the same store transformation (may be unnecessary?)
  • task.add_alignment(store1, store2)
  • an unrelated bug is fixed in the core, see Add missing store overlap checks #1111 (comment)

then we can avoid making the copy, because we can expect the core to coalesce the read requirement for store1 and the write requirement for store2 into the same read-write requirement.

We must be certain that the core will apply the coalescing transformation, otherwise we will get tasks with conflicting region requirements, which Legion will not catch in release mode.

@manopapad manopapad added the category:improvement PR introduces an improvement and will be classified as such in release notes label Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:improvement PR introduces an improvement and will be classified as such in release notes
Projects
None yet
Development

No branches or pull requests

1 participant