Repository navigation
Conversation
|
Hi @tlopex, could you review this Relax closure-reference correctness fix when you have a chance? It preserves functions referenced by make_closure, including their signatures and GlobalVar identity, across InlinePrivateFunctions, ExpandTupleArguments, and RemoveUnusedParameters. The three focused closure regressions and existing direct-call controls are included, and the current CI checks are green. Thanks! |
|
Hi @tqchen, could you review this fix for closure-referenced private functions when you have a chance? It preserves their definitions and signatures across InlinePrivateFunctions, ExpandTupleArguments, and RemoveUnusedParameters. The five current CI checks are green. Thanks! |
|
Hi @tqchen @tlopex, could you review this closure-reference correctness fix when convenient? It preserves private functions and their signatures when referenced through make_closure across InlinePrivateFunctions, ExpandTupleArguments, and RemoveUnusedParameters. The focused regressions and direct-call controls are included, and the five currently reported CI contexts are successful. Thanks! |
Private functions passed to
make_closurestill need their original definitions and call signatures. These passes previously updated direct calls only and could remove or replace a function while leaving its closure reference behind.InlinePrivateFunctions;ExpandTupleArguments;RemoveUnusedParameters.The three passes share a small internal reference collector. Functions used only by direct calls remain eligible for the existing optimizations.
Closes #20593
Closes #20653
Closes #20654
Tests:
pytest tests/python/relax/test_transform_inline_private_functions.py tests/python/relax/test_transform_expand_tuple_args.py tests/python/relax/test_transform_remove_unused_parameters.py -q: 12 passed, including the existing direct-call and recursion controls.