From e05ce21fb49354ef01bae7dc08810af74ec73eb9 Mon Sep 17 00:00:00 2001 From: Saad Rahim <44449863+saadrahim@users.noreply.github.com> Date: Thu, 22 Jun 2023 09:47:38 -0600 Subject: [PATCH] MIOpen kdb installation instructions for PyTorch warmup performance improvement (#2248) --- .github/workflows/linting.yml | 2 ++ .wordlist.txt | 3 +++ docs/how_to/pytorch_install/pytorch_install.md | 16 ++++++++++++++++ 3 files changed, 21 insertions(+) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 41edf59d6..a31b6cf57 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -5,10 +5,12 @@ on: branches: - develop - main + - 'roc**' pull_request: branches: - develop - main + - 'roc**' concurrency: group: ${{ github.ref }}-${{ github.workflow }} diff --git a/.wordlist.txt b/.wordlist.txt index 8d469d9e5..864234b64 100644 --- a/.wordlist.txt +++ b/.wordlist.txt @@ -27,3 +27,6 @@ DGEMM HPCG HPL IOPM +# pytorch_install +kdb +precompiled diff --git a/docs/how_to/pytorch_install/pytorch_install.md b/docs/how_to/pytorch_install/pytorch_install.md index dcc6156c0..8de23b02b 100644 --- a/docs/how_to/pytorch_install/pytorch_install.md +++ b/docs/how_to/pytorch_install/pytorch_install.md @@ -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 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