Skip to content

Commit

Permalink
[HIPIFY][ROCm#584][ROCm#1624][MIOpen] Support for backend graphAPI
Browse files Browse the repository at this point in the history
…direct translation from `cuDNN` to `MIOpen` - Part 6

+ `cudnnBackendAttributeName_t` -> `miopenBackendAttributeName_t` - continuation
+ Updated synthetic tests, the regenerated `hipify-perl`, and `DNN` `CUDA2HIP` documentation
  • Loading branch information
emankov committed Sep 6, 2024
1 parent 635ad63 commit 62a17f7
Show file tree
Hide file tree
Showing 5 changed files with 290 additions and 145 deletions.
48 changes: 48 additions & 0 deletions bin/hipify-perl
Original file line number Diff line number Diff line change
Expand Up @@ -3330,6 +3330,13 @@ sub rocSubstitutions {
subst("CUDNN_ATTR_ENGINEHEUR_OPERATION_GRAPH", "MIOPEN_ATTR_ENGINEHEUR_OPERATION_GRAPH", "numeric_literal");
subst("CUDNN_ATTR_ENGINEHEUR_RESULTS", "MIOPEN_ATTR_ENGINEHEUR_RESULTS", "numeric_literal");
subst("CUDNN_ATTR_ENGINEHEUR_SM_COUNT_TARGET", "MIOPEN_ATTR_ENGINEHEUR_SM_COUNT_TARGET", "numeric_literal");
subst("CUDNN_ATTR_ENGINE_BEHAVIOR_NOTE", "MIOPEN_ATTR_ENGINE_BEHAVIOR_NOTE", "numeric_literal");
subst("CUDNN_ATTR_ENGINE_GLOBAL_INDEX", "MIOPEN_ATTR_ENGINE_GLOBAL_INDEX", "numeric_literal");
subst("CUDNN_ATTR_ENGINE_KNOB_INFO", "MIOPEN_ATTR_ENGINE_KNOB_INFO", "numeric_literal");
subst("CUDNN_ATTR_ENGINE_LAYOUT_INFO", "MIOPEN_ATTR_ENGINE_LAYOUT_INFO", "numeric_literal");
subst("CUDNN_ATTR_ENGINE_NUMERICAL_NOTE", "MIOPEN_ATTR_ENGINE_NUMERICAL_NOTE", "numeric_literal");
subst("CUDNN_ATTR_ENGINE_OPERATION_GRAPH", "MIOPEN_ATTR_ENGINE_OPERATION_GRAPH", "numeric_literal");
subst("CUDNN_ATTR_ENGINE_SM_COUNT_TARGET", "MIOPEN_ATTR_ENGINE_SM_COUNT_TARGET", "numeric_literal");
subst("CUDNN_ATTR_EXECUTION_PLAN_COMPUTED_INTERMEDIATE_UIDS", "MIOPEN_ATTR_EXECUTION_PLAN_COMPUTED_INTERMEDIATE_UIDS", "numeric_literal");
subst("CUDNN_ATTR_EXECUTION_PLAN_ENGINE_CONFIG", "MIOPEN_ATTR_EXECUTION_PLAN_ENGINE_CONFIG", "numeric_literal");
subst("CUDNN_ATTR_EXECUTION_PLAN_HANDLE", "MIOPEN_ATTR_EXECUTION_PLAN_HANDLE", "numeric_literal");
Expand All @@ -3342,9 +3349,28 @@ sub rocSubstitutions {
subst("CUDNN_ATTR_INTERMEDIATE_INFO_UNIQUE_ID", "MIOPEN_ATTR_INTERMEDIATE_INFO_UNIQUE_ID", "numeric_literal");
subst("CUDNN_ATTR_KNOB_CHOICE_KNOB_TYPE", "MIOPEN_ATTR_KNOB_CHOICE_KNOB_TYPE", "numeric_literal");
subst("CUDNN_ATTR_KNOB_CHOICE_KNOB_VALUE", "MIOPEN_ATTR_KNOB_CHOICE_KNOB_VALUE", "numeric_literal");
subst("CUDNN_ATTR_KNOB_INFO_MAXIMUM_VALUE", "MIOPEN_ATTR_KNOB_INFO_MAXIMUM_VALUE", "numeric_literal");
subst("CUDNN_ATTR_KNOB_INFO_MINIMUM_VALUE", "MIOPEN_ATTR_KNOB_INFO_MINIMUM_VALUE", "numeric_literal");
subst("CUDNN_ATTR_KNOB_INFO_STRIDE", "MIOPEN_ATTR_KNOB_INFO_STRIDE", "numeric_literal");
subst("CUDNN_ATTR_KNOB_INFO_TYPE", "MIOPEN_ATTR_KNOB_INFO_TYPE", "numeric_literal");
subst("CUDNN_ATTR_LAYOUT_INFO_TENSOR_UID", "MIOPEN_ATTR_LAYOUT_INFO_TENSOR_UID", "numeric_literal");
subst("CUDNN_ATTR_LAYOUT_INFO_TYPES", "MIOPEN_ATTR_LAYOUT_INFO_TYPES", "numeric_literal");
subst("CUDNN_ATTR_MATMUL_COMP_TYPE", "MIOPEN_ATTR_MATMUL_COMP_TYPE", "numeric_literal");
subst("CUDNN_ATTR_MATMUL_PADDING_VALUE", "MIOPEN_ATTR_MATMUL_PADDING_VALUE", "numeric_literal");
subst("CUDNN_ATTR_OPERATIONGRAPH_ENGINE_GLOBAL_COUNT", "MIOPEN_ATTR_OPERATIONGRAPH_ENGINE_GLOBAL_COUNT", "numeric_literal");
subst("CUDNN_ATTR_OPERATIONGRAPH_HANDLE", "MIOPEN_ATTR_OPERATIONGRAPH_HANDLE", "numeric_literal");
subst("CUDNN_ATTR_OPERATIONGRAPH_OPS", "MIOPEN_ATTR_OPERATIONGRAPH_OPS", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_BN_SCALE_DESC", "MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_BN_SCALE_DESC", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_DBN_BIAS_DESC", "MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_DBN_BIAS_DESC", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_DBN_SCALE_DESC", "MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_DBN_SCALE_DESC", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_DY_DESC", "MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_DY_DESC", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_EQ_BIAS", "MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_EQ_BIAS", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_EQ_DY_SCALE_DESC", "MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_EQ_DY_SCALE_DESC", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_EQ_X_SCALE_DESC", "MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_EQ_X_SCALE_DESC", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_INVSTD_DESC", "MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_INVSTD_DESC", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_MATH_PREC", "MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_MATH_PREC", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_MEAN_DESC", "MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_MEAN_DESC", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_X_DESC", "MIOPEN_ATTR_OPERATION_BN_BWD_WEIGHTS_X_DESC", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_BN_FINALIZE_ACCUM_COUNT_DESC", "MIOPEN_ATTR_OPERATION_BN_FINALIZE_ACCUM_COUNT_DESC", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_BN_FINALIZE_BIAS_DESC", "MIOPEN_ATTR_OPERATION_BN_FINALIZE_BIAS_DESC", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_BN_FINALIZE_EPSILON_DESC", "MIOPEN_ATTR_OPERATION_BN_FINALIZE_EPSILON_DESC", "numeric_literal");
Expand Down Expand Up @@ -3385,6 +3411,14 @@ sub rocSubstitutions {
subst("CUDNN_ATTR_OPERATION_GENSTATS_SQSUMDESC", "MIOPEN_ATTR_OPERATION_GENSTATS_SQSUMDESC", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_GENSTATS_SUMDESC", "MIOPEN_ATTR_OPERATION_GENSTATS_SUMDESC", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_GENSTATS_XDESC", "MIOPEN_ATTR_OPERATION_GENSTATS_XDESC", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_MATMUL_ADESC", "MIOPEN_ATTR_OPERATION_MATMUL_ADESC", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_MATMUL_BDESC", "MIOPEN_ATTR_OPERATION_MATMUL_BDESC", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_MATMUL_CDESC", "MIOPEN_ATTR_OPERATION_MATMUL_CDESC", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_MATMUL_DESC", "MIOPEN_ATTR_OPERATION_MATMUL_DESC", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_MATMUL_GEMM_K_OVERRIDE_DESC", "MIOPEN_ATTR_OPERATION_MATMUL_GEMM_K_OVERRIDE_DESC", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_MATMUL_GEMM_M_OVERRIDE_DESC", "MIOPEN_ATTR_OPERATION_MATMUL_GEMM_M_OVERRIDE_DESC", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_MATMUL_GEMM_N_OVERRIDE_DESC", "MIOPEN_ATTR_OPERATION_MATMUL_GEMM_N_OVERRIDE_DESC", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_MATMUL_IRREGULARLY_STRIDED_BATCH_COUNT", "MIOPEN_ATTR_OPERATION_MATMUL_IRREGULARLY_STRIDED_BATCH_COUNT", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_POINTWISE_ALPHA1", "MIOPEN_ATTR_OPERATION_POINTWISE_ALPHA1", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_POINTWISE_ALPHA2", "MIOPEN_ATTR_OPERATION_POINTWISE_ALPHA2", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_POINTWISE_BDESC", "MIOPEN_ATTR_OPERATION_POINTWISE_BDESC", "numeric_literal");
Expand All @@ -3394,6 +3428,9 @@ sub rocSubstitutions {
subst("CUDNN_ATTR_OPERATION_POINTWISE_TDESC", "MIOPEN_ATTR_OPERATION_POINTWISE_TDESC", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_POINTWISE_XDESC", "MIOPEN_ATTR_OPERATION_POINTWISE_XDESC", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_POINTWISE_YDESC", "MIOPEN_ATTR_OPERATION_POINTWISE_YDESC", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_REDUCTION_DESC", "MIOPEN_ATTR_OPERATION_REDUCTION_DESC", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_REDUCTION_XDESC", "MIOPEN_ATTR_OPERATION_REDUCTION_XDESC", "numeric_literal");
subst("CUDNN_ATTR_OPERATION_REDUCTION_YDESC", "MIOPEN_ATTR_OPERATION_REDUCTION_YDESC", "numeric_literal");
subst("CUDNN_ATTR_POINTWISE_AXIS", "MIOPEN_ATTR_POINTWISE_AXIS", "numeric_literal");
subst("CUDNN_ATTR_POINTWISE_ELU_ALPHA", "MIOPEN_ATTR_POINTWISE_ELU_ALPHA", "numeric_literal");
subst("CUDNN_ATTR_POINTWISE_MATH_PREC", "MIOPEN_ATTR_POINTWISE_MATH_PREC", "numeric_literal");
Expand All @@ -3404,6 +3441,17 @@ sub rocSubstitutions {
subst("CUDNN_ATTR_POINTWISE_RELU_UPPER_CLIP", "MIOPEN_ATTR_POINTWISE_RELU_UPPER_CLIP", "numeric_literal");
subst("CUDNN_ATTR_POINTWISE_SOFTPLUS_BETA", "MIOPEN_ATTR_POINTWISE_SOFTPLUS_BETA", "numeric_literal");
subst("CUDNN_ATTR_POINTWISE_SWISH_BETA", "MIOPEN_ATTR_POINTWISE_SWISH_BETA", "numeric_literal");
subst("CUDNN_ATTR_REDUCTION_COMP_TYPE", "MIOPEN_ATTR_REDUCTION_COMP_TYPE", "numeric_literal");
subst("CUDNN_ATTR_REDUCTION_OPERATOR", "MIOPEN_ATTR_REDUCTION_OPERATOR", "numeric_literal");
subst("CUDNN_ATTR_RESAMPLE_COMP_TYPE", "MIOPEN_ATTR_RESAMPLE_COMP_TYPE", "numeric_literal");
subst("CUDNN_ATTR_RESAMPLE_MODE", "MIOPEN_ATTR_RESAMPLE_MODE", "numeric_literal");
subst("CUDNN_ATTR_RESAMPLE_NAN_PROPAGATION", "MIOPEN_ATTR_RESAMPLE_NAN_PROPAGATION", "numeric_literal");
subst("CUDNN_ATTR_RESAMPLE_PADDING_MODE", "MIOPEN_ATTR_RESAMPLE_PADDING_MODE", "numeric_literal");
subst("CUDNN_ATTR_RESAMPLE_POST_PADDINGS", "MIOPEN_ATTR_RESAMPLE_POST_PADDINGS", "numeric_literal");
subst("CUDNN_ATTR_RESAMPLE_PRE_PADDINGS", "MIOPEN_ATTR_RESAMPLE_PRE_PADDINGS", "numeric_literal");
subst("CUDNN_ATTR_RESAMPLE_SPATIAL_DIMS", "MIOPEN_ATTR_RESAMPLE_SPATIAL_DIMS", "numeric_literal");
subst("CUDNN_ATTR_RESAMPLE_STRIDES", "MIOPEN_ATTR_RESAMPLE_STRIDES", "numeric_literal");
subst("CUDNN_ATTR_RESAMPLE_WINDOW_DIMS", "MIOPEN_ATTR_RESAMPLE_WINDOW_DIMS", "numeric_literal");
subst("CUDNN_ATTR_TENSOR_BYTE_ALIGNMENT", "MIOPEN_ATTR_TENSOR_BYTE_ALIGNMENT", "numeric_literal");
subst("CUDNN_ATTR_TENSOR_DATA_TYPE", "MIOPEN_ATTR_TENSOR_DATA_TYPE", "numeric_literal");
subst("CUDNN_ATTR_TENSOR_DIMENSIONS", "MIOPEN_ATTR_TENSOR_DIMENSIONS", "numeric_literal");
Expand Down
Loading

0 comments on commit 62a17f7

Please sign in to comment.