feat(relax/frontend/torch): Add basic range constraint support #17898
feat(relax/frontend/torch): Add basic range constraint support #17898demoncoder-crypto wants to merge 16 commits into
Conversation
|
done @mshr-h Please check if my implementation is up to expectation |
|
Understood @mshr-h I will fix it. |
|
@mshr-h I have made the changes requested by you |
There was a problem hiding this comment.
LGTM. Thanks for the update! Please fix the CI errors so that we can merge it. @demoncoder-crypto
|
Tried to fix the errors do let me know if it works now thanks @mshr-h Edit - i also tried creating helper methods I don't know how to fix the lint error |
4145c11 to
b66a89b
Compare
|
I cannot fix the lint/pr-head its expecting less nesting which would require me to make a helper method should I proceed and make it? @mshr-h |
594a7e4 to
30d49d8
Compare
064f5d7 to
dc4ebca
Compare
dc4ebca to
5c7758c
Compare
|
|
||
| return parameters_buffers_constants, user_inputs, relax_range_constraints | ||
|
|
||
| # NEW HELPER METHOD |
There was a problem hiding this comment.
Please remove the unnecessary comment.
| return parameters_buffers_constants, user_inputs, relax_range_constraints | ||
|
|
||
| # NEW HELPER METHOD | ||
| def _add_range_constraint(self, constraints_dict, relax_tir_var, min_val, max_val): |
There was a problem hiding this comment.
@staticmethod would be better since it doesn't access the instance variable or method.
|
Adding helper functions is totally fine as long as it's readable and maintainable. @demoncoder-crypto |
|
I think we need multiple testcases so that we can cover all the possible cases:
|
|
@demoncoder-crypto pls fix the conflicts and ci |
|
Hi @mshr-h, it seems like this PR has been inactive for a while. Could I help with this? Thanks! |
|
@guan404ming Feel free to take it over! |
|
Closing as #18429 merged |
Addresses #17818