Skip to content

Conversation

@kaushikcfd
Copy link
Collaborator

No description provided.

@kaushikcfd kaushikcfd force-pushed the decouple-domain branch 2 times, most recently from 40d1906 to 964761e Compare October 5, 2025 22:05
@kaushikcfd kaushikcfd requested a review from inducer October 5, 2025 22:10
dom2 = dom2.move_dims(isl.dim_type.param, n_params, dt, pos, 1)
else:
dt, pos = dom2.get_var_dict()[iname]
dom2 = dom2.project_out(dt, pos, 1)
Copy link
Owner

Choose a reason for hiding this comment

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

Should there be some checks here that the domains are actually independent, i.e. that the effective domains did not get modified? If nothing else, the documentation should set expectations w.r.t. the correctness guarantees here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If nothing else, the documentation should set expectations w.r.t. the correctness guarantees here.

Point of the..note:: sets the expectations.

dom2 = dom2.move_dims(isl.dim_type.param, n_params, dt, pos, 1)
else:
dt, pos = dom2.get_var_dict()[iname]
dom2 = dom2.project_out(dt, pos, 1)
Copy link
Owner

Choose a reason for hiding this comment

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

This will not always be semantically equivalent if there are statements within just inames and the remainder of the domain is ever empty.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Point (2) of the note section in the docs talk about the potential unsoundness of this transformation.


@for_each_kernel
def decouple_domain(kernel: LoopKernel,
inames: Collection[str],
Copy link
Owner

Choose a reason for hiding this comment

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

Are the remaining inames allowed to (parametrically then) depend on inames? (State so in the docs, include a test along those lines.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

They are simply projected out. We have noted in the docs that this is potentially dependency violating.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants