diff --git a/bin/hipify-perl b/bin/hipify-perl index 7e17b624..90fde856 100755 --- a/bin/hipify-perl +++ b/bin/hipify-perl @@ -3870,10 +3870,15 @@ sub simpleSubstitutions { subst("cublasLtCreate", "hipblasLtCreate", "library"); subst("cublasLtDestroy", "hipblasLtDestroy", "library"); subst("cublasLtMatmul", "hipblasLtMatmul", "library"); + subst("cublasLtMatmulAlgoGetHeuristic", "hipblasLtMatmulAlgoGetHeuristic", "library"); subst("cublasLtMatmulDescCreate", "hipblasLtMatmulDescCreate", "library"); subst("cublasLtMatmulDescDestroy", "hipblasLtMatmulDescDestroy", "library"); subst("cublasLtMatmulDescGetAttribute", "hipblasLtMatmulDescGetAttribute", "library"); subst("cublasLtMatmulDescSetAttribute", "hipblasLtMatmulDescSetAttribute", "library"); + subst("cublasLtMatmulPreferenceCreate", "hipblasLtMatmulPreferenceCreate", "library"); + subst("cublasLtMatmulPreferenceDestroy", "hipblasLtMatmulPreferenceDestroy", "library"); + subst("cublasLtMatmulPreferenceGetAttribute", "hipblasLtMatmulPreferenceGetAttribute", "library"); + subst("cublasLtMatmulPreferenceSetAttribute", "hipblasLtMatmulPreferenceSetAttribute", "library"); subst("cublasLtMatrixLayoutCreate", "hipblasLtMatrixLayoutCreate", "library"); subst("cublasLtMatrixLayoutDestroy", "hipblasLtMatrixLayoutDestroy", "library"); subst("cublasLtMatrixLayoutGetAttribute", "hipblasLtMatrixLayoutGetAttribute", "library"); @@ -5469,6 +5474,7 @@ sub simpleSubstitutions { subst("cublasLtMatmulDescAttributes_t", "hipblasLtMatmulDescAttributes_t", "type"); subst("cublasLtMatmulDescOpaque_t", "hipblasLtMatmulDescOpaque_t", "type"); subst("cublasLtMatmulDesc_t", "hipblasLtMatmulDesc_t", "type"); + subst("cublasLtMatmulHeuristicResult_t", "hipblasLtMatmulHeuristicResult_t", "type"); subst("cublasLtMatmulPreferenceAttributes_t", "hipblasLtMatmulPreferenceAttributes_t", "type"); subst("cublasLtMatmulPreferenceOpaque_t", "hipblasLtMatmulPreferenceOpaque_t", "type"); subst("cublasLtMatmulPreference_t", "hipblasLtMatmulPreference_t", "type"); @@ -11308,6 +11314,7 @@ sub warnHipOnlyUnsupportedFunctions { "cublasLtMatmulTile_t", "cublasLtMatmulStages_t", "cublasLtMatmulSearch_t", + "cublasLtMatmulPreferenceInit", "cublasLtMatmulInnerShape_t", "cublasLtMatmulDescInit", "cublasLtHeuristicsCacheSetCapacity", @@ -11968,14 +11975,21 @@ sub warnRocOnlyUnsupportedFunctions { "cublasLtMatmulTile_t", "cublasLtMatmulStages_t", "cublasLtMatmulSearch_t", + "cublasLtMatmulPreferenceSetAttribute", + "cublasLtMatmulPreferenceInit", + "cublasLtMatmulPreferenceGetAttribute", + "cublasLtMatmulPreferenceDestroy", + "cublasLtMatmulPreferenceCreate", "cublasLtMatmulPreferenceAttributes_t", "cublasLtMatmulInnerShape_t", + "cublasLtMatmulHeuristicResult_t", "cublasLtMatmulDescSetAttribute", "cublasLtMatmulDescInit", "cublasLtMatmulDescGetAttribute", "cublasLtMatmulDescDestroy", "cublasLtMatmulDescCreate", "cublasLtMatmulDescAttributes_t", + "cublasLtMatmulAlgoGetHeuristic", "cublasLtMatmul", "cublasLtHeuristicsCacheSetCapacity", "cublasLtHeuristicsCacheGetCapacity", diff --git a/docs/tables/CUBLAS_API_supported_by_HIP.md b/docs/tables/CUBLAS_API_supported_by_HIP.md index 6e05d5e2..c3b003fe 100644 --- a/docs/tables/CUBLAS_API_supported_by_HIP.md +++ b/docs/tables/CUBLAS_API_supported_by_HIP.md @@ -398,6 +398,7 @@ |`cublasLtMatmulDescAttributes_t`|10.1| | | |`hipblasLtMatmulDescAttributes_t`|5.5.0| | | | | |`cublasLtMatmulDescOpaque_t`|11.0| | | |`hipblasLtMatmulDescOpaque_t`|5.5.0| | | | | |`cublasLtMatmulDesc_t`|10.1| | | |`hipblasLtMatmulDesc_t`|5.5.0| | | | | +|`cublasLtMatmulHeuristicResult_t`|10.1| | | |`hipblasLtMatmulHeuristicResult_t`|5.5.0| | | | | |`cublasLtMatmulInnerShape_t`|11.8| | | | | | | | | | |`cublasLtMatmulPreferenceAttributes_t`|10.1| | | |`hipblasLtMatmulPreferenceAttributes_t`|5.5.0| | | | | |`cublasLtMatmulPreferenceOpaque_t`|11.0| | | |`hipblasLtMatmulPreferenceOpaque_t`|5.5.0| | | | | @@ -1303,11 +1304,17 @@ |`cublasLtHeuristicsCacheGetCapacity`|11.8| | | | | | | | | | |`cublasLtHeuristicsCacheSetCapacity`|11.8| | | | | | | | | | |`cublasLtMatmul`|10.1| | | |`hipblasLtMatmul`|5.5.0| | | | | +|`cublasLtMatmulAlgoGetHeuristic`|10.1| | | |`hipblasLtMatmulAlgoGetHeuristic`|5.5.0| | | | | |`cublasLtMatmulDescCreate`|10.1| |11.0| |`hipblasLtMatmulDescCreate`|5.5.0| | | | | |`cublasLtMatmulDescDestroy`|10.1| | | |`hipblasLtMatmulDescDestroy`|5.5.0| | | | | |`cublasLtMatmulDescGetAttribute`|10.1| | | |`hipblasLtMatmulDescGetAttribute`|5.5.0| | | | | |`cublasLtMatmulDescInit`|11.0| | | | | | | | | | |`cublasLtMatmulDescSetAttribute`|10.1| | | |`hipblasLtMatmulDescSetAttribute`|5.5.0| | | | | +|`cublasLtMatmulPreferenceCreate`|10.1| | | |`hipblasLtMatmulPreferenceCreate`|5.5.0| | | | | +|`cublasLtMatmulPreferenceDestroy`|10.1| | | |`hipblasLtMatmulPreferenceDestroy`|5.5.0| | | | | +|`cublasLtMatmulPreferenceGetAttribute`|10.1| | | |`hipblasLtMatmulPreferenceGetAttribute`|5.5.0| | | | | +|`cublasLtMatmulPreferenceInit`|11.0| | | | | | | | | | +|`cublasLtMatmulPreferenceSetAttribute`|10.1| | | |`hipblasLtMatmulPreferenceSetAttribute`|5.5.0| | | | | |`cublasLtMatrixLayoutCreate`|10.1| | | |`hipblasLtMatrixLayoutCreate`|5.5.0| | | | | |`cublasLtMatrixLayoutDestroy`|10.1| | | |`hipblasLtMatrixLayoutDestroy`|5.5.0| | | | | |`cublasLtMatrixLayoutGetAttribute`|10.1| | | |`hipblasLtMatrixLayoutGetAttribute`|5.5.0| | | | | diff --git a/docs/tables/CUBLAS_API_supported_by_HIP_and_ROC.md b/docs/tables/CUBLAS_API_supported_by_HIP_and_ROC.md index efae376b..31a98a53 100644 --- a/docs/tables/CUBLAS_API_supported_by_HIP_and_ROC.md +++ b/docs/tables/CUBLAS_API_supported_by_HIP_and_ROC.md @@ -398,6 +398,7 @@ |`cublasLtMatmulDescAttributes_t`|10.1| | | |`hipblasLtMatmulDescAttributes_t`|5.5.0| | | | | | | | | | | |`cublasLtMatmulDescOpaque_t`|11.0| | | |`hipblasLtMatmulDescOpaque_t`|5.5.0| | | | | | | | | | | |`cublasLtMatmulDesc_t`|10.1| | | |`hipblasLtMatmulDesc_t`|5.5.0| | | | | | | | | | | +|`cublasLtMatmulHeuristicResult_t`|10.1| | | |`hipblasLtMatmulHeuristicResult_t`|5.5.0| | | | | | | | | | | |`cublasLtMatmulInnerShape_t`|11.8| | | | | | | | | | | | | | | | |`cublasLtMatmulPreferenceAttributes_t`|10.1| | | |`hipblasLtMatmulPreferenceAttributes_t`|5.5.0| | | | | | | | | | | |`cublasLtMatmulPreferenceOpaque_t`|11.0| | | |`hipblasLtMatmulPreferenceOpaque_t`|5.5.0| | | | | | | | | | | @@ -1303,11 +1304,17 @@ |`cublasLtHeuristicsCacheGetCapacity`|11.8| | | | | | | | | | | | | | | | |`cublasLtHeuristicsCacheSetCapacity`|11.8| | | | | | | | | | | | | | | | |`cublasLtMatmul`|10.1| | | |`hipblasLtMatmul`|5.5.0| | | | | | | | | | | +|`cublasLtMatmulAlgoGetHeuristic`|10.1| | | |`hipblasLtMatmulAlgoGetHeuristic`|5.5.0| | | | | | | | | | | |`cublasLtMatmulDescCreate`|10.1| |11.0| |`hipblasLtMatmulDescCreate`|5.5.0| | | | | | | | | | | |`cublasLtMatmulDescDestroy`|10.1| | | |`hipblasLtMatmulDescDestroy`|5.5.0| | | | | | | | | | | |`cublasLtMatmulDescGetAttribute`|10.1| | | |`hipblasLtMatmulDescGetAttribute`|5.5.0| | | | | | | | | | | |`cublasLtMatmulDescInit`|11.0| | | | | | | | | | | | | | | | |`cublasLtMatmulDescSetAttribute`|10.1| | | |`hipblasLtMatmulDescSetAttribute`|5.5.0| | | | | | | | | | | +|`cublasLtMatmulPreferenceCreate`|10.1| | | |`hipblasLtMatmulPreferenceCreate`|5.5.0| | | | | | | | | | | +|`cublasLtMatmulPreferenceDestroy`|10.1| | | |`hipblasLtMatmulPreferenceDestroy`|5.5.0| | | | | | | | | | | +|`cublasLtMatmulPreferenceGetAttribute`|10.1| | | |`hipblasLtMatmulPreferenceGetAttribute`|5.5.0| | | | | | | | | | | +|`cublasLtMatmulPreferenceInit`|11.0| | | | | | | | | | | | | | | | +|`cublasLtMatmulPreferenceSetAttribute`|10.1| | | |`hipblasLtMatmulPreferenceSetAttribute`|5.5.0| | | | | | | | | | | |`cublasLtMatrixLayoutCreate`|10.1| | | |`hipblasLtMatrixLayoutCreate`|5.5.0| | | | | | | | | | | |`cublasLtMatrixLayoutDestroy`|10.1| | | |`hipblasLtMatrixLayoutDestroy`|5.5.0| | | | | | | | | | | |`cublasLtMatrixLayoutGetAttribute`|10.1| | | |`hipblasLtMatrixLayoutGetAttribute`|5.5.0| | | | | | | | | | | diff --git a/docs/tables/CUBLAS_API_supported_by_ROC.md b/docs/tables/CUBLAS_API_supported_by_ROC.md index 45f5d433..d1648b30 100644 --- a/docs/tables/CUBLAS_API_supported_by_ROC.md +++ b/docs/tables/CUBLAS_API_supported_by_ROC.md @@ -398,6 +398,7 @@ |`cublasLtMatmulDescAttributes_t`|10.1| | | | | | | | | | |`cublasLtMatmulDescOpaque_t`|11.0| | | | | | | | | | |`cublasLtMatmulDesc_t`|10.1| | | | | | | | | | +|`cublasLtMatmulHeuristicResult_t`|10.1| | | | | | | | | | |`cublasLtMatmulInnerShape_t`|11.8| | | | | | | | | | |`cublasLtMatmulPreferenceAttributes_t`|10.1| | | | | | | | | | |`cublasLtMatmulPreferenceOpaque_t`|11.0| | | | | | | | | | @@ -1303,11 +1304,17 @@ |`cublasLtHeuristicsCacheGetCapacity`|11.8| | | | | | | | | | |`cublasLtHeuristicsCacheSetCapacity`|11.8| | | | | | | | | | |`cublasLtMatmul`|10.1| | | | | | | | | | +|`cublasLtMatmulAlgoGetHeuristic`|10.1| | | | | | | | | | |`cublasLtMatmulDescCreate`|10.1| |11.0| | | | | | | | |`cublasLtMatmulDescDestroy`|10.1| | | | | | | | | | |`cublasLtMatmulDescGetAttribute`|10.1| | | | | | | | | | |`cublasLtMatmulDescInit`|11.0| | | | | | | | | | |`cublasLtMatmulDescSetAttribute`|10.1| | | | | | | | | | +|`cublasLtMatmulPreferenceCreate`|10.1| | | | | | | | | | +|`cublasLtMatmulPreferenceDestroy`|10.1| | | | | | | | | | +|`cublasLtMatmulPreferenceGetAttribute`|10.1| | | | | | | | | | +|`cublasLtMatmulPreferenceInit`|11.0| | | | | | | | | | +|`cublasLtMatmulPreferenceSetAttribute`|10.1| | | | | | | | | | |`cublasLtMatrixLayoutCreate`|10.1| | | | | | | | | | |`cublasLtMatrixLayoutDestroy`|10.1| | | | | | | | | | |`cublasLtMatrixLayoutGetAttribute`|10.1| | | | | | | | | | diff --git a/src/CUDA2HIP_BLAS_API_functions.cpp b/src/CUDA2HIP_BLAS_API_functions.cpp index c225fcad..99172939 100644 --- a/src/CUDA2HIP_BLAS_API_functions.cpp +++ b/src/CUDA2HIP_BLAS_API_functions.cpp @@ -1110,6 +1110,12 @@ const std::map CUDA_BLAS_FUNCTION_MAP { {"cublasLtMatrixTransformDescDestroy", {"hipblasLtMatrixTransformDescDestroy", "", CONV_LIB_FUNC, API_BLAS, SEC::BLAS_LT, ROC_UNSUPPORTED}}, {"cublasLtMatrixTransformDescSetAttribute", {"hipblasLtMatrixTransformDescSetAttribute", "", CONV_LIB_FUNC, API_BLAS, SEC::BLAS_LT, ROC_UNSUPPORTED}}, {"cublasLtMatrixTransformDescGetAttribute", {"hipblasLtMatrixTransformDescGetAttribute", "", CONV_LIB_FUNC, API_BLAS, SEC::BLAS_LT, ROC_UNSUPPORTED}}, + {"cublasLtMatmulPreferenceInit", {"hipblasLtMatmulPreferenceInit", "", CONV_LIB_FUNC, API_BLAS, SEC::BLAS_LT, UNSUPPORTED}}, + {"cublasLtMatmulPreferenceCreate", {"hipblasLtMatmulPreferenceCreate", "", CONV_LIB_FUNC, API_BLAS, SEC::BLAS_LT, ROC_UNSUPPORTED}}, + {"cublasLtMatmulPreferenceDestroy", {"hipblasLtMatmulPreferenceDestroy", "", CONV_LIB_FUNC, API_BLAS, SEC::BLAS_LT, ROC_UNSUPPORTED}}, + {"cublasLtMatmulPreferenceSetAttribute", {"hipblasLtMatmulPreferenceSetAttribute", "", CONV_LIB_FUNC, API_BLAS, SEC::BLAS_LT, ROC_UNSUPPORTED}}, + {"cublasLtMatmulPreferenceGetAttribute", {"hipblasLtMatmulPreferenceGetAttribute", "", CONV_LIB_FUNC, API_BLAS, SEC::BLAS_LT, ROC_UNSUPPORTED}}, + {"cublasLtMatmulAlgoGetHeuristic", {"hipblasLtMatmulAlgoGetHeuristic", "", CONV_LIB_FUNC, API_BLAS, SEC::BLAS_LT, ROC_UNSUPPORTED}}, }; const std::map CUDA_BLAS_FUNCTION_VER_MAP { @@ -1587,6 +1593,12 @@ const std::map CUDA_BLAS_FUNCTION_VER_MAP { {"cublasLtMatrixTransformDescDestroy", {CUDA_101, CUDA_0, CUDA_0 }}, {"cublasLtMatrixTransformDescSetAttribute", {CUDA_101, CUDA_0, CUDA_0 }}, {"cublasLtMatrixTransformDescGetAttribute", {CUDA_101, CUDA_0, CUDA_0 }}, + {"cublasLtMatmulPreferenceInit", {CUDA_110, CUDA_0, CUDA_0 }}, // A: CUDA_VERSION 11001, CUBLAS_VERSION 11000, CUBLAS_VER_MAJOR 11 CUBLAS_VER_MINOR 0 + {"cublasLtMatmulPreferenceCreate", {CUDA_101, CUDA_0, CUDA_0 }}, + {"cublasLtMatmulPreferenceDestroy", {CUDA_101, CUDA_0, CUDA_0 }}, + {"cublasLtMatmulPreferenceSetAttribute", {CUDA_101, CUDA_0, CUDA_0 }}, + {"cublasLtMatmulPreferenceGetAttribute", {CUDA_101, CUDA_0, CUDA_0 }}, + {"cublasLtMatmulAlgoGetHeuristic", {CUDA_101, CUDA_0, CUDA_0 }}, }; const std::map HIP_BLAS_FUNCTION_VER_MAP { @@ -2005,6 +2017,11 @@ const std::map HIP_BLAS_FUNCTION_VER_MAP { {"hipblasLtMatrixTransformDescDestroy", {HIP_6000, HIP_0, HIP_0 }}, {"hipblasLtMatrixTransformDescSetAttribute", {HIP_6000, HIP_0, HIP_0 }}, {"hipblasLtMatrixTransformDescGetAttribute", {HIP_6000, HIP_0, HIP_0 }}, + {"hipblasLtMatmulPreferenceCreate", {HIP_5050, HIP_0, HIP_0 }}, + {"hipblasLtMatmulPreferenceDestroy", {HIP_5050, HIP_0, HIP_0 }}, + {"hipblasLtMatmulPreferenceSetAttribute", {HIP_5050, HIP_0, HIP_0 }}, + {"hipblasLtMatmulPreferenceGetAttribute", {HIP_5050, HIP_0, HIP_0 }}, + {"hipblasLtMatmulAlgoGetHeuristic", {HIP_5050, HIP_0, HIP_0 }}, {"rocblas_status_to_string", {HIP_3050, HIP_0, HIP_0 }}, {"rocblas_sscal", {HIP_1050, HIP_0, HIP_0 }}, diff --git a/src/CUDA2HIP_BLAS_API_types.cpp b/src/CUDA2HIP_BLAS_API_types.cpp index 041c1f1f..82546330 100644 --- a/src/CUDA2HIP_BLAS_API_types.cpp +++ b/src/CUDA2HIP_BLAS_API_types.cpp @@ -462,6 +462,7 @@ const std::map CUDA_BLAS_TYPE_NAME_MAP { {"CUBLASLT_MATMUL_PREF_MIN_ALIGNMENT_D_BYTES", {"HIPBLASLT_MATMUL_PREF_MIN_ALIGNMENT_D_BYTES", "", CONV_TYPE, API_BLAS, SEC::BLAS_LT_DATA_TYPES, UNSUPPORTED}}, {"CUBLASLT_MATMUL_PREF_MAX_WAVES_COUNT", {"HIPBLASLT_MATMUL_PREF_MAX_WAVES_COUNT", "", CONV_TYPE, API_BLAS, SEC::BLAS_LT_DATA_TYPES, UNSUPPORTED}}, {"CUBLASLT_MATMUL_PREF_IMPL_MASK", {"HIPBLASLT_MATMUL_PREF_IMPL_MASK", "", CONV_TYPE, API_BLAS, SEC::BLAS_LT_DATA_TYPES, UNSUPPORTED}}, + {"cublasLtMatmulHeuristicResult_t", {"hipblasLtMatmulHeuristicResult_t", "", CONV_TYPE, API_BLAS, SEC::BLAS_LT_DATA_TYPES, ROC_UNSUPPORTED}}, }; const std::map CUDA_BLAS_TYPE_NAME_VER_MAP { @@ -833,6 +834,7 @@ const std::map CUDA_BLAS_TYPE_NAME_VER_MAP { {"CUBLASLT_MATMUL_PREF_MIN_ALIGNMENT_D_BYTES", {CUDA_101, CUDA_0, CUDA_0 }}, {"CUBLASLT_MATMUL_PREF_MAX_WAVES_COUNT", {CUDA_101, CUDA_0, CUDA_0 }}, {"CUBLASLT_MATMUL_PREF_IMPL_MASK", {CUDA_110, CUDA_0, CUDA_0 }}, // A: CUDA_VERSION 11001, CUBLAS_VERSION 11000, CUBLAS_VER_MAJOR 11 CUBLAS_VER_MINOR 0 + {"cublasLtMatmulHeuristicResult_t", {CUDA_101, CUDA_0, CUDA_0 }}, }; const std::map HIP_BLAS_TYPE_NAME_VER_MAP { @@ -980,6 +982,7 @@ const std::map HIP_BLAS_TYPE_NAME_VER_MAP { {"hipblasLtMatmulPreferenceAttributes_t", {HIP_5050, HIP_0, HIP_0 }}, {"HIPBLASLT_MATMUL_PREF_SEARCH_MODE", {HIP_5050, HIP_0, HIP_0 }}, {"HIPBLASLT_MATMUL_PREF_MAX_WORKSPACE_BYTES", {HIP_5050, HIP_0, HIP_0 }}, + {"hipblasLtMatmulHeuristicResult_t", {HIP_5050, HIP_0, HIP_0 }}, {"rocblas_handle", {HIP_1050, HIP_0, HIP_0 }}, {"_rocblas_handle", {HIP_1050, HIP_0, HIP_0 }}, diff --git a/tests/unit_tests/synthetic/libraries/cublaslt2hipblaslt.cu b/tests/unit_tests/synthetic/libraries/cublaslt2hipblaslt.cu index 257e4a87..85a408e9 100644 --- a/tests/unit_tests/synthetic/libraries/cublaslt2hipblaslt.cu +++ b/tests/unit_tests/synthetic/libraries/cublaslt2hipblaslt.cu @@ -39,6 +39,8 @@ int main() { uint64_t rows = 0; uint64_t cols = 0; int64_t ld = 0; + int requestedAlgoCount = 0; + int returnAlgoCount = 0; #if CUDA_VERSION >= 8000 // CHECK: hipDataType dataType, dataTypeA, dataTypeB, computeType; @@ -61,6 +63,11 @@ int main() { // CHECK: hipblasLtMatrixLayout_t blasLtMatrixLayout, Adesc, Bdesc, Cdesc, Ddesc; cublasLtMatrixLayout_t blasLtMatrixLayout, Adesc, Bdesc, Cdesc, Ddesc; + // CHECK: hipblasLtMatmulHeuristicResult_t blasLtMatmulHeuristicResult; + // CHECK-NEXT: hipblasLtMatmulHeuristicResult_t *heuristicResultsArray = nullptr; + cublasLtMatmulHeuristicResult_t blasLtMatmulHeuristicResult; + cublasLtMatmulHeuristicResult_t *heuristicResultsArray = nullptr; + // CHECK: hipblasLtOrder_t blasLtOrder; // CHECK-NEXT: hipblasLtOrder_t BLASLT_ORDER_COL = HIPBLASLT_ORDER_COL; // CHECK-NEXT: hipblasLtOrder_t BLASLT_ORDER_ROW = HIPBLASLT_ORDER_ROW; @@ -186,6 +193,31 @@ int main() { // HIP: HIPBLASLT_EXPORT hipblasStatus_t hipblasLtMatrixTransformDescGetAttribute(hipblasLtMatrixTransformDesc_t transformDesc, hipblasLtMatrixTransformDescAttributes_t attr, void* buf, size_t sizeInBytes, size_t* sizeWritten); // CHECK: status = hipblasLtMatrixTransformDescGetAttribute(blasLtMatrixTransformDesc, blasLtMatrixTransformDescAttributes, buf, workspaceSizeInBytes, &sizeWritten); status = cublasLtMatrixTransformDescGetAttribute(blasLtMatrixTransformDesc, blasLtMatrixTransformDescAttributes, buf, workspaceSizeInBytes, &sizeWritten); + + // CUDA: cublasStatus_t CUBLASWINAPI cublasLtMatmulPreferenceCreate(cublasLtMatmulPreference_t* pref); + // HIP: HIPBLASLT_EXPORT hipblasStatus_t hipblasLtMatmulPreferenceCreate(hipblasLtMatmulPreference_t* pref); + // CHECK: status = hipblasLtMatmulPreferenceCreate(&blasLtMatmulPreference); + status = cublasLtMatmulPreferenceCreate(&blasLtMatmulPreference); + + // CUDA: cublasStatus_t CUBLASWINAPI cublasLtMatmulPreferenceDestroy(cublasLtMatmulPreference_t pref); + // HIP: HIPBLASLT_EXPORT hipblasStatus_t hipblasLtMatmulPreferenceDestroy(const hipblasLtMatmulPreference_t pref); + // CHECK: status = hipblasLtMatmulPreferenceDestroy(blasLtMatmulPreference); + status = cublasLtMatmulPreferenceDestroy(blasLtMatmulPreference); + + // CUDA: cublasStatus_t CUBLASWINAPI cublasLtMatmulPreferenceSetAttribute(cublasLtMatmulPreference_t pref, cublasLtMatmulPreferenceAttributes_t attr, const void* buf, size_t sizeInBytes); + // HIP: HIPBLASLT_EXPORT hipblasStatus_t hipblasLtMatmulPreferenceSetAttribute(hipblasLtMatmulPreference_t pref, hipblasLtMatmulPreferenceAttributes_t attr, const void* buf, size_t sizeInBytes); + // CHECK: status = hipblasLtMatmulPreferenceSetAttribute(blasLtMatmulPreference, blasLtMatmulPreferenceAttributes, buf, workspaceSizeInBytes); + status = cublasLtMatmulPreferenceSetAttribute(blasLtMatmulPreference, blasLtMatmulPreferenceAttributes, buf, workspaceSizeInBytes); + + // CUDA: cublasStatus_t CUBLASWINAPI cublasLtMatmulPreferenceGetAttribute(cublasLtMatmulPreference_t pref, cublasLtMatmulPreferenceAttributes_t attr, void* buf, size_t sizeInBytes, size_t* sizeWritten); + // HIP: HIPBLASLT_EXPORT hipblasStatus_t hipblasLtMatmulPreferenceGetAttribute(hipblasLtMatmulPreference_t pref, hipblasLtMatmulPreferenceAttributes_t attr, void* buf, size_t sizeInBytes, size_t* sizeWritten); + // CHECK: status = hipblasLtMatmulPreferenceGetAttribute(blasLtMatmulPreference, blasLtMatmulPreferenceAttributes, buf, workspaceSizeInBytes, &sizeWritten); + status = cublasLtMatmulPreferenceGetAttribute(blasLtMatmulPreference, blasLtMatmulPreferenceAttributes, buf, workspaceSizeInBytes, &sizeWritten); + + // CUDA: cublasStatus_t CUBLASWINAPI cublasLtMatmulAlgoGetHeuristic(cublasLtHandle_t lightHandle, cublasLtMatmulDesc_t operationDesc, cublasLtMatrixLayout_t Adesc, cublasLtMatrixLayout_t Bdesc, cublasLtMatrixLayout_t Cdesc, cublasLtMatrixLayout_t Ddesc, cublasLtMatmulPreference_t preference, int requestedAlgoCount, cublasLtMatmulHeuristicResult_t heuristicResultsArray[], int* returnAlgoCount); + // HIP: HIPBLASLT_EXPORT hipblasStatus_t hipblasLtMatmulAlgoGetHeuristic(hipblasLtHandle_t handle, hipblasLtMatmulDesc_t matmulDesc, hipblasLtMatrixLayout_t Adesc, hipblasLtMatrixLayout_t Bdesc, hipblasLtMatrixLayout_t Cdesc, hipblasLtMatrixLayout_t Ddesc, hipblasLtMatmulPreference_t pref, int requestedAlgoCount, hipblasLtMatmulHeuristicResult_t heuristicResultsArray[], int* returnAlgoCount); + // CHECK: status = hipblasLtMatmulAlgoGetHeuristic(blasLtHandle, blasLtMatmulDesc, Adesc, Bdesc, Cdesc, Ddesc, blasLtMatmulPreference, requestedAlgoCount, heuristicResultsArray, &returnAlgoCount); + status = cublasLtMatmulAlgoGetHeuristic(blasLtHandle, blasLtMatmulDesc, Adesc, Bdesc, Cdesc, Ddesc, blasLtMatmulPreference, requestedAlgoCount, heuristicResultsArray, &returnAlgoCount); #endif #if CUBLAS_VERSION >= 10200