Skip to content

Commit

Permalink
[HIPIFY][ROCm#936][BLASLT] cublasLt -> hipblalLt hipification sup…
Browse files Browse the repository at this point in the history
…port - Step 1

+ `cublasLt` is part of `cuBlas`, thus do not introduce a separate documentation for `hipblasLt`
+ Updated the regenerated `hipify-perl` and `BLAS` `CUDA2HIP` documentation
  • Loading branch information
emankov committed Apr 30, 2024
1 parent acf022c commit 582411c
Show file tree
Hide file tree
Showing 8 changed files with 1,059 additions and 992 deletions.
3 changes: 3 additions & 0 deletions bin/hipify-perl
Original file line number Diff line number Diff line change
Expand Up @@ -5114,6 +5114,7 @@ sub simpleSubstitutions {
subst("caffe2\/operators\/spatial_batch_norm_op.h", "caffe2\/operators\/hip\/spatial_batch_norm_op_miopen.hip", "include");
subst("channel_descriptor.h", "hip\/channel_descriptor.h", "include");
subst("cooperative_groups.h", "hip\/hip_cooperative_groups.h", "include");
subst("cublasLt.h", "hipblaslt.h", "include");
subst("cublas_api.h", "hipblas.h", "include");
subst("cuda_fp16.h", "hip\/hip_fp16.h", "include");
subst("cuda_profiler_api.h", "hip\/hip_runtime_api.h", "include");
Expand Down Expand Up @@ -5444,6 +5445,7 @@ sub simpleSubstitutions {
subst("cublasFillMode_t", "hipblasFillMode_t", "type");
subst("cublasGemmAlgo_t", "hipblasGemmAlgo_t", "type");
subst("cublasHandle_t", "hipblasHandle_t", "type");
subst("cublasLtHandle_t", "hipblasLtHandle_t", "type");
subst("cublasMath_t", "hipblasMath_t", "type");
subst("cublasOperation_t", "hipblasOperation_t", "type");
subst("cublasPointerMode_t", "hipblasPointerMode_t", "type");
Expand Down Expand Up @@ -11205,6 +11207,7 @@ sub warnHipOnlyUnsupportedFunctions {
"cublasRotEx_64",
"cublasNrm2Ex_64",
"cublasMigrateComputeType",
"cublasLtContext",
"cublasLoggerConfigure",
"cublasLogCallback",
"cublasInit",
Expand Down
15 changes: 13 additions & 2 deletions docs/tables/CUBLAS_API_supported_by_HIP.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CUBLAS API supported by HIP

## **2. CUBLAS Data types**
## **1. CUBLAS Data types**

|**CUDA**|**A**|**D**|**C**|**R**|**HIP**|**A**|**D**|**C**|**R**|**E**|
|:--|:-:|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:|:-:|
Expand Down Expand Up @@ -104,7 +104,7 @@
|`cublasStatus`| | | | |`hipblasStatus_t`|1.8.2| | | | |
|`cublasStatus_t`| | | | |`hipblasStatus_t`|1.8.2| | | | |

## **3. CUDA Library Data types**
## **2. CUDA Library Data types**

|**CUDA**|**A**|**D**|**C**|**R**|**HIP**|**A**|**D**|**C**|**R**|**E**|
|:--|:-:|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:|:-:|
Expand Down Expand Up @@ -142,6 +142,13 @@
|`cudaDataType`|8.0| | | |`hipDataType`|5.7.0| | | | |
|`cudaDataType_t`|8.0| | | |`hipDataType`|5.7.0| | | | |

## **3. CUBLASLt Data types**

|**CUDA**|**A**|**D**|**C**|**R**|**HIP**|**A**|**D**|**C**|**R**|**E**|
|:--|:-:|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:|:-:|
|`cublasLtContext`|10.1| | | | | | | | | |
|`cublasLtHandle_t`|10.1| | | |`hipblasLtHandle_t`|5.5.0| | | | |

## **4. CUBLAS Helper Function Reference**

|**CUDA**|**A**|**D**|**C**|**R**|**HIP**|**A**|**D**|**C**|**R**|**E**|
Expand Down Expand Up @@ -1012,5 +1019,9 @@
|`cublasZtrsmBatched_64`|12.0| | | | | | | | | |
|`cublasZtrttp`| | | | | | | | | | |

## **9. BLASLt Function Reference**

Unsupported


\*A - Added; D - Deprecated; C - Changed; R - Removed; E - Experimental
15 changes: 13 additions & 2 deletions docs/tables/CUBLAS_API_supported_by_HIP_and_ROC.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CUBLAS API supported by HIP and ROC

## **2. CUBLAS Data types**
## **1. CUBLAS Data types**

|**CUDA**|**A**|**D**|**C**|**R**|**HIP**|**A**|**D**|**C**|**R**|**E**|**ROC**|**A**|**D**|**C**|**R**|**E**|
|:--|:-:|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:|:-:|
Expand Down Expand Up @@ -104,7 +104,7 @@
|`cublasStatus`| | | | |`hipblasStatus_t`|1.8.2| | | | |`rocblas_status`|1.5.0| | | | |
|`cublasStatus_t`| | | | |`hipblasStatus_t`|1.8.2| | | | |`rocblas_status`|1.5.0| | | | |

## **3. CUDA Library Data types**
## **2. CUDA Library Data types**

|**CUDA**|**A**|**D**|**C**|**R**|**HIP**|**A**|**D**|**C**|**R**|**E**|**ROC**|**A**|**D**|**C**|**R**|**E**|
|:--|:-:|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:|:-:|
Expand Down Expand Up @@ -142,6 +142,13 @@
|`cudaDataType`|8.0| | | |`hipDataType`|5.7.0| | | | |`rocblas_datatype`|1.8.2| | | | |
|`cudaDataType_t`|8.0| | | |`hipDataType`|5.7.0| | | | |`rocblas_datatype_`|1.8.2| | | | |

## **3. CUBLASLt Data types**

|**CUDA**|**A**|**D**|**C**|**R**|**HIP**|**A**|**D**|**C**|**R**|**E**|**ROC**|**A**|**D**|**C**|**R**|**E**|
|:--|:-:|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:|:-:|
|`cublasLtContext`|10.1| | | | | | | | | | | | | | | |
|`cublasLtHandle_t`|10.1| | | |`hipblasLtHandle_t`|5.5.0| | | | | | | | | | |

## **4. CUBLAS Helper Function Reference**

|**CUDA**|**A**|**D**|**C**|**R**|**HIP**|**A**|**D**|**C**|**R**|**E**|**ROC**|**A**|**D**|**C**|**R**|**E**|
Expand Down Expand Up @@ -1012,5 +1019,9 @@
|`cublasZtrsmBatched_64`|12.0| | | | | | | | | | | | | | | |
|`cublasZtrttp`| | | | | | | | | | | | | | | | |

## **9. BLASLt Function Reference**

Unsupported


\*A - Added; D - Deprecated; C - Changed; R - Removed; E - Experimental
15 changes: 13 additions & 2 deletions docs/tables/CUBLAS_API_supported_by_ROC.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CUBLAS API supported by ROC

## **2. CUBLAS Data types**
## **1. CUBLAS Data types**

|**CUDA**|**A**|**D**|**C**|**R**|**ROC**|**A**|**D**|**C**|**R**|**E**|
|:--|:-:|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:|:-:|
Expand Down Expand Up @@ -104,7 +104,7 @@
|`cublasStatus`| | | | |`rocblas_status`|1.5.0| | | | |
|`cublasStatus_t`| | | | |`rocblas_status`|1.5.0| | | | |

## **3. CUDA Library Data types**
## **2. CUDA Library Data types**

|**CUDA**|**A**|**D**|**C**|**R**|**ROC**|**A**|**D**|**C**|**R**|**E**|
|:--|:-:|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:|:-:|
Expand Down Expand Up @@ -142,6 +142,13 @@
|`cudaDataType`|8.0| | | |`rocblas_datatype`|1.8.2| | | | |
|`cudaDataType_t`|8.0| | | |`rocblas_datatype_`|1.8.2| | | | |

## **3. CUBLASLt Data types**

|**CUDA**|**A**|**D**|**C**|**R**|**ROC**|**A**|**D**|**C**|**R**|**E**|
|:--|:-:|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:|:-:|
|`cublasLtContext`|10.1| | | | | | | | | |
|`cublasLtHandle_t`|10.1| | | | | | | | | |

## **4. CUBLAS Helper Function Reference**

|**CUDA**|**A**|**D**|**C**|**R**|**ROC**|**A**|**D**|**C**|**R**|**E**|
Expand Down Expand Up @@ -1012,5 +1019,9 @@
|`cublasZtrsmBatched_64`|12.0| | | | | | | | | |
|`cublasZtrttp`| | | | | | | | | | |

## **9. BLASLt Function Reference**

Unsupported


\*A - Added; D - Deprecated; C - Changed; R - Removed; E - Experimental
1 change: 1 addition & 0 deletions src/CUDA2HIP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const std::map <llvm::StringRef, hipCounter> CUDA_INCLUDE_MAP {
{"cublas.h", {"hipblas.h", "rocblas.h", CONV_INCLUDE_CUDA_MAIN_H, API_BLAS, 0}},
{"cublas_v2.h", {"hipblas.h", "rocblas.h", CONV_INCLUDE_CUDA_MAIN_V2_H, API_BLAS, 0}},
{"cublas_api.h", {"hipblas.h", "rocblas.h", CONV_INCLUDE, API_BLAS, 0}},
{"cublasLt.h", {"hipblaslt.h", "", CONV_INCLUDE, API_BLAS, 0}},
// cuRAND includes
{"curand.h", {"hiprand/hiprand.h", "", CONV_INCLUDE_CUDA_MAIN_H, API_RAND, 0}},
{"curand_kernel.h", {"hiprand/hiprand_kernel.h", "", CONV_INCLUDE, API_RAND, 0}},
Expand Down
14 changes: 14 additions & 0 deletions src/CUDA2HIP.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,3 +268,17 @@ namespace runtime {
PROFILER_REMOVED = 37,
};
}

namespace blas {
enum BLAS_API_SECTIONS {
BLAS_DATA_TYPES = 1,
CUDA_DATA_TYPES = 2,
BLAS_LT_DATA_TYPES = 3,
BLAS_HELPER = 4,
BLAS_LEVEL_1 = 5,
BLAS_LEVEL_2 = 6,
BLAS_LEVEL_3 = 7,
BLAS_EXT = 8,
BLAS_LT = 9,
};
}
Loading

0 comments on commit 582411c

Please sign in to comment.