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

RFE: Mapping contiguity through splits #262

Open
csarofeen opened this issue Aug 3, 2020 · 0 comments
Open

RFE: Mapping contiguity through splits #262

csarofeen opened this issue Aug 3, 2020 · 0 comments

Comments

@csarofeen
Copy link
Owner

To figure out if we can index some dimensions contiguously we look at the operations that created a particular IterDomain. For example if we have:

tv0 = 3DContigTensor
tv0->merge(1)
tv0->merge(0)

We can look back at the merges in order, map them back to the root domain, and figure out they're both contiguous because they operate on consecutive root domains that are also contiguous. This approach works well no matter the order for merge operations:

tv0 = 3DContigTensor
tv0->merge(1)
tv0->merge(0)

However, this approach can not under split operations, because it's hard to track the order in the split, i.e.

tv0 = 3DContigTensor
tv0->merge(1)
tv0->split(0, 4)
tv0->merge(0)
tv0->merge(0)

This still results in a fully contiguous access, but it's hard to track the ordering of that split.

We could track the ordering of these operations ignoring reduction to do this analysis, or we could create a "get inputs of" function that would return inputs in an order preserving manner so get inputs of the final domain would return the root domains in their correct ordering of the domain.

The nice thing about doing this is that a merge could appear reversible (from the perspective of indexing).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant