samskalicky opened a new pull request #20221: URL: https://github.com/apache/incubator-mxnet/pull/20221
## Description ## Reuse the params in `cached_op_args` for subsequent calls to `optimize_for`. Currently, if a new param is added during one call to `optimize_for` it is not available for subsequent calls. For example, if you run multiple graph passes then you would need to export/import to get the param. This PR checks if `cached_op_args` is set and reuses those, otherwise it just calls `collect_params` like normal. ## Checklist ## ### Essentials ### - [ ] PR's title starts with a category (e.g. [BUGFIX], [MODEL], [TUTORIAL], [FEATURE], [DOC], etc) - [ ] Changes are complete (i.e. I finished coding on this PR) - [ ] All changes have test coverage - [ ] Code is well-documented ### Changes ### - [ ] Feature1, tests, (and when applicable, API doc) - [ ] Feature2, tests, (and when applicable, API doc) ## Comments ## - If this change is a backward incompatible change, why must this change be made. - Interesting edge cases to note here -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
