Skip to content
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

Find Mode TrustVerify #3604

Open
wants to merge 15 commits into
base: develop
Choose a base branch
from
Open

Find Mode TrustVerify #3604

wants to merge 15 commits into from

Conversation

cderb
Copy link
Contributor

@cderb cderb commented Mar 11, 2025

Additional MIOPEN_FIND_MODE = 6 (TrustVerify)
This mode extends DynamicHybrid

Running with TrustVerify will first attempt to load tuning results from system resources
If no solution is returned tuning will be triggered
If a solution is retuned the user find db will be checked for the solution
If solution is from the user find db it will be used
If a solution is from the system (db or model), the solution will be evaluated and the new time will be compared to the time reported by the solution
If the evaluated / reported time is less than the tolerance threshold then the system result is added to the user db and the solution is returned
If the evaluated / reported time exceeds the tolerance, then tuning will be triggered

This find mode will ensure that all configurations are tuned for the deployment system. Solutions from system resources are verified once and tuned if markedly different from expectation. Results from user dbs are considered reliable and used without further verification.

Comment on lines 667 to 668
miopenConvolutionFindModeTrustVerify =
6,
Copy link
Contributor

Choose a reason for hiding this comment

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

Needs docs like the others.
The PR description is probably pretty close to what is needed!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added doc

@cderb
Copy link
Contributor Author

cderb commented Mar 12, 2025

The performance of find mode TrustVerify is between the performance of find mode DynamicHybrid and find enforce SearchDbUpdate.
TrustVerify will have the performance of SearchDbUpdate when

  • There is no system db or model solution
  • The solution returned from system is a degree slower than reported by the solution itself based on a 1 time evaluation
    TrustVerify will have the performance of DynamicHybrid when
  • The solution returned from system resource performs as expected based on 1 time evaluation
  • Solution is present in user db

First run with TrustVerify is generally slower than DynamicHybrid.
After the first run, the user find db will be fully populated and user perf db populated with regenerated entries. All following runs should exhibit ideal runtimes.

@cderb cderb requested a review from a team as a code owner March 12, 2025 20:23
@@ -29,7 +29,6 @@ Enable this feature using these commands:

.. code:: bash

export MIOPEN_FIND_MODE=3
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Found that setting find enforce disables find mode inputs. So removing these unnecessary lines.

Copy link
Contributor

@amd-jnovotny amd-jnovotny left a comment

Choose a reason for hiding this comment

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

Looks good. I've made a couple of minor editorial suggestions.

cderb and others added 2 commits March 12, 2025 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants