Skip to content

Commit

Permalink
Docs: persistent cache update for 1.7 (#1418)
Browse files Browse the repository at this point in the history
* Updated documentation to tell users to delete persistent cache is their compiler changes.

* added note on user db removal.

* Synched sections and added cross links.
  • Loading branch information
Daniel Lowell authored Dec 17, 2018
1 parent 6c631b4 commit 49c4891
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,16 @@ An example cmake step can be:
CXX=/opt/rocm/hcc/bin/hcc cmake -DMIOPEN_BACKEND=HIP -DCMAKE_PREFIX_PATH="/opt/rocm/hcc;/opt/rocm/hip" ..
```

#### Setting up locations
#### Setting Up Locations

By default the install location is set to '/opt/rocm', this can be set by using `CMAKE_INSTALL_PREFIX`:

```
cmake -DMIOPEN_BACKEND=OpenCL -DCMAKE_INSTALL_PREFIX=<miopen-installed-path> ..
```

##### System Performance Database and User Database

The default path to the System PerfDb is `miopen/share/miopen/db/` within install location. The default path to the User PerfDb is `~/.config/miopen/`. For development purposes, setting `BUILD_DEV` will change default path to both database files to the source directory:

```
Expand All @@ -99,6 +101,21 @@ cmake -DMIOPEN_BACKEND=OpenCL -DBUILD_DEV=On ..

Database paths can be explicitly customized by means of `MIOPEN_DB_PATH` (System PerfDb) and `MIOPEN_USER_DB_PATH` (User PerfDb) cmake variables.

If the user installs a new version of MIOpen, it is recommended that the user move, or delete their old user performance database file. The user can find the file with the suffix `*.updb.txt` in the user perf db path.

More information about the performance database can be found [here](https://github.com/ROCmSoftwarePlatform/MIOpen/blob/master/doc/src/perfdatabase.md).


##### Persistent Program Cache

MIOpen by default caches the device programs in the location `~/.cache/miopen/`. In the cache directory there exists a directory for each version of MIOpen. Users change the location of the cache directory during configuration using the flag `-DMIOPEN_CACHE_DIR=<cache-directory-path>`.

Users can also disable the cache during runtime using the environmental variable set as `MIOPEN_DISABLE_CACHE=1`.

If the compiler changes, or the user modifies the kernels then the cache must be deleted for the MIOpen version in use; e.g., `rm -rf ~/.cache/miopen/<miopen-version-number>`. More information about the cache can be found [here](https://github.com/ROCmSoftwarePlatform/MIOpen/blob/master/doc/src/cache.md).



#### Changing the cmake configuration

The configuration can be changed after running cmake by using `ccmake`:
Expand Down
4 changes: 4 additions & 0 deletions doc/src/cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ Disabling the cache

The are several ways to disable the cache. This is generally useful for development purposes. The cache can be disabled during build by either setting `MIOPEN_CACHE_DIR` to an empty string, or setting `BUILD_DEV=ON` when configuring cmake. The cache can also be disabled at runtime by setting the `MIOPEN_DISABLE_CACHE` environment variable to true.

Updating MIOpen and removing the cache
--------------------------------------
If the compiler changes, or the user modifies the kernels then the cache must be deleted for the MIOpen version in use; e.g., `rm -rf ~/.cache/miopen/<miopen-version-number>`.

5 changes: 5 additions & 0 deletions doc/src/perfdatabase.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,8 @@ This variable allows for limiting the scope of `MIOPEN_FIND_ENFORCE`, so that on
**CONV_BWD (3)** `MIOPEN_FIND_ENFORCE` affects only Backward Data convolutions.

**CONV_WRW (4)** `MIOPEN_FIND_ENFORCE` affects only Backward With Regard to Weights (a.k.a. WRW) convolutions.


### Updating MIOpen and the User Db

It is important to note that if the user installs a new version of MIOpen, it is recommended that the user move, or delete their old user performance database file. This will prevent older database entries from polution the configurations shipped with the newer system database. The user can find the file with the suffix `*.updb.txt` in the user perf db path.

0 comments on commit 49c4891

Please sign in to comment.