Skip to content

Conversation

@praveen-g-ctt
Copy link
Contributor

  1. aten::sym_constrain_range
  2. aten::sym_constrain_range_for_size
  3. aten::_assert_scalar

Copy link
Collaborator

@zjgarvey zjgarvey left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

I'd like to request a few small changes, and I'd also like to at least have a discussion for context on these ops and their relationship with torch.symbolic_int and torch.bind_symbolic_shape.

Copy link
Collaborator

@zjgarvey zjgarvey left a comment

Choose a reason for hiding this comment

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

Thanks for the work, Praveen.

After looking at the example IR, I think it is totally fine to merge this as-is. In future patches, it would be good to add some folders (e.g., if min and max are both %none's, just erase it). And if we see other examples where these ops could inform symbolic shape constraints in a useful way for codegen, we can make changes then.

@praveen-g-ctt
Copy link
Contributor Author

Thanks for the work, Praveen.

After looking at the example IR, I think it is totally fine to merge this as-is. In future patches, it would be good to add some folders (e.g., if min and max are both %none's, just erase it). And if we see other examples where these ops could inform symbolic shape constraints in a useful way for codegen, we can make changes then.

Sure Zach. Will add folders in future patches.

Copy link
Collaborator

@vivekkhandelwal1 vivekkhandelwal1 left a comment

Choose a reason for hiding this comment

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

LGTM

@praveen-g-ctt praveen-g-ctt merged commit fd65a66 into main Feb 5, 2025
3 checks passed
@praveen-g-ctt praveen-g-ctt deleted the torch_constrain_ops branch February 5, 2025 06:26
philkuz added a commit to gimletlabs/torch-mlir that referenced this pull request Mar 12, 2025
Pull in select changes from llvm#3943
to allow sym_constrain.
Signed-off-by: Phillip Kuznetsov <[email protected]>

Signed-off-by: Phillip Kuznetsov <[email protected]>
jorickert pushed a commit to Xilinx/torch-mlir that referenced this pull request Jun 30, 2025
1. aten::sym_constrain_range
2. aten::sym_constrain_range_for_size
3. aten::_assert_scalar
vihangm pushed a commit to gimletlabs/torch-mlir that referenced this pull request Oct 20, 2025
Pull in select changes from llvm#3943
to allow sym_constrain.
Signed-off-by: Phillip Kuznetsov <[email protected]>

Signed-off-by: Phillip Kuznetsov <[email protected]>
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.

6 participants