Skip to content

Commit

Permalink
Merge pull request ROCm#1633 from emankov/HIPIFY
Browse files Browse the repository at this point in the history
[HIPIFY][rocRAND][feature] Support for `cuRAND -> rocRAND` hipification - Step 4 - Data Types
  • Loading branch information
emankov authored Aug 28, 2024
2 parents 4dc8f6d + 22a7719 commit 5ca3b0c
Show file tree
Hide file tree
Showing 6 changed files with 170 additions and 62 deletions.
13 changes: 13 additions & 0 deletions bin/hipify-perl
Original file line number Diff line number Diff line change
Expand Up @@ -3206,6 +3206,8 @@ sub rocSubstitutions {
subst("cudnnStatus_t", "miopenStatus_t", "type");
subst("cudnnTensorDescriptor_t", "miopenTensorDescriptor_t", "type");
subst("cudnnTensorFormat_t", "miopenTensorLayout_t", "type");
subst("curandRngType", "rocrand_rng_type", "type");
subst("curandRngType_t", "rocrand_rng_type", "type");
subst("curandStatus", "rocrand_status", "type");
subst("curandStatus_t", "rocrand_status", "type");
subst("cusolverDnHandle_t", "rocblas_handle", "type");
Expand Down Expand Up @@ -3436,6 +3438,17 @@ sub rocSubstitutions {
subst("CUDNN_TYPE_TENSOR_REORDERING_MODE", "MIOPEN_TYPE_TENSOR_REORDERING_MODE", "numeric_literal");
subst("CUDNN_TYPE_VOID_PTR", "MIOPEN_TYPE_VOID_PTR", "numeric_literal");
subst("CUDNN_UNIDIRECTIONAL", "miopenRNNunidirection", "numeric_literal");
subst("CURAND_RNG_PSEUDO_DEFAULT", "ROCRAND_RNG_PSEUDO_DEFAULT", "numeric_literal");
subst("CURAND_RNG_PSEUDO_MRG32K3A", "ROCRAND_RNG_PSEUDO_MRG32K3A", "numeric_literal");
subst("CURAND_RNG_PSEUDO_MT19937", "ROCRAND_RNG_PSEUDO_MT19937", "numeric_literal");
subst("CURAND_RNG_PSEUDO_MTGP32", "ROCRAND_RNG_PSEUDO_MTGP32", "numeric_literal");
subst("CURAND_RNG_PSEUDO_PHILOX4_32_10", "ROCRAND_RNG_PSEUDO_PHILOX4_32_10", "numeric_literal");
subst("CURAND_RNG_PSEUDO_XORWOW", "ROCRAND_RNG_PSEUDO_XORWOW", "numeric_literal");
subst("CURAND_RNG_QUASI_DEFAULT", "ROCRAND_RNG_QUASI_DEFAULT", "numeric_literal");
subst("CURAND_RNG_QUASI_SCRAMBLED_SOBOL32", "ROCRAND_RNG_QUASI_SCRAMBLED_SOBOL32", "numeric_literal");
subst("CURAND_RNG_QUASI_SCRAMBLED_SOBOL64", "ROCRAND_RNG_QUASI_SCRAMBLED_SOBOL64", "numeric_literal");
subst("CURAND_RNG_QUASI_SOBOL32", "ROCRAND_RNG_QUASI_SOBOL32", "numeric_literal");
subst("CURAND_RNG_QUASI_SOBOL64", "ROCRAND_RNG_QUASI_SOBOL64", "numeric_literal");
subst("CURAND_STATUS_ALLOCATION_FAILED", "ROCRAND_STATUS_ALLOCATION_FAILED", "numeric_literal");
subst("CURAND_STATUS_DOUBLE_PRECISION_REQUIRED", "ROCRAND_STATUS_DOUBLE_PRECISION_REQUIRED", "numeric_literal");
subst("CURAND_STATUS_INTERNAL_ERROR", "ROCRAND_STATUS_INTERNAL_ERROR", "numeric_literal");
Expand Down
26 changes: 13 additions & 13 deletions docs/tables/CURAND_API_supported_by_HIP_and_ROC.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@
|`CURAND_ORDERING_QUASI_DEFAULT`| | | | |`HIPRAND_ORDERING_QUASI_DEFAULT`|6.2.0| | | |6.2.0| | | | | | |
|`CURAND_POISSON`| | | | | | | | | | | | | | | | |
|`CURAND_REJECTION`| | | | | | | | | | | | | | | | |
|`CURAND_RNG_PSEUDO_DEFAULT`| | | | |`HIPRAND_RNG_PSEUDO_DEFAULT`|1.5.0| | | | | | | | | | |
|`CURAND_RNG_PSEUDO_MRG32K3A`| | | | |`HIPRAND_RNG_PSEUDO_MRG32K3A`|1.5.0| | | | | | | | | | |
|`CURAND_RNG_PSEUDO_MT19937`| | | | |`HIPRAND_RNG_PSEUDO_MT19937`|1.5.0| | | | | | | | | | |
|`CURAND_RNG_PSEUDO_MTGP32`| | | | |`HIPRAND_RNG_PSEUDO_MTGP32`|1.5.0| | | | | | | | | | |
|`CURAND_RNG_PSEUDO_PHILOX4_32_10`| | | | |`HIPRAND_RNG_PSEUDO_PHILOX4_32_10`|1.5.0| | | | | | | | | | |
|`CURAND_RNG_PSEUDO_XORWOW`| | | | |`HIPRAND_RNG_PSEUDO_XORWOW`|1.5.0| | | | | | | | | | |
|`CURAND_RNG_QUASI_DEFAULT`| | | | |`HIPRAND_RNG_QUASI_DEFAULT`|1.5.0| | | | | | | | | | |
|`CURAND_RNG_QUASI_SCRAMBLED_SOBOL32`| | | | |`HIPRAND_RNG_QUASI_SCRAMBLED_SOBOL32`|1.5.0| | | | | | | | | | |
|`CURAND_RNG_QUASI_SCRAMBLED_SOBOL64`| | | | |`HIPRAND_RNG_QUASI_SCRAMBLED_SOBOL64`|1.5.0| | | | | | | | | | |
|`CURAND_RNG_QUASI_SOBOL32`| | | | |`HIPRAND_RNG_QUASI_SOBOL32`|1.5.0| | | | | | | | | | |
|`CURAND_RNG_QUASI_SOBOL64`| | | | |`HIPRAND_RNG_QUASI_SOBOL64`|1.5.0| | | | | | | | | | |
|`CURAND_RNG_PSEUDO_DEFAULT`| | | | |`HIPRAND_RNG_PSEUDO_DEFAULT`|1.5.0| | | | |`ROCRAND_RNG_PSEUDO_DEFAULT`|1.5.0| | | | |
|`CURAND_RNG_PSEUDO_MRG32K3A`| | | | |`HIPRAND_RNG_PSEUDO_MRG32K3A`|1.5.0| | | | |`ROCRAND_RNG_PSEUDO_MRG32K3A`|1.5.0| | | | |
|`CURAND_RNG_PSEUDO_MT19937`| | | | |`HIPRAND_RNG_PSEUDO_MT19937`|1.5.0| | | | |`ROCRAND_RNG_PSEUDO_MT19937`|5.5.0| | | | |
|`CURAND_RNG_PSEUDO_MTGP32`| | | | |`HIPRAND_RNG_PSEUDO_MTGP32`|1.5.0| | | | |`ROCRAND_RNG_PSEUDO_MTGP32`|1.5.0| | | | |
|`CURAND_RNG_PSEUDO_PHILOX4_32_10`| | | | |`HIPRAND_RNG_PSEUDO_PHILOX4_32_10`|1.5.0| | | | |`ROCRAND_RNG_PSEUDO_PHILOX4_32_10`|1.5.0| | | | |
|`CURAND_RNG_PSEUDO_XORWOW`| | | | |`HIPRAND_RNG_PSEUDO_XORWOW`|1.5.0| | | | |`ROCRAND_RNG_PSEUDO_XORWOW`|1.5.0| | | | |
|`CURAND_RNG_QUASI_DEFAULT`| | | | |`HIPRAND_RNG_QUASI_DEFAULT`|1.5.0| | | | |`ROCRAND_RNG_QUASI_DEFAULT`|1.5.0| | | | |
|`CURAND_RNG_QUASI_SCRAMBLED_SOBOL32`| | | | |`HIPRAND_RNG_QUASI_SCRAMBLED_SOBOL32`|1.5.0| | | | |`ROCRAND_RNG_QUASI_SCRAMBLED_SOBOL32`|5.4.0| | | | |
|`CURAND_RNG_QUASI_SCRAMBLED_SOBOL64`| | | | |`HIPRAND_RNG_QUASI_SCRAMBLED_SOBOL64`|1.5.0| | | | |`ROCRAND_RNG_QUASI_SCRAMBLED_SOBOL64`|5.4.0| | | | |
|`CURAND_RNG_QUASI_SOBOL32`| | | | |`HIPRAND_RNG_QUASI_SOBOL32`|1.5.0| | | | |`ROCRAND_RNG_QUASI_SOBOL32`|1.5.0| | | | |
|`CURAND_RNG_QUASI_SOBOL64`| | | | |`HIPRAND_RNG_QUASI_SOBOL64`|1.5.0| | | | |`ROCRAND_RNG_QUASI_SOBOL64`|4.5.0| | | | |
|`CURAND_RNG_TEST`| | | | |`HIPRAND_RNG_TEST`|1.5.0| | | | | | | | | | |
|`CURAND_SCRAMBLED_DIRECTION_VECTORS_32_JOEKUO6`| | | | |`HIPRAND_SCRAMBLED_DIRECTION_VECTORS_32_JOEKUO6`|6.0.0| | | | | | | | | | |
|`CURAND_SCRAMBLED_DIRECTION_VECTORS_64_JOEKUO6`| | | | |`HIPRAND_SCRAMBLED_DIRECTION_VECTORS_64_JOEKUO6`|6.0.0| | | | | | | | | | |
Expand Down Expand Up @@ -77,8 +77,8 @@
|`curandMethod_t`| | | | | | | | | | | | | | | | |
|`curandOrdering`| | | | |`hiprandOrdering`|6.2.0| | | |6.2.0| | | | | | |
|`curandOrdering_t`| | | | |`hiprandOrdering_t`|6.2.0| | | |6.2.0| | | | | | |
|`curandRngType`| | | | |`hiprandRngType_t`|1.5.0| | | | | | | | | | |
|`curandRngType_t`| | | | |`hiprandRngType_t`|1.5.0| | | | | | | | | | |
|`curandRngType`| | | | |`hiprandRngType_t`|1.5.0| | | | |`rocrand_rng_type`|1.5.0| | | | |
|`curandRngType_t`| | | | |`hiprandRngType_t`|1.5.0| | | | |`rocrand_rng_type`|1.5.0| | | | |
|`curandState`| | | | |`hiprandState`|1.8.0| | | | | | | | | | |
|`curandStateMRG32k3a`| | | | |`hiprandStateMRG32k3a`|1.8.0| | | | | | | | | | |
|`curandStateMRG32k3a_t`| | | | |`hiprandStateMRG32k3a_t`|1.5.0| | | | | | | | | | |
Expand Down
26 changes: 13 additions & 13 deletions docs/tables/CURAND_API_supported_by_ROC.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@
|`CURAND_ORDERING_QUASI_DEFAULT`| | | | | | | | | | |
|`CURAND_POISSON`| | | | | | | | | | |
|`CURAND_REJECTION`| | | | | | | | | | |
|`CURAND_RNG_PSEUDO_DEFAULT`| | | | | | | | | | |
|`CURAND_RNG_PSEUDO_MRG32K3A`| | | | | | | | | | |
|`CURAND_RNG_PSEUDO_MT19937`| | | | | | | | | | |
|`CURAND_RNG_PSEUDO_MTGP32`| | | | | | | | | | |
|`CURAND_RNG_PSEUDO_PHILOX4_32_10`| | | | | | | | | | |
|`CURAND_RNG_PSEUDO_XORWOW`| | | | | | | | | | |
|`CURAND_RNG_QUASI_DEFAULT`| | | | | | | | | | |
|`CURAND_RNG_QUASI_SCRAMBLED_SOBOL32`| | | | | | | | | | |
|`CURAND_RNG_QUASI_SCRAMBLED_SOBOL64`| | | | | | | | | | |
|`CURAND_RNG_QUASI_SOBOL32`| | | | | | | | | | |
|`CURAND_RNG_QUASI_SOBOL64`| | | | | | | | | | |
|`CURAND_RNG_PSEUDO_DEFAULT`| | | | |`ROCRAND_RNG_PSEUDO_DEFAULT`|1.5.0| | | | |
|`CURAND_RNG_PSEUDO_MRG32K3A`| | | | |`ROCRAND_RNG_PSEUDO_MRG32K3A`|1.5.0| | | | |
|`CURAND_RNG_PSEUDO_MT19937`| | | | |`ROCRAND_RNG_PSEUDO_MT19937`|5.5.0| | | | |
|`CURAND_RNG_PSEUDO_MTGP32`| | | | |`ROCRAND_RNG_PSEUDO_MTGP32`|1.5.0| | | | |
|`CURAND_RNG_PSEUDO_PHILOX4_32_10`| | | | |`ROCRAND_RNG_PSEUDO_PHILOX4_32_10`|1.5.0| | | | |
|`CURAND_RNG_PSEUDO_XORWOW`| | | | |`ROCRAND_RNG_PSEUDO_XORWOW`|1.5.0| | | | |
|`CURAND_RNG_QUASI_DEFAULT`| | | | |`ROCRAND_RNG_QUASI_DEFAULT`|1.5.0| | | | |
|`CURAND_RNG_QUASI_SCRAMBLED_SOBOL32`| | | | |`ROCRAND_RNG_QUASI_SCRAMBLED_SOBOL32`|5.4.0| | | | |
|`CURAND_RNG_QUASI_SCRAMBLED_SOBOL64`| | | | |`ROCRAND_RNG_QUASI_SCRAMBLED_SOBOL64`|5.4.0| | | | |
|`CURAND_RNG_QUASI_SOBOL32`| | | | |`ROCRAND_RNG_QUASI_SOBOL32`|1.5.0| | | | |
|`CURAND_RNG_QUASI_SOBOL64`| | | | |`ROCRAND_RNG_QUASI_SOBOL64`|4.5.0| | | | |
|`CURAND_RNG_TEST`| | | | | | | | | | |
|`CURAND_SCRAMBLED_DIRECTION_VECTORS_32_JOEKUO6`| | | | | | | | | | |
|`CURAND_SCRAMBLED_DIRECTION_VECTORS_64_JOEKUO6`| | | | | | | | | | |
Expand Down Expand Up @@ -77,8 +77,8 @@
|`curandMethod_t`| | | | | | | | | | |
|`curandOrdering`| | | | | | | | | | |
|`curandOrdering_t`| | | | | | | | | | |
|`curandRngType`| | | | | | | | | | |
|`curandRngType_t`| | | | | | | | | | |
|`curandRngType`| | | | |`rocrand_rng_type`|1.5.0| | | | |
|`curandRngType_t`| | | | |`rocrand_rng_type`|1.5.0| | | | |
|`curandState`| | | | | | | | | | |
|`curandStateMRG32k3a`| | | | | | | | | | |
|`curandStateMRG32k3a_t`| | | | | | | | | | |
Expand Down
Loading

0 comments on commit 5ca3b0c

Please sign in to comment.