-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
(cherry picked from commit 781f8ff) Co-authored-by: BrianHarrisonAMD <[email protected]>
- Loading branch information
1 parent
5e791ce
commit 4b72d4d
Showing
8 changed files
with
286 additions
and
284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,72 @@ | ||
.. meta:: | ||
:description: Using the Find Database | ||
:description: Using the MIOpen Find Database | ||
:keywords: MIOpen, ROCm, API, documentation | ||
|
||
******************************************************************** | ||
Using the find database | ||
******************************************************************** | ||
|
||
Prior to MIOpen 2.0, you could use calls (such as ``miopenFindConvolution*Algorithm()``) to gather a | ||
set of convolution algorithms in the form of an array of ``miopenConvSolution_t`` structs. This process | ||
is time-consuming because it requires online benchmarking of competing algorithms. | ||
MIOpen 2.0 introduced :doc:`immediate mode <../how-to/find-and-immediate>`, which | ||
is based on a find database called FindDb. This database contains the results of calls to the legacy ``Find()`` stage. | ||
|
||
As of MIOpen 2.0, we introduced an :doc:`immediate mode <../how-to/find-and-immediate>`, which | ||
is based on a database that contains the results of calls to the legacy ``Find()`` stage. We refer to the | ||
find database as FindDb. | ||
.. note:: | ||
|
||
Prior to MIOpen 2.0, you could use calls (such as ``miopenFindConvolution*Algorithm()``) to gather a | ||
set of convolution algorithms in the form of an array of ``miopenConvSolution_t`` structs. This process | ||
is time consuming because it requires online benchmarking of competing algorithms. | ||
|
||
FindDb consists of two parts: | ||
|
||
* **System FindDb**: A system-wide storage that holds pre-run values for the most applicable | ||
configurations. | ||
* **User FindDb**: A per-user storage that holds results for arbitrary user-run configurations. It also | ||
serves as a cache for the ``Find()`` stage. | ||
* **System FindDb**: A system-wide storage that holds pre-run values for the most applicable | ||
configurations. | ||
* **User FindDb**: A per-user storage that holds results for arbitrary user-run configurations. It also | ||
serves as a cache for the ``Find()`` stage. | ||
|
||
User FindDb `always takes precedence` over System FindDb. | ||
The User FindDb *always takes precedence* over the System FindDb. | ||
|
||
By default, System FindDb resides within MIOpen's install location, while User FindDb resides in your | ||
By default, System FindDb resides within the MIOpen install location, while User FindDb resides in your | ||
home directory. | ||
|
||
Note that: | ||
.. note:: | ||
|
||
* The System FindDb is `not` modified upon installation of MIOpen. | ||
* There are separate Find databases for HIP and OpenCL backends. | ||
* The System FindDb is *not* modified upon installation of MIOpen. | ||
* There are separate Find databases for the HIP and OpenCL backends. | ||
|
||
Populating User FindDb | ||
============================================================= | ||
|
||
MIOpen collects FindDb information during the following API calls: | ||
|
||
* ``miopenFindConvolutionForwardAlgorithm()`` | ||
* ``miopenFindConvolutionBackwardDataAlgorithm()`` | ||
* ``miopenFindConvolutionBackwardWeightsAlgorithm()`` | ||
|
||
During the call, find data entries are collected for one `problem configuration`, which is implicitly | ||
defined by the tensor descriptors and convolution descriptor passed to API function. | ||
* ``miopenFindConvolutionForwardAlgorithm()`` | ||
* ``miopenFindConvolutionBackwardDataAlgorithm()`` | ||
* ``miopenFindConvolutionBackwardWeightsAlgorithm()`` | ||
|
||
During the call, find data entries are collected for one specific "problem configuration", which is implicitly | ||
defined by the tensor descriptors and convolution descriptor passed to the API function. | ||
|
||
Updating MIOpen and User FindDb | ||
============================================================= | ||
|
||
When you install a new version of MIOpen, this new version ignores old User FindDb files. Therefore, | ||
When you install a new version of MIOpen, the new version ignores old User FindDb files. Therefore, | ||
you don't need to move or delete the old User FindDb files. | ||
|
||
If you want to re-collect the information into the new User FindDb, you can use the same steps you | ||
To collect the previous information again into the new User FindDb, use the same steps you | ||
followed in the previous version. Re-collecting information keeps immediate mode optimized. | ||
|
||
|
||
Disabling FindDb | ||
============================================================= | ||
|
||
You can disable FindDb by setting the ``MIOPEN_DEBUG_DISABLE_FIND_DB`` environmental variable | ||
to 1: | ||
To disable FindDb, set the ``MIOPEN_DEBUG_DISABLE_FIND_DB`` environmental variable to ``1``: | ||
|
||
.. code:: bash | ||
export MIOPEN_DEBUG_DISABLE_FIND_DB=1 | ||
export MIOPEN_DEBUG_DISABLE_FIND_DB=1 | ||
.. note:: | ||
|
||
System FindDb can be cached into memory and may dramatically increase performance. To disable | ||
this option, set the ``DMIOPEN_DEBUG_FIND_DB_CACHING`` CMake configuration flag to off. | ||
System FindDb can be cached into memory, which might dramatically increase performance. To disable | ||
this option, set the ``DMIOPEN_DEBUG_FIND_DB_CACHING`` CMake configuration flag to off. | ||
|
||
.. code:: bash | ||
.. code:: bash | ||
-DMIOPEN_DEBUG_FIND_DB_CACHING=Off | ||
-DMIOPEN_DEBUG_FIND_DB_CACHING=Off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.