-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[tuning] Do not insert default perf-config into empty tuning container #2296
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NO. This change contradicts to the requirements for the mentioned functions.
GetDefaultPerformanceConfig is only one function in solver which shall return valid result if IsApplicable=true.
https://github.com/ROCmSoftwarePlatform/MIOpen/blob/b8b51dde22f6d3b3b18e01a1b6c3c5caf570470b/src/include/miopen/solver.hpp#L97-L102
Also, the ComputedContainer definition says that configs generated from "spare" and "main" sets cannot cover all possible combinations of available parameters. At the same time result of IsApplicable not limited and based on all possible combinations, so Is Applicable cannot guarantee that the ComputedContainer will not be empty.
https://github.com/ROCmSoftwarePlatform/MIOpen/blob/b8b51dde22f6d3b3b18e01a1b6c3c5caf570470b/src/include/miopen/generic_search.hpp#L135-L149
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically LGTM, but what Kamil said should be resolved in one way or another and I am not the one to talk about perf params of specific solvers.
I would like to add though it is possible to add the default config to containers of all solvers that need it, but it would require additional work.
The current proposal is functional in nature, meaning that how tuning functions would change. Before and after my PR default config was used as a failure recovery option. The change disables that entirely as solver is considered faulty for the specific config. This should be considered before merging.
A compromise solution is to instead produce some message in case the default config has been added, but I am not sure what severity it should have. That would not change the behaviour, but given the circumstances it would probably be completely ignored by everybody.
I do not see any contradiction. Requirement reside in ticket #866, esp. pls see "Restrictions" at #866 (comment) |
@atamazov You can change solver requirements and their behavior, but this must be done simultaneously with solvers update or after . |
@shurale-nkn I periodically update the requirements to make them clearer. Usually, as soon as I see some ambiguities or omissions that can lead to discrepancies. I do this primarily for the convenience of programmers, and not (as one might think) to confuse them. Such changes are always made in accordance with the original intent; otherwise the changes are marked as "QUIET CHANGE". I think you do that same when you write specs. |
My comments are not about confused programmers. The current version of the ComputedContainer cannot guarantee that the container is not empty when IsApplicable()=true, because from information in code (and I prefer to think that the function description in the code has a higher priority, because it needs to be approved and merged) IsApplicable and GetDefaultPerformanceConfig operates over full list of solver parameters and their combinations, and should have a direct relationship. But GenericSearch uses only limited set of combinations based on For this PR, need to manually check all solvers for the presence of GetDefaultPerformanceConfig in the code of the interface working with GenericSearch and if this is need to add it, because there was no such requirement before, according to the description of the ComputedContainer and its fields. |
Converted to draft as I can't convince Kamil. If he doesn't change his mind within a week, this PR should be closed and the necessary changes should be made in the Solver/Invoker spec (#866). |
An addition to #2279, a partial fix for #2270. Resolves #2279 (comment).
[Attribution] @junliume @JehandadKhan