MIOpen kdb installation instructions for PyTorch warmup performance improvement (#2248)

This commit is contained in:
Saad Rahim
2023-06-22 09:47:38 -06:00
committed by GitHub
parent c1a8c5b030
commit e05ce21fb4
3 changed files with 21 additions and 0 deletions

View File

@@ -5,10 +5,12 @@ on:
branches:
- develop
- main
- 'roc**'
pull_request:
branches:
- develop
- main
- 'roc**'
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}

View File

@@ -27,3 +27,6 @@ DGEMM
HPCG
HPL
IOPM
# pytorch_install
kdb
precompiled

View File

@@ -405,6 +405,22 @@ Follow these steps:
python3 main.py
```
## Using MIOpen kdb files with ROCm PyTorch wheels
PyTorch uses MIOpen for machine learning primitives. These primitives are compiled into kernels at runtime. Runtime compilation causes a small warm-up phase when starting PyTorch. MIOpen kdb files contain precompiled kernels that can speed up the warm-up phase of an application. More information is available in the {doc}`MIOpeninstallation page <miopen:install>`.
MIOpen kdb files can be used with ROCm PyTorch wheels. However, the kdb files need to be placed in a specific location with respect to the PyTorch installation path. A helper script simplifies this task for the user. The script takes in the ROCm version and user's GPU architecture as inputs, and works for Ubuntu and CentOS.
Helper script: [install_kdb_files_for_pytorch_wheels.sh](https://raw.githubusercontent.com/wiki/ROCmSoftwarePlatform/pytorch/files/install_kdb_files_for_pytorch_wheels.sh)
Usage:
After installing ROCm PyTorch wheels:
1. [Optional] `export GFX_ARCH=gfx90a`
2. [Optional] `export ROCM_VERSION=5.5`
3. `./install_kdb_files_for_pytorch_wheels.sh`
## References
C. Szegedy, V. Vanhoucke, S. Ioffe, J. Shlens and Z. Wojna, "Rethinking the Inception Architecture for Computer Vision," CoRR, p. abs/1512.00567, 2015