[HIPIFY][DNN] Revise and sync with CUDNN 10 and hipDNN
+ CUDNN_API_supported_by_HIP.md update + CUDA_Runtime_API_functions_supported_by_HIP.md update + libraryPropertyType_t is moved to Runtime + test update
This commit is contained in:
@@ -41,7 +41,7 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DNN_FUNCTION_MAP{
|
||||
// cuDNN Tensor functions
|
||||
{"cudnnCreateTensorDescriptor", {"hipdnnCreateTensorDescriptor", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnSetTensor4dDescriptor", {"hipdnnSetTensor4dDescriptor", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnSetTensor4dDescriptorEx", {"hipdnnSetTensor4dDescriptorEx", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"cudnnSetTensor4dDescriptorEx", {"hipdnnSetTensor4dDescriptorEx", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnGetTensor4dDescriptor", {"hipdnnGetTensor4dDescriptor", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnSetTensorNdDescriptor", {"hipdnnSetTensorNdDescriptor", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnSetTensorNdDescriptorEx", {"hipdnnSetTensorNdDescriptorEx", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
@@ -69,7 +69,7 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DNN_FUNCTION_MAP{
|
||||
|
||||
// cuDNN Filter functions
|
||||
{"cudnnCreateFilterDescriptor", {"hipdnnCreateFilterDescriptor", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnSetFilter4dDescriptor", {"hipdnnSetFilter4dDescriptor", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnSetFilter4dDescriptor", {"hipdnnSetFilter4dDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"cudnnGetFilter4dDescriptor", {"hipdnnGetFilter4dDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"cudnnSetFilterNdDescriptor", {"hipdnnSetFilterNdDescriptor", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnGetFilterNdDescriptor", {"hipdnnGetFilterNdDescriptor", "", CONV_LIB_FUNC, API_DNN}},
|
||||
@@ -79,7 +79,7 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DNN_FUNCTION_MAP{
|
||||
{"cudnnCreateConvolutionDescriptor", {"hipdnnCreateConvolutionDescriptor", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnSetConvolutionMathType", {"hipdnnSetConvolutionMathType", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnGetConvolutionMathType", {"hipdnnGetConvolutionMathType", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"cudnnSetConvolutionGroupCount", {"hipdnnSetConvolutionGroupCount", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"cudnnSetConvolutionGroupCount", {"hipdnnSetConvolutionGroupCount", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnGetConvolutionGroupCount", {"hipdnnGetConvolutionGroupCount", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"cudnnSetConvolution2dDescriptor", {"hipdnnSetConvolution2dDescriptor", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnGetConvolution2dDescriptor", {"hipdnnGetConvolution2dDescriptor", "", CONV_LIB_FUNC, API_DNN}},
|
||||
@@ -149,10 +149,15 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DNN_FUNCTION_MAP{
|
||||
{"cudnnDivisiveNormalizationBackward", {"hipdnnDivisiveNormalizationBackward", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
|
||||
// cuDNN Batch Normalization functions
|
||||
{"cudnnDeriveBNTensorDescriptor", {"hipdnnDeriveBNTensorDescriptor", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnBatchNormalizationForwardTraining", {"hipdnnBatchNormalizationForwardTraining", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnBatchNormalizationForwardInference", {"hipdnnBatchNormalizationForwardInference", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnBatchNormalizationBackward", {"hipdnnBatchNormalizationBackward", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnDeriveBNTensorDescriptor", {"hipdnnDeriveBNTensorDescriptor", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnBatchNormalizationForwardTraining", {"hipdnnBatchNormalizationForwardTraining", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnBatchNormalizationForwardTrainingEx", {"hipdnnBatchNormalizationForwardTrainingEx", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"cudnnBatchNormalizationForwardInference", {"hipdnnBatchNormalizationForwardInference", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnBatchNormalizationBackward", {"hipdnnBatchNormalizationBackward", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnBatchNormalizationBackwardEx", {"hipdnnBatchNormalizationBackwardEx", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"cudnnGetBatchNormalizationForwardTrainingExWorkspaceSize", {"hipdnnGetBatchNormalizationForwardTrainingExWorkspaceSize", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"cudnnGetBatchNormalizationBackwardExWorkspaceSize", {"hipdnnGetBatchNormalizationBackwardExWorkspaceSize", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"cudnnGetBatchNormalizationTrainingExReserveSpaceSize", {"hipdnnGetBatchNormalizationTrainingExReserveSpaceSize", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
|
||||
// cuDNN Spatial Transformer functions
|
||||
{"cudnnCreateSpatialTransformerDescriptor", {"hipdnnCreateSpatialTransformerDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
@@ -188,8 +193,10 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DNN_FUNCTION_MAP{
|
||||
{"cudnnCreatePersistentRNNPlan", {"hipdnnCreatePersistentRNNPlan", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnSetPersistentRNNPlan", {"hipdnnSetPersistentRNNPlan", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnDestroyPersistentRNNPlan", {"hipdnnDestroyPersistentRNNPlan", "", CONV_LIB_FUNC, API_DNN}},
|
||||
// NOTE" hipdnnSetRNNDescriptor has additional argument hipdnnRNNBiasMode_t *biasMode without default value
|
||||
{"cudnnSetRNNDescriptor", {"hipdnnSetRNNDescriptor", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnGetRNNDescriptor", {"hipdnnGetRNNDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
// NOTE" hipdnnGetRNNDescriptor has additional argument hipdnnRNNBiasMode_t *biasMode without default value
|
||||
{"cudnnGetRNNDescriptor", {"hipdnnGetRNNDescriptor", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnSetRNNProjectionLayers", {"hipdnnSetRNNProjectionLayers", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"cudnnGetRNNProjectionLayers", {"hipdnnGetRNNProjectionLayers", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"cudnnSetRNNAlgorithmDescriptor", {"hipdnnSetRNNAlgorithmDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
@@ -201,11 +208,21 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DNN_FUNCTION_MAP{
|
||||
{"cudnnGetRNNLinLayerMatrixParams", {"hipdnnGetRNNLinLayerMatrixParams", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnGetRNNLinLayerBiasParams", {"hipdnnGetRNNLinLayerBiasParams", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnRNNForwardInference", {"hipdnnRNNForwardInference", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnRNNForwardInferenceEx", {"hipdnnRNNForwardInferenceEx", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"cudnnRNNForwardTraining", {"hipdnnRNNForwardTraining", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnRNNForwardTrainingEx", {"hipdnnRNNForwardTrainingEx", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"cudnnRNNBackwardData", {"hipdnnRNNBackwardData", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnRNNBackwardDataEx", {"hipdnnRNNBackwardDataEx", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"cudnnRNNBackwardWeights", {"hipdnnRNNBackwardWeights", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnRNNBackwardWeightsEx", {"hipdnnRNNBackwardWeightsEx", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"cudnnSetRNNDescriptor_v5", {"hipdnnSetRNNDescriptor_v5", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnSetRNNDescriptor_v6", {"hipdnnSetRNNDescriptor_v6", "", CONV_LIB_FUNC, API_DNN}},
|
||||
{"cudnnSetRNNPaddingMode", {"hipdnnSetRNNPaddingMode", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"cudnnGetRNNPaddingMode", {"hipdnnGetRNNPaddingMode", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"cudnnCreateRNNDataDescriptor", {"hipdnnCreateRNNDataDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"cudnnDestroyRNNDataDescriptor", {"hipdnnDestroyRNNDataDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"cudnnSetRNNDataDescriptor", {"hipdnnSetRNNDataDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"cudnnGetRNNDataDescriptor", {"hipdnnGetRNNDataDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
|
||||
// cuDNN Connectionist Temporal Classification loss functions
|
||||
{"cudnnCreateCTCLossDescriptor", {"hipdnnCreateCTCLossDescriptor", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
@@ -228,4 +245,9 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DNN_FUNCTION_MAP{
|
||||
{"cudnnGetAlgorithmSpaceSize", {"hipdnnGetAlgorithmSpaceSize", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"cudnnSaveAlgorithm", {"hipdnnSaveAlgorithm", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"cudnnRestoreAlgorithm", {"hipdnnRestoreAlgorithm", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
|
||||
// cuDNN Clipping functions
|
||||
{"cudnnRNNSetClip", {"hipdnnRNNSetClip", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"cudnnRNNGetClip", {"hipdnnRNNGetClip", "", CONV_LIB_FUNC, API_DNN, HIP_UNSUPPORTED}},
|
||||
|
||||
};
|
||||
|
||||
@@ -69,6 +69,7 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DNN_TYPE_NAME_MAP{
|
||||
{"CUDNN_DATA_INT8x4", {"HIPDNN_DATA_INT8x4", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 5
|
||||
{"CUDNN_DATA_UINT8", {"HIPDNN_DATA_UINT8", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 6
|
||||
{"CUDNN_DATA_UINT8x4", {"HIPDNN_DATA_UINT8x4", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 7
|
||||
{"CUDNN_DATA_INT8x32", {"HIPDNN_DATA_INT8x32", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 8
|
||||
{"cudnnErrQueryMode_t", {"hipdnnErrQueryMode_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"CUDNN_ERRQUERY_RAWCODE", {"HIPDNN_ERRQUERY_RAWCODE", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 0
|
||||
{"CUDNN_ERRQUERY_NONBLOCKING", {"HIPDNN_ERRQUERY_NONBLOCKING", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 1
|
||||
@@ -111,6 +112,7 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DNN_TYPE_NAME_MAP{
|
||||
{"cudnnMathType_t", {"hipdnnMathType_t", "", CONV_TYPE, API_DNN}},
|
||||
{"CUDNN_DEFAULT_MATH", {"HIPDNN_DEFAULT_MATH", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 0
|
||||
{"CUDNN_TENSOR_OP_MATH", {"HIPDNN_TENSOR_OP_MATH", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1
|
||||
{"CUDNN_TENSOR_OP_MATH_ALLOW_CONVERSION", {"HIPDNN_TENSOR_OP_MATH_ALLOW_CONVERSION", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 2
|
||||
{"cudnnNanPropagation_t", {"hipdnnNanPropagation_t", "", CONV_TYPE, API_DNN}},
|
||||
{"CUDNN_NOT_PROPAGATE_NAN", {"HIPDNN_NOT_PROPAGATE_NAN", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 0
|
||||
{"CUDNN_PROPAGATE_NAN", {"HIPDNN_PROPAGATE_NAN", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 1
|
||||
@@ -199,6 +201,20 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DNN_TYPE_NAME_MAP{
|
||||
{"CUDNN_BATCHNORM_SPATIAL_PERSISTENT", {"HIPDNN_BATCHNORM_SPATIAL_PERSISTENT", "", CONV_NUMERIC_LITERAL, API_DNN}}, // 2
|
||||
{"cudnnSamplerType_t", {"hipdnnSamplerType_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"CUDNN_SAMPLER_BILINEAR", {"HIPDNN_SAMPLER_BILINEAR", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 0
|
||||
{"cudnnBatchNormOps_t", {"hipdnnBatchNormOps_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"CUDNN_BATCHNORM_OPS_BN", {"HIPDNN_BATCHNORM_OPS_BN", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 0
|
||||
{"CUDNN_BATCHNORM_OPS_BN_ACTIVATION", {"HIPDNN_BATCHNORM_OPS_BN_ACTIVATION", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 1
|
||||
{"CUDNN_BATCHNORM_OPS_BN_ADD_ACTIVATION", {"HIPDNN_BATCHNORM_OPS_BN_ADD_ACTIVATION", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 2
|
||||
{"cudnnRNNClipMode_t", {"hipdnnRNNClipMode_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"CUDNN_RNN_CLIP_NONE", {"HIPDNN_RNN_CLIP_NONE", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 0
|
||||
{"CUDNN_RNN_CLIP_MINMAX", {"HIPDNN_RNN_CLIP_MINMAX", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 1
|
||||
{"cudnnRNNDataLayout_t", {"hipdnnRNNDataLayout_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"CUDNN_RNN_DATA_LAYOUT_SEQ_MAJOR_UNPACKED", {"HIPDNN_RNN_DATA_LAYOUT_SEQ_MAJOR_UNPACKED", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 0
|
||||
{"CUDNN_RNN_DATA_LAYOUT_SEQ_MAJOR_PACKED", {"HIPDNN_RNN_DATA_LAYOUT_SEQ_MAJOR_PACKED", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 1
|
||||
{"CUDNN_RNN_DATA_LAYOUT_BATCH_MAJOR_UNPACKED", {"HIPDNN_RNN_DATA_LAYOUT_BATCH_MAJOR_UNPACKED", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 2
|
||||
{"cudnnRNNPaddingMode_t", {"hipdnnRNNPaddingMode_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"CUDNN_RNN_PADDED_IO_DISABLED", {"HIPDNN_RNN_PADDED_IO_DISABLED", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 0
|
||||
{"CUDNN_RNN_PADDED_IO_ENABLED", {"HIPDNN_RNN_PADDED_IO_ENABLED", "", CONV_NUMERIC_LITERAL, API_DNN, HIP_UNSUPPORTED}}, // 1
|
||||
|
||||
// cuDNN types
|
||||
{"cudnnContext", {"hipdnnContext", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}},
|
||||
@@ -239,4 +255,6 @@ const std::map<llvm::StringRef, hipCounter> CUDA_DNN_TYPE_NAME_MAP{
|
||||
{"cudnnAlgorithm_t", {"hipdnnAlgorithm_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"cudnnDebug_t", {"hipdnnDebug_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"cudnnCallback_t", {"hipdnnCallback_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"cudnnRNNDataStruct", {"hipdnnRNNDataStruct", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}},
|
||||
{"cudnnRNNDataDescriptor_t", {"hipdnnRNNDataDescriptor_t", "", CONV_TYPE, API_DNN, HIP_UNSUPPORTED}},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user