diff --git a/bin/hipify-perl b/bin/hipify-perl index ac1393cf..58001988 100755 --- a/bin/hipify-perl +++ b/bin/hipify-perl @@ -3176,6 +3176,8 @@ sub rocSubstitutions { subst("cudnnSoftmaxMode_t", "miopenSoftmaxMode_t", "type"); subst("cudnnStatus_t", "miopenStatus_t", "type"); subst("cudnnTensorDescriptor_t", "miopenTensorDescriptor_t", "type"); + subst("curandStatus", "rocrand_status", "type"); + subst("curandStatus_t", "rocrand_status", "type"); subst("cusolverDnHandle_t", "rocblas_handle", "type"); subst("cusolverEigMode_t", "rocblas_evect", "type"); subst("cusolverEigRange_t", "rocblas_erange", "type"); diff --git a/docs/tables/CURAND_API_supported_by_HIP_and_ROC.md b/docs/tables/CURAND_API_supported_by_HIP_and_ROC.md new file mode 100644 index 00000000..b30a49b2 --- /dev/null +++ b/docs/tables/CURAND_API_supported_by_HIP_and_ROC.md @@ -0,0 +1,170 @@ +# CURAND API supported by + +## **1. CURAND Data types** + +|**CUDA**|**A**|**D**|**C**|**R**|**HIP**|**A**|**D**|**C**|**R**|**E**|**ROC**|**A**|**D**|**C**|**R**|**E**| +|:--|:-:|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:|:-:| +|`CURAND_3RD`| | | | | | | | | | | | | | | | | +|`CURAND_BINARY_SEARCH`| | | | | | | | | | | | | | | | | +|`CURAND_CHOOSE_BEST`| | | | | | | | | | | | | | | | | +|`CURAND_DEFINITION`| | | | | | | | | | | | | | | | | +|`CURAND_DEVICE_API`| | | | | | | | | | | | | | | | | +|`CURAND_DIRECTION_VECTORS_32_JOEKUO6`| | | | |`HIPRAND_DIRECTION_VECTORS_32_JOEKUO6`|6.0.0| | | | | | | | | | | +|`CURAND_DIRECTION_VECTORS_64_JOEKUO6`| | | | |`HIPRAND_DIRECTION_VECTORS_64_JOEKUO6`|6.0.0| | | | | | | | | | | +|`CURAND_DISCRETE_GAUSS`| | | | | | | | | | | | | | | | | +|`CURAND_FAST_REJECTION`| | | | | | | | | | | | | | | | | +|`CURAND_HITR`| | | | | | | | | | | | | | | | | +|`CURAND_ITR`| | | | | | | | | | | | | | | | | +|`CURAND_KNUTH`| | | | | | | | | | | | | | | | | +|`CURAND_M1`| | | | | | | | | | | | | | | | | +|`CURAND_M2`| | | | | | | | | | | | | | | | | +|`CURAND_ORDERING_PSEUDO_BEST`| | | | |`HIPRAND_ORDERING_PSEUDO_BEST`|6.2.0| | | |6.2.0| | | | | | | +|`CURAND_ORDERING_PSEUDO_DEFAULT`| | | | |`HIPRAND_ORDERING_PSEUDO_DEFAULT`|6.2.0| | | |6.2.0| | | | | | | +|`CURAND_ORDERING_PSEUDO_DYNAMIC`|11.5| | | |`HIPRAND_ORDERING_PSEUDO_DYNAMIC`|6.2.0| | | |6.2.0| | | | | | | +|`CURAND_ORDERING_PSEUDO_LEGACY`|11.0| | | |`HIPRAND_ORDERING_PSEUDO_LEGACY`|6.2.0| | | |6.2.0| | | | | | | +|`CURAND_ORDERING_PSEUDO_SEEDED`| | | | |`HIPRAND_ORDERING_PSEUDO_SEEDED`|6.2.0| | | |6.2.0| | | | | | | +|`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_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| | | | | | | | | | | +|`CURAND_STATUS_ALLOCATION_FAILED`| | | | |`HIPRAND_STATUS_ALLOCATION_FAILED`|1.5.0| | | | | | | | | | | +|`CURAND_STATUS_ARCH_MISMATCH`| | | | |`HIPRAND_STATUS_ARCH_MISMATCH`|1.5.0| | | | | | | | | | | +|`CURAND_STATUS_DOUBLE_PRECISION_REQUIRED`| | | | |`HIPRAND_STATUS_DOUBLE_PRECISION_REQUIRED`|1.5.0| | | | | | | | | | | +|`CURAND_STATUS_INITIALIZATION_FAILED`| | | | |`HIPRAND_STATUS_INITIALIZATION_FAILED`|1.5.0| | | | | | | | | | | +|`CURAND_STATUS_INTERNAL_ERROR`| | | | |`HIPRAND_STATUS_INTERNAL_ERROR`|1.5.0| | | | | | | | | | | +|`CURAND_STATUS_LAUNCH_FAILURE`| | | | |`HIPRAND_STATUS_LAUNCH_FAILURE`|1.5.0| | | | | | | | | | | +|`CURAND_STATUS_LENGTH_NOT_MULTIPLE`| | | | |`HIPRAND_STATUS_LENGTH_NOT_MULTIPLE`|1.5.0| | | | | | | | | | | +|`CURAND_STATUS_NOT_INITIALIZED`| | | | |`HIPRAND_STATUS_NOT_INITIALIZED`|1.5.0| | | | | | | | | | | +|`CURAND_STATUS_OUT_OF_RANGE`| | | | |`HIPRAND_STATUS_OUT_OF_RANGE`|1.5.0| | | | | | | | | | | +|`CURAND_STATUS_PREEXISTING_FAILURE`| | | | |`HIPRAND_STATUS_PREEXISTING_FAILURE`|1.5.0| | | | | | | | | | | +|`CURAND_STATUS_SUCCESS`| | | | |`HIPRAND_STATUS_SUCCESS`|1.5.0| | | | | | | | | | | +|`CURAND_STATUS_TYPE_ERROR`| | | | |`HIPRAND_STATUS_TYPE_ERROR`|1.5.0| | | | | | | | | | | +|`CURAND_STATUS_VERSION_MISMATCH`| | | | |`HIPRAND_STATUS_VERSION_MISMATCH`|1.5.0| | | | | | | | | | | +|`curandDirectionVectorSet`| | | | |`hiprandDirectionVectorSet_t`|6.0.0| | | | | | | | | | | +|`curandDirectionVectorSet_t`| | | | |`hiprandDirectionVectorSet_t`|6.0.0| | | | | | | | | | | +|`curandDirectionVectors32_t`| | | | |`hiprandDirectionVectors32_t`|1.5.0| | | | | | | | | | | +|`curandDirectionVectors64_t`| | | | | | | | | | | | | | | | | +|`curandDiscreteDistribution_st`| | | | |`hiprandDiscreteDistribution_st`|1.5.0| | | | | | | | | | | +|`curandDiscreteDistribution_t`| | | | |`hiprandDiscreteDistribution_t`|1.5.0| | | | | | | | | | | +|`curandDistributionM2Shift_st`| | | | | | | | | | | | | | | | | +|`curandDistributionM2Shift_t`| | | | | | | | | | | | | | | | | +|`curandDistributionShift_st`| | | | | | | | | | | | | | | | | +|`curandDistributionShift_t`| | | | | | | | | | | | | | | | | +|`curandDistribution_st`| | | | | | | | | | | | | | | | | +|`curandDistribution_t`| | | | | | | | | | | | | | | | | +|`curandGenerator_st`| | | | |`hiprandGenerator_st`|1.5.0| | | | | | | | | | | +|`curandGenerator_t`| | | | |`hiprandGenerator_t`|1.5.0| | | | | | | | | | | +|`curandHistogramM2K_st`| | | | | | | | | | | | | | | | | +|`curandHistogramM2K_t`| | | | | | | | | | | | | | | | | +|`curandHistogramM2V_st`| | | | | | | | | | | | | | | | | +|`curandHistogramM2V_t`| | | | | | | | | | | | | | | | | +|`curandHistogramM2_st`| | | | | | | | | | | | | | | | | +|`curandHistogramM2_t`| | | | | | | | | | | | | | | | | +|`curandMethod`| | | | | | | | | | | | | | | | | +|`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| | | | | | | | | | | +|`curandState`| | | | |`hiprandState`|1.8.0| | | | | | | | | | | +|`curandStateMRG32k3a`| | | | |`hiprandStateMRG32k3a`|1.8.0| | | | | | | | | | | +|`curandStateMRG32k3a_t`| | | | |`hiprandStateMRG32k3a_t`|1.5.0| | | | | | | | | | | +|`curandStateMtgp32`| | | | |`hiprandStateMtgp32`|1.8.0| | | | | | | | | | | +|`curandStateMtgp32_t`| | | | |`hiprandStateMtgp32_t`|1.5.0| | | | | | | | | | | +|`curandStatePhilox4_32_10`| | | | |`hiprandStatePhilox4_32_10`|1.8.0| | | | | | | | | | | +|`curandStatePhilox4_32_10_t`| | | | |`hiprandStatePhilox4_32_10_t`|1.8.0| | | | | | | | | | | +|`curandStateScrambledSobol32`| | | | |`hiprandStateScrambledSobol32`|6.2.0| | | |6.2.0| | | | | | | +|`curandStateScrambledSobol32_t`| | | | |`hiprandStateScrambledSobol32_t`|6.2.0| | | |6.2.0| | | | | | | +|`curandStateScrambledSobol64`| | | | |`hiprandStateScrambledSobol64`|6.2.0| | | |6.2.0| | | | | | | +|`curandStateScrambledSobol64_t`| | | | |`hiprandStateScrambledSobol64_t`|6.2.0| | | |6.2.0| | | | | | | +|`curandStateSobol32`| | | | |`hiprandStateSobol32`|1.8.0| | | | | | | | | | | +|`curandStateSobol32_t`| | | | |`hiprandStateSobol32_t`|1.5.0| | | | | | | | | | | +|`curandStateSobol64`| | | | |`hiprandStateSobol64`|6.2.0| | | |6.2.0| | | | | | | +|`curandStateSobol64_t`| | | | |`hiprandStateSobol64_t`|6.2.0| | | |6.2.0| | | | | | | +|`curandStateXORWOW`| | | | |`hiprandStateXORWOW`|1.8.0| | | | | | | | | | | +|`curandStateXORWOW_t`| | | | |`hiprandStateXORWOW_t`|1.5.0| | | | | | | | | | | +|`curandState_t`| | | | |`hiprandState_t`|1.5.0| | | | | | | | | | | +|`curandStatus`| | | | |`hiprandStatus`|1.5.0| | | | |`rocrand_status`|1.5.1| | | | | +|`curandStatus_t`| | | | |`hiprandStatus_t`|1.5.0| | | | |`rocrand_status`|1.5.1| | | | | + +## **2. Host API Functions** + +|**CUDA**|**A**|**D**|**C**|**R**|**HIP**|**A**|**D**|**C**|**R**|**E**|**ROC**|**A**|**D**|**C**|**R**|**E**| +|:--|:-:|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:|:-:| +|`curandCreateGenerator`| | | | |`hiprandCreateGenerator`|1.5.0| | | | | | | | | | | +|`curandCreateGeneratorHost`| | | | |`hiprandCreateGeneratorHost`|1.5.0| | | | | | | | | | | +|`curandCreatePoissonDistribution`| | | | |`hiprandCreatePoissonDistribution`|1.5.0| | | | | | | | | | | +|`curandDestroyDistribution`| | | | |`hiprandDestroyDistribution`|1.5.0| | | | | | | | | | | +|`curandDestroyGenerator`| | | | |`hiprandDestroyGenerator`|1.5.0| | | | | | | | | | | +|`curandGenerate`| | | | |`hiprandGenerate`|1.5.0| | | | | | | | | | | +|`curandGenerateLogNormal`| | | | |`hiprandGenerateLogNormal`|1.5.0| | | | | | | | | | | +|`curandGenerateLogNormalDouble`| | | | |`hiprandGenerateLogNormalDouble`|1.5.0| | | | | | | | | | | +|`curandGenerateLongLong`| | | | | | | | | | | | | | | | | +|`curandGenerateNormal`| | | | |`hiprandGenerateNormal`|1.5.0| | | | | | | | | | | +|`curandGenerateNormalDouble`| | | | |`hiprandGenerateNormalDouble`|1.5.0| | | | | | | | | | | +|`curandGeneratePoisson`| | | | |`hiprandGeneratePoisson`|1.5.0| | | | | | | | | | | +|`curandGenerateSeeds`| | | | |`hiprandGenerateSeeds`|1.5.0| | | | | | | | | | | +|`curandGenerateUniform`| | | | |`hiprandGenerateUniform`|1.5.0| | | | | | | | | | | +|`curandGenerateUniformDouble`| | | | |`hiprandGenerateUniformDouble`|1.5.0| | | | | | | | | | | +|`curandGetDirectionVectors32`| | | | |`hiprandGetDirectionVectors32`|6.0.0| | | | | | | | | | | +|`curandGetDirectionVectors64`| | | | |`hiprandGetDirectionVectors64`|6.0.0| | | | | | | | | | | +|`curandGetProperty`|8.0| | | | | | | | | | | | | | | | +|`curandGetScrambleConstants32`| | | | |`hiprandGetScrambleConstants32`|6.0.0| | | | | | | | | | | +|`curandGetScrambleConstants64`| | | | |`hiprandGetScrambleConstants64`|6.0.0| | | | | | | | | | | +|`curandGetVersion`| | | | |`hiprandGetVersion`|1.5.0| | | | | | | | | | | +|`curandMakeMTGP32Constants`| | | | |`hiprandMakeMTGP32Constants`|1.5.0| | | | | | | | | | | +|`curandMakeMTGP32KernelState`| | | | |`hiprandMakeMTGP32KernelState`|1.5.0| | | | | | | | | | | +|`curandSetGeneratorOffset`| | | | |`hiprandSetGeneratorOffset`|1.5.0| | | | | | | | | | | +|`curandSetGeneratorOrdering`| | | | |`hiprandSetGeneratorOrdering`|6.2.0| | | |6.2.0| | | | | | | +|`curandSetPseudoRandomGeneratorSeed`| | | | |`hiprandSetPseudoRandomGeneratorSeed`|1.5.0| | | | | | | | | | | +|`curandSetQuasiRandomGeneratorDimensions`| | | | |`hiprandSetQuasiRandomGeneratorDimensions`|1.5.0| | | | | | | | | | | +|`curandSetStream`| | | | |`hiprandSetStream`|1.5.0| | | | | | | | | | | + +## **3. Device API Functions** + +|**CUDA**|**A**|**D**|**C**|**R**|**HIP**|**A**|**D**|**C**|**R**|**E**|**ROC**|**A**|**D**|**C**|**R**|**E**| +|:--|:-:|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:|:-:| +|`__curand_umul`|11.5| | | | | | | | | | | | | | | | +|`curand`| | | | |`hiprand`|1.5.0| | | | | | | | | | | +|`curand_Philox4x32_10`| | | | | | | | | | | | | | | | | +|`curand_discrete`| | | | |`hiprand_discrete`|1.5.0| | | | | | | | | | | +|`curand_discrete4`| | | | |`hiprand_discrete4`|1.5.0| | | | | | | | | | | +|`curand_init`| | | | |`hiprand_init`|1.5.0| | | | | | | | | | | +|`curand_log_normal`| | | | |`hiprand_log_normal`|1.5.0| | | | | | | | | | | +|`curand_log_normal2`| | | | |`hiprand_log_normal2`|1.5.0| | | | | | | | | | | +|`curand_log_normal2_double`| | | | |`hiprand_log_normal2_double`|1.5.0| | | | | | | | | | | +|`curand_log_normal4`| | | | |`hiprand_log_normal4`|1.5.0| | | | | | | | | | | +|`curand_log_normal4_double`| | | | |`hiprand_log_normal4_double`|1.5.0| | | | | | | | | | | +|`curand_log_normal_double`| | | | |`hiprand_log_normal_double`|1.5.0| | | | | | | | | | | +|`curand_mtgp32_single`| | | | | | | | | | | | | | | | | +|`curand_mtgp32_single_specific`| | | | | | | | | | | | | | | | | +|`curand_mtgp32_specific`| | | | | | | | | | | | | | | | | +|`curand_normal`| | | | |`hiprand_normal`|1.5.0| | | | | | | | | | | +|`curand_normal2`| | | | |`hiprand_normal2`|1.5.0| | | | | | | | | | | +|`curand_normal2_double`| | | | |`hiprand_normal2_double`|1.5.0| | | | | | | | | | | +|`curand_normal4`| | | | |`hiprand_normal4`|1.5.0| | | | | | | | | | | +|`curand_normal4_double`| | | | |`hiprand_normal4_double`|1.5.0| | | | | | | | | | | +|`curand_normal_double`| | | | |`hiprand_normal_double`|1.5.0| | | | | | | | | | | +|`curand_poisson`| | | | |`hiprand_poisson`|1.5.0| | | | | | | | | | | +|`curand_poisson4`| | | | |`hiprand_poisson4`|1.5.0| | | | | | | | | | | +|`curand_uniform`| | | | |`hiprand_uniform`|1.5.0| | | | | | | | | | | +|`curand_uniform2_double`| | | | |`hiprand_uniform2_double`|1.5.0| | | | | | | | | | | +|`curand_uniform4`| | | | |`hiprand_uniform4`|1.5.0| | | | | | | | | | | +|`curand_uniform4_double`| | | | |`hiprand_uniform4_double`|1.5.0| | | | | | | | | | | +|`curand_uniform_double`| | | | |`hiprand_uniform_double`|1.5.0| | | | | | | | | | | + + +\*A - Added; D - Deprecated; C - Changed; R - Removed; E - Experimental \ No newline at end of file diff --git a/docs/tables/CURAND_API_supported_by_ROC.md b/docs/tables/CURAND_API_supported_by_ROC.md new file mode 100644 index 00000000..7a77e3cb --- /dev/null +++ b/docs/tables/CURAND_API_supported_by_ROC.md @@ -0,0 +1,170 @@ +# CURAND API supported by ROC + +## **1. CURAND Data types** + +|**CUDA**|**A**|**D**|**C**|**R**|**ROC**|**A**|**D**|**C**|**R**|**E**| +|:--|:-:|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:|:-:| +|`CURAND_3RD`| | | | | | | | | | | +|`CURAND_BINARY_SEARCH`| | | | | | | | | | | +|`CURAND_CHOOSE_BEST`| | | | | | | | | | | +|`CURAND_DEFINITION`| | | | | | | | | | | +|`CURAND_DEVICE_API`| | | | | | | | | | | +|`CURAND_DIRECTION_VECTORS_32_JOEKUO6`| | | | | | | | | | | +|`CURAND_DIRECTION_VECTORS_64_JOEKUO6`| | | | | | | | | | | +|`CURAND_DISCRETE_GAUSS`| | | | | | | | | | | +|`CURAND_FAST_REJECTION`| | | | | | | | | | | +|`CURAND_HITR`| | | | | | | | | | | +|`CURAND_ITR`| | | | | | | | | | | +|`CURAND_KNUTH`| | | | | | | | | | | +|`CURAND_M1`| | | | | | | | | | | +|`CURAND_M2`| | | | | | | | | | | +|`CURAND_ORDERING_PSEUDO_BEST`| | | | | | | | | | | +|`CURAND_ORDERING_PSEUDO_DEFAULT`| | | | | | | | | | | +|`CURAND_ORDERING_PSEUDO_DYNAMIC`|11.5| | | | | | | | | | +|`CURAND_ORDERING_PSEUDO_LEGACY`|11.0| | | | | | | | | | +|`CURAND_ORDERING_PSEUDO_SEEDED`| | | | | | | | | | | +|`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_TEST`| | | | | | | | | | | +|`CURAND_SCRAMBLED_DIRECTION_VECTORS_32_JOEKUO6`| | | | | | | | | | | +|`CURAND_SCRAMBLED_DIRECTION_VECTORS_64_JOEKUO6`| | | | | | | | | | | +|`CURAND_STATUS_ALLOCATION_FAILED`| | | | | | | | | | | +|`CURAND_STATUS_ARCH_MISMATCH`| | | | | | | | | | | +|`CURAND_STATUS_DOUBLE_PRECISION_REQUIRED`| | | | | | | | | | | +|`CURAND_STATUS_INITIALIZATION_FAILED`| | | | | | | | | | | +|`CURAND_STATUS_INTERNAL_ERROR`| | | | | | | | | | | +|`CURAND_STATUS_LAUNCH_FAILURE`| | | | | | | | | | | +|`CURAND_STATUS_LENGTH_NOT_MULTIPLE`| | | | | | | | | | | +|`CURAND_STATUS_NOT_INITIALIZED`| | | | | | | | | | | +|`CURAND_STATUS_OUT_OF_RANGE`| | | | | | | | | | | +|`CURAND_STATUS_PREEXISTING_FAILURE`| | | | | | | | | | | +|`CURAND_STATUS_SUCCESS`| | | | | | | | | | | +|`CURAND_STATUS_TYPE_ERROR`| | | | | | | | | | | +|`CURAND_STATUS_VERSION_MISMATCH`| | | | | | | | | | | +|`curandDirectionVectorSet`| | | | | | | | | | | +|`curandDirectionVectorSet_t`| | | | | | | | | | | +|`curandDirectionVectors32_t`| | | | | | | | | | | +|`curandDirectionVectors64_t`| | | | | | | | | | | +|`curandDiscreteDistribution_st`| | | | | | | | | | | +|`curandDiscreteDistribution_t`| | | | | | | | | | | +|`curandDistributionM2Shift_st`| | | | | | | | | | | +|`curandDistributionM2Shift_t`| | | | | | | | | | | +|`curandDistributionShift_st`| | | | | | | | | | | +|`curandDistributionShift_t`| | | | | | | | | | | +|`curandDistribution_st`| | | | | | | | | | | +|`curandDistribution_t`| | | | | | | | | | | +|`curandGenerator_st`| | | | | | | | | | | +|`curandGenerator_t`| | | | | | | | | | | +|`curandHistogramM2K_st`| | | | | | | | | | | +|`curandHistogramM2K_t`| | | | | | | | | | | +|`curandHistogramM2V_st`| | | | | | | | | | | +|`curandHistogramM2V_t`| | | | | | | | | | | +|`curandHistogramM2_st`| | | | | | | | | | | +|`curandHistogramM2_t`| | | | | | | | | | | +|`curandMethod`| | | | | | | | | | | +|`curandMethod_t`| | | | | | | | | | | +|`curandOrdering`| | | | | | | | | | | +|`curandOrdering_t`| | | | | | | | | | | +|`curandRngType`| | | | | | | | | | | +|`curandRngType_t`| | | | | | | | | | | +|`curandState`| | | | | | | | | | | +|`curandStateMRG32k3a`| | | | | | | | | | | +|`curandStateMRG32k3a_t`| | | | | | | | | | | +|`curandStateMtgp32`| | | | | | | | | | | +|`curandStateMtgp32_t`| | | | | | | | | | | +|`curandStatePhilox4_32_10`| | | | | | | | | | | +|`curandStatePhilox4_32_10_t`| | | | | | | | | | | +|`curandStateScrambledSobol32`| | | | | | | | | | | +|`curandStateScrambledSobol32_t`| | | | | | | | | | | +|`curandStateScrambledSobol64`| | | | | | | | | | | +|`curandStateScrambledSobol64_t`| | | | | | | | | | | +|`curandStateSobol32`| | | | | | | | | | | +|`curandStateSobol32_t`| | | | | | | | | | | +|`curandStateSobol64`| | | | | | | | | | | +|`curandStateSobol64_t`| | | | | | | | | | | +|`curandStateXORWOW`| | | | | | | | | | | +|`curandStateXORWOW_t`| | | | | | | | | | | +|`curandState_t`| | | | | | | | | | | +|`curandStatus`| | | | |`rocrand_status`|1.5.1| | | | | +|`curandStatus_t`| | | | |`rocrand_status`|1.5.1| | | | | + +## **2. Host API Functions** + +|**CUDA**|**A**|**D**|**C**|**R**|**ROC**|**A**|**D**|**C**|**R**|**E**| +|:--|:-:|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:|:-:| +|`curandCreateGenerator`| | | | | | | | | | | +|`curandCreateGeneratorHost`| | | | | | | | | | | +|`curandCreatePoissonDistribution`| | | | | | | | | | | +|`curandDestroyDistribution`| | | | | | | | | | | +|`curandDestroyGenerator`| | | | | | | | | | | +|`curandGenerate`| | | | | | | | | | | +|`curandGenerateLogNormal`| | | | | | | | | | | +|`curandGenerateLogNormalDouble`| | | | | | | | | | | +|`curandGenerateLongLong`| | | | | | | | | | | +|`curandGenerateNormal`| | | | | | | | | | | +|`curandGenerateNormalDouble`| | | | | | | | | | | +|`curandGeneratePoisson`| | | | | | | | | | | +|`curandGenerateSeeds`| | | | | | | | | | | +|`curandGenerateUniform`| | | | | | | | | | | +|`curandGenerateUniformDouble`| | | | | | | | | | | +|`curandGetDirectionVectors32`| | | | | | | | | | | +|`curandGetDirectionVectors64`| | | | | | | | | | | +|`curandGetProperty`|8.0| | | | | | | | | | +|`curandGetScrambleConstants32`| | | | | | | | | | | +|`curandGetScrambleConstants64`| | | | | | | | | | | +|`curandGetVersion`| | | | | | | | | | | +|`curandMakeMTGP32Constants`| | | | | | | | | | | +|`curandMakeMTGP32KernelState`| | | | | | | | | | | +|`curandSetGeneratorOffset`| | | | | | | | | | | +|`curandSetGeneratorOrdering`| | | | | | | | | | | +|`curandSetPseudoRandomGeneratorSeed`| | | | | | | | | | | +|`curandSetQuasiRandomGeneratorDimensions`| | | | | | | | | | | +|`curandSetStream`| | | | | | | | | | | + +## **3. Device API Functions** + +|**CUDA**|**A**|**D**|**C**|**R**|**ROC**|**A**|**D**|**C**|**R**|**E**| +|:--|:-:|:-:|:-:|:-:|:--|:-:|:-:|:-:|:-:|:-:| +|`__curand_umul`|11.5| | | | | | | | | | +|`curand`| | | | | | | | | | | +|`curand_Philox4x32_10`| | | | | | | | | | | +|`curand_discrete`| | | | | | | | | | | +|`curand_discrete4`| | | | | | | | | | | +|`curand_init`| | | | | | | | | | | +|`curand_log_normal`| | | | | | | | | | | +|`curand_log_normal2`| | | | | | | | | | | +|`curand_log_normal2_double`| | | | | | | | | | | +|`curand_log_normal4`| | | | | | | | | | | +|`curand_log_normal4_double`| | | | | | | | | | | +|`curand_log_normal_double`| | | | | | | | | | | +|`curand_mtgp32_single`| | | | | | | | | | | +|`curand_mtgp32_single_specific`| | | | | | | | | | | +|`curand_mtgp32_specific`| | | | | | | | | | | +|`curand_normal`| | | | | | | | | | | +|`curand_normal2`| | | | | | | | | | | +|`curand_normal2_double`| | | | | | | | | | | +|`curand_normal4`| | | | | | | | | | | +|`curand_normal4_double`| | | | | | | | | | | +|`curand_normal_double`| | | | | | | | | | | +|`curand_poisson`| | | | | | | | | | | +|`curand_poisson4`| | | | | | | | | | | +|`curand_uniform`| | | | | | | | | | | +|`curand_uniform2_double`| | | | | | | | | | | +|`curand_uniform4`| | | | | | | | | | | +|`curand_uniform4_double`| | | | | | | | | | | +|`curand_uniform_double`| | | | | | | | | | | + + +\*A - Added; D - Deprecated; C - Changed; R - Removed; E - Experimental \ No newline at end of file diff --git a/src/CUDA2HIP_Doc.cpp b/src/CUDA2HIP_Doc.cpp index 85c838bf..59f952c5 100644 --- a/src/CUDA2HIP_Doc.cpp +++ b/src/CUDA2HIP_Doc.cpp @@ -87,6 +87,11 @@ namespace doc { const string sRAND = "CURAND_API_supported_by_HIP"; const string sRAND_md = sRAND + md_ext; const string sRAND_csv = sRAND + csv_ext; + const string sRAND_and_ROC_md = sRAND + sandROC + md_ext; + const string sRAND_and_ROC_csv = sRAND + sandROC + csv_ext; + const string sROCRAND = "CURAND_API_supported_by_ROC"; + const string sROCRAND_md = sROCRAND + md_ext; + const string sROCRAND_csv = sROCRAND + csv_ext; const string sCURAND = "CURAND"; const string sandMIOPEN = "_and_MIOPEN"; @@ -636,7 +641,7 @@ namespace doc { class RAND: public DOC { public: - RAND(const string &outDir): DOC(outDir) {} + RAND(const string &outDir): DOC(outDir) { hasROC = true; } virtual ~RAND() {} protected: const sectionMap &getSections() const override { return CUDA_RAND_API_SECTION_MAP; } @@ -648,12 +653,28 @@ namespace doc { const hipVersionMap &getHipTypeVersions() const override { return HIP_RAND_TYPE_NAME_VER_MAP; } const string &getName() const override { return sCURAND; } const string &getFileName(docType format) const override { - switch (format) { + switch (format) { case none: default: return sEmpty; - case md: return sRAND_md; - case csv: return sRAND_csv; - } + case md: return roc == joint ? sRAND_and_ROC_md : sRAND_md; + case csv: return roc == joint ? sRAND_and_ROC_csv : sRAND_csv; + } + } + }; + + class ROCRAND : public RAND { + public: + ROCRAND(const string& outDir) : RAND(outDir) { hasROC = false; isROC = true; } + virtual ~ROCRAND() {} + protected: + const string& getAPI() const override { return sROC; } + const string& getFileName(docType format) const override { + switch (format) { + case none: + default: return sEmpty; + case md: return sROCRAND_md; + case csv: return sROCRAND_csv; + } } }; @@ -878,14 +899,16 @@ namespace doc { ROCSOLVER rocsolver(sOut); MIOPEN miopen(sOut); ROCSPARSE rocsparse(sOut); + RAND rand(sOut); + docs.addDoc(&rand); + ROCRAND rocrand(sOut); if (docRoc == separate) { docs.addDoc(&rocblas); + docs.addDoc(&rocrand); docs.addDoc(&miopen); docs.addDoc(&rocsparse); docs.addDoc(&rocsolver); } - RAND rand(sOut); - docs.addDoc(&rand); DNN dnn(sOut); docs.addDoc(&dnn); FFT fft(sOut); diff --git a/src/CUDA2HIP_RAND_API_types.cpp b/src/CUDA2HIP_RAND_API_types.cpp index 123189f1..14b49839 100644 --- a/src/CUDA2HIP_RAND_API_types.cpp +++ b/src/CUDA2HIP_RAND_API_types.cpp @@ -25,8 +25,8 @@ THE SOFTWARE. // Map of all functions const std::map CUDA_RAND_TYPE_NAME_MAP { // RAND Host types - {"curandStatus", {"hiprandStatus", "", CONV_TYPE, API_RAND, 1}}, - {"curandStatus_t", {"hiprandStatus_t", "", CONV_TYPE, API_RAND, 1}}, + {"curandStatus", {"hiprandStatus", "rocrand_status", CONV_TYPE, API_RAND, 1}}, + {"curandStatus_t", {"hiprandStatus_t", "rocrand_status", CONV_TYPE, API_RAND, 1}}, {"curandRngType", {"hiprandRngType_t", "", CONV_TYPE, API_RAND, 1}}, {"curandRngType_t", {"hiprandRngType_t", "", CONV_TYPE, API_RAND, 1}}, {"curandGenerator_st", {"hiprandGenerator_st", "", CONV_TYPE, API_RAND, 1}}, @@ -204,4 +204,6 @@ const std::map HIP_RAND_TYPE_NAME_VER_MAP { {"hiprandStateScrambledSobol64_t", {HIP_6020, HIP_0, HIP_0, HIP_LATEST}}, {"hiprandStateSobol64", {HIP_6020, HIP_0, HIP_0, HIP_LATEST}}, {"hiprandStateSobol64_t", {HIP_6020, HIP_0, HIP_0, HIP_LATEST}}, + + {"rocrand_status", {HIP_1051, HIP_0, HIP_0 }}, }; diff --git a/src/Statistics.cpp b/src/Statistics.cpp index 0902fb7e..a90df6c4 100644 --- a/src/Statistics.cpp +++ b/src/Statistics.cpp @@ -366,7 +366,7 @@ void Statistics::setActive(const std::string &name) { bool Statistics::isToRoc(const hipCounter &counter) { return (counter.apiType == API_BLAS || counter.apiType == API_DNN || counter.apiType == API_SPARSE || counter.apiType == API_SOLVER || - counter.apiType == API_RUNTIME || counter.apiType == API_COMPLEX) && + counter.apiType == API_RUNTIME || counter.apiType == API_COMPLEX || counter.apiType == API_RAND) && ((TranslateToRoc && !TranslateToMIOpen && !isRocMiopenOnly(counter)) || TranslateToMIOpen); }