Skip to content

Commit

Permalink
[HIPIFY][DNN] cuDNN 8.9.6 support
Browse files Browse the repository at this point in the history
+ Updated README.md, the regenerated hipify-perl and DNN docs
  • Loading branch information
emankov committed Nov 7, 2023
1 parent 7b669b6 commit 9216e19
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 9 deletions.
1 change: 1 addition & 0 deletions bin/hipify-perl
Original file line number Diff line number Diff line change
Expand Up @@ -8705,6 +8705,7 @@ sub warnUnsupportedFunctions {
"CUDNN_RNG_DISTRIBUTION_UNIFORM",
"CUDNN_RNG_DISTRIBUTION_NORMAL",
"CUDNN_RNG_DISTRIBUTION_BERNOULLI",
"CUDNN_RMS_NORM",
"CUDNN_RESAMPLE_NEAREST",
"CUDNN_RESAMPLE_MAXPOOL",
"CUDNN_RESAMPLE_BILINEAR",
Expand Down
16 changes: 8 additions & 8 deletions docs/hipify-clang.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ Run `Visual Studio 17 2022`, open the generated `LLVM.sln`, build all, build pro

- ***Linux***: `-DCUDA_DNN_ROOT_DIR=/usr/include`

- ***Windows***: `-DCUDA_DNN_ROOT_DIR=D:/CUDA/cuDNN/8.9.5`
- ***Windows***: `-DCUDA_DNN_ROOT_DIR=D:/CUDA/cuDNN/8.9.6`

5. Ensure [`CUB`](https://github.com/NVlabs/cub) of the version corresponding to CUDA's version is installed.

Expand Down Expand Up @@ -406,9 +406,9 @@ Ubuntu 14: LLVM 4.0.0 - 7.1.0, CUDA 7.0 - 9.0, cuDNN 5.0.5 - 7.6.5

Ubuntu 16-18: LLVM 8.0.0 - 14.0.6, CUDA 8.0 - 10.2, cuDNN 5.1.10 - 8.0.5

Ubuntu 20-21: LLVM 9.0.0 - 17.0.4, CUDA 8.0 - 12.2.2, cuDNN 5.1.10 - 8.9.5
Ubuntu 20-21: LLVM 9.0.0 - 17.0.4, CUDA 8.0 - 12.2.2, cuDNN 5.1.10 - 8.9.6

Ubuntu 22: LLVM 13.0.0 - 17.0.4, CUDA 10.0 - 12.2.2, cuDNN 8.0.5 - 8.9.5
Ubuntu 22: LLVM 13.0.0 - 17.0.4, CUDA 10.0 - 12.2.2, cuDNN 8.0.5 - 8.9.6

Minimum build system requirements for the above configurations:

Expand Down Expand Up @@ -596,8 +596,8 @@ Testing Time: 7.90s
| 14.0.0 - 14.0.6 | 7.0 - 11.7.1 | 8.0.5 - 8.4.1 | 2017.15.9.57*, 2019.16.11.17, 2022.17.2.6 | 3.24.0 | 3.10.6 |
| 15.0.0 - 15.0.7 | 7.0 - 11.8.0 | 8.0.5 - 8.8.1 | 2019.16.11.25, 2022.17.5.2 | 3.26.0 | 3.11.2 |
| 16.0.0 - 16.0.6 | 7.0 - 12.2.2 | 8.0.5 - 8.9.5 | 2019.16.11.29, 2022.17.7.1 | 3.27.3 | 3.11.4 |
| 17.0.1** 17.0.4 | 7.0 - 12.2.2 | 8.0.5 - 8.9.5 | 2019.16.11.30, 2022.17.7.4 | 3.27.6 | 3.12.0 |
| 18.0.0git | 7.0 - 12.2.2 | 8.0.5 - 8.9.5 | 2019.16.11.30, 2022.17.7.4 | 3.27.6 | 3.12.0 |
| 17.0.1** 17.0.4 | 7.0 - 12.2.2 | 8.0.5 - 8.9.6 | 2019.16.11.30, 2022.17.7.4 | 3.27.6 | 3.12.0 |
| 18.0.0git | 7.0 - 12.2.2 | 8.0.5 - 8.9.6 | 2019.16.11.30, 2022.17.7.4 | 3.27.6 | 3.12.0 |

`*` LLVM 14.x.x is the latest major release supporting Visual Studio 2017.
To build LLVM 14.x.x correctly by Visual Studio 2017, `-DLLVM_FORCE_USE_OLD_TOOLCHAIN=ON` should be added to a corresponding cmake command line.
Expand All @@ -618,7 +618,7 @@ cmake
-DCMAKE_PREFIX_PATH=D:/LLVM/17.0.4/dist \
-DCUDA_TOOLKIT_ROOT_DIR="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.2" \
-DCUDA_SDK_ROOT_DIR="C:/ProgramData/NVIDIA Corporation/CUDA Samples/v12.2" \
-DCUDA_DNN_ROOT_DIR=D:/CUDA/cuDNN/8.9.5 \
-DCUDA_DNN_ROOT_DIR=D:/CUDA/cuDNN/8.9.6 \
-DCUDA_CUB_ROOT_DIR=D:/CUDA/CUB/cub-2.1.0 \
-DLLVM_EXTERNAL_LIT=D:/LLVM/17.0.4/build/Release/bin/llvm-lit.py \
../hipify
Expand Down Expand Up @@ -654,13 +654,13 @@ cmake
-- Initial CUDA to configure:
-- - CUDA Toolkit path : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.2
-- - CUDA Samples path : C:/ProgramData/NVIDIA Corporation/CUDA Samples/v12.2
-- - cuDNN path : D:/CUDA/cuDNN/8.9.5
-- - cuDNN path : D:/CUDA/cuDNN/8.9.6
-- - CUB path : D:/CUDA/CUB/cub-2.1.0
-- Found CUDAToolkit: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.2/include (found version "12.2.140")
-- Found CUDA config:
-- - CUDA Toolkit path : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.2
-- - CUDA Samples path : C:/ProgramData/NVIDIA Corporation/CUDA Samples/v12.2
-- - cuDNN path : D:/CUDA/cuDNN/8.9.5
-- - cuDNN path : D:/CUDA/cuDNN/8.9.6
-- - CUB path : D:/CUDA/CUB/cub-2.1.0
-- Configuring done (1.4s)
-- Generating done (0.1s)
Expand Down
1 change: 1 addition & 0 deletions docs/tables/CUDNN_API_supported_by_HIP.md
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,7 @@
|`CUDNN_RESAMPLE_BILINEAR`|8.3.0| | | | | | | | | |
|`CUDNN_RESAMPLE_MAXPOOL`|8.3.0| | | | | | | | | |
|`CUDNN_RESAMPLE_NEAREST`|8.3.0| | | | | | | | | |
|`CUDNN_RMS_NORM`|8.9.6| | | | | | | | | |
|`CUDNN_RNG_DISTRIBUTION_BERNOULLI`|8.7.0| | | | | | | | | |
|`CUDNN_RNG_DISTRIBUTION_NORMAL`|8.7.0| | | | | | | | | |
|`CUDNN_RNG_DISTRIBUTION_UNIFORM`|8.7.0| | | | | | | | | |
Expand Down
1 change: 1 addition & 0 deletions docs/tables/CUDNN_API_supported_by_HIP_and_MIOPEN.md
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,7 @@
|`CUDNN_RESAMPLE_BILINEAR`|8.3.0| | | | | | | | | | | | | | | |
|`CUDNN_RESAMPLE_MAXPOOL`|8.3.0| | | | | | | | | | | | | | | |
|`CUDNN_RESAMPLE_NEAREST`|8.3.0| | | | | | | | | | | | | | | |
|`CUDNN_RMS_NORM`|8.9.6| | | | | | | | | | | | | | | |
|`CUDNN_RNG_DISTRIBUTION_BERNOULLI`|8.7.0| | | | | | | | | | | | | | | |
|`CUDNN_RNG_DISTRIBUTION_NORMAL`|8.7.0| | | | | | | | | | | | | | | |
|`CUDNN_RNG_DISTRIBUTION_UNIFORM`|8.7.0| | | | | | | | | | | | | | | |
Expand Down
1 change: 1 addition & 0 deletions docs/tables/CUDNN_API_supported_by_MIOPEN.md
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,7 @@
|`CUDNN_RESAMPLE_BILINEAR`|8.3.0| | | | | | | | | |
|`CUDNN_RESAMPLE_MAXPOOL`|8.3.0| | | | | | | | | |
|`CUDNN_RESAMPLE_NEAREST`|8.3.0| | | | | | | | | |
|`CUDNN_RMS_NORM`|8.9.6| | | | | | | | | |
|`CUDNN_RNG_DISTRIBUTION_BERNOULLI`|8.7.0| | | | | | | | | |
|`CUDNN_RNG_DISTRIBUTION_NORMAL`|8.7.0| | | | | | | | | |
|`CUDNN_RNG_DISTRIBUTION_UNIFORM`|8.7.0| | | | | | | | | |
Expand Down
2 changes: 2 additions & 0 deletions src/CUDA2HIP_DNN_API_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,7 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DNN_TYPE_NAME_MAP {
{"CUDNN_INSTANCE_NORM", {"HIPDNN_INSTANCE_NORM", "", CONV_NUMERIC_LITERAL, API_DNN, 1, UNSUPPORTED}},
{"CUDNN_BATCH_NORM", {"HIPDNN_BATCH_NORM", "", CONV_NUMERIC_LITERAL, API_DNN, 1, UNSUPPORTED}},
{"CUDNN_GROUP_NORM", {"HIPDNN_GROUP_NORM", "", CONV_NUMERIC_LITERAL, API_DNN, 1, UNSUPPORTED}},
{"CUDNN_RMS_NORM", {"HIPDNN_RMS_NORM", "", CONV_NUMERIC_LITERAL, API_DNN, 1, UNSUPPORTED}},
{"cudnnBackendNormFwdPhase_t", {"hipdnnBackendNormFwdPhase_t", "", CONV_TYPE, API_DNN, 1, UNSUPPORTED}},
{"CUDNN_NORM_FWD_INFERENCE", {"HIPDNN_NORM_FWD_INFERENCE", "", CONV_NUMERIC_LITERAL, API_DNN, 1, UNSUPPORTED}},
{"CUDNN_NORM_FWD_TRAINING", {"HIPDNN_NORM_FWD_TRAINING", "", CONV_NUMERIC_LITERAL, API_DNN, 1, UNSUPPORTED}},
Expand Down Expand Up @@ -1681,6 +1682,7 @@ const std::map<llvm::StringRef, cudaAPIversions> CUDA_DNN_TYPE_NAME_VER_MAP {
{"CUDNN_KNOB_TYPE_TILE_ROWS", {CUDNN_895, CUDA_0, CUDA_0 }},
{"CUDNN_KNOB_TYPE_TILE_COLS", {CUDNN_895, CUDA_0, CUDA_0 }},
{"CUDNN_KNOB_TYPE_LOAD_SIZE", {CUDNN_895, CUDA_0, CUDA_0 }},
{"CUDNN_RMS_NORM", {CUDNN_896, CUDA_0, CUDA_0 }},
};

const std::map<llvm::StringRef, hipAPIversions> HIP_DNN_TYPE_NAME_VER_MAP {
Expand Down
1 change: 1 addition & 0 deletions src/Statistics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ std::string Statistics::getCudaVersion(const cudaVersions& ver) {
case CUDNN_893: return "8.9.3";
case CUDNN_894: return "8.9.4";
case CUDNN_895: return "8.9.5";
case CUDNN_896: return "8.9.6";
}
return "";
}
Expand Down
3 changes: 2 additions & 1 deletion src/Statistics.h
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,8 @@ enum cudaVersions {
CUDNN_893 = 893,
CUDNN_894 = 894,
CUDNN_895 = 895,
CUDNN_LATEST = CUDNN_895,
CUDNN_896 = 896,
CUDNN_LATEST = CUDNN_896,
};

enum hipVersions {
Expand Down

0 comments on commit 9216e19

Please sign in to comment.