diff --git a/projects/hipblaslt/clients/include/testing_matmul.hpp b/projects/hipblaslt/clients/include/testing_matmul.hpp index 83a80457ae55..39c110a60b97 100644 --- a/projects/hipblaslt/clients/include/testing_matmul.hpp +++ b/projects/hipblaslt/clients/include/testing_matmul.hpp @@ -2760,7 +2760,7 @@ void testing_matmul_with_bias(const Arguments& arg, int addRequest = 0; for(size_t t = 0; t < 1; t++) // C API not supported yet { - size_t tmpWorkspaceSize = 0; + size_t tmpWorkspaceSize = 0; tmpAlgo[j].algo.max_workspace_bytes = max_workspace_size; if(hipblaslt_ext::matmulIsAlgoSupported(handle, matmul[0][0], @@ -2914,6 +2914,13 @@ void testing_matmul_with_bias(const Arguments& arg, heuristicTuningIndex.clear(); for(int j = 0; j < tmpAlgo.size(); j++) { + if(tuningVec.size() == 1 && tuningVec[0] == hipblaslt_ext::GemmTuning()) + { + heuristicResult.push_back(tmpAlgo[j]); + heuristicTuningIndex.push_back(0); + workspace_size = std::max(workspace_size, tmpAlgo[j].workspaceSize); + continue; + } for(size_t t = 0; t < tuningVec.size(); t++) { size_t tmpWorkspaceSize = 0; @@ -3009,6 +3016,12 @@ void testing_matmul_with_bias(const Arguments& arg, heuristicTuningIndex.clear(); for(int j = 0; j < tmpAlgo.size(); j++) { + if(tuningVec.size() == 1 && tuningVec[0] == hipblaslt_ext::GemmTuning()) + { + heuristicResult.push_back(tmpAlgo[j]); + heuristicTuningIndex.push_back(0); + continue; + } for(size_t t = 0; t < tuningVec.size(); t++) { size_t tmpWorkspaceSize = 0; diff --git a/projects/hipblaslt/library/include/hipblaslt/hipblaslt-ext.hpp b/projects/hipblaslt/library/include/hipblaslt/hipblaslt-ext.hpp index 303ba25e65dd..981d15c51f35 100644 --- a/projects/hipblaslt/library/include/hipblaslt/hipblaslt-ext.hpp +++ b/projects/hipblaslt/library/include/hipblaslt/hipblaslt-ext.hpp @@ -91,8 +91,9 @@ namespace hipblaslt_ext std::unique_ptr pimpl; }; - [[deprecated("GemmPreferenceV2 is deprecated, use GemmPreference instead.")]] - typedef GemmPreference GemmPreferenceV2; + [[deprecated( + "GemmPreferenceV2 is deprecated, use GemmPreference instead.")]] typedef GemmPreference + GemmPreferenceV2; /*! \ingroup types_module * \brief hipblasLt extension ProblemType for gemm problems. @@ -144,8 +145,9 @@ namespace hipblaslt_ext HIPBLASLT_EXPORT hipblasComputeType_t getTypeCompute() const; //!< The compute datatype. }; - [[deprecated("GemmProblemTypeV2 is deprecated, use GemmProblemType instead.")]] - typedef GemmProblemType GemmProblemTypeV2; + [[deprecated( + "GemmProblemTypeV2 is deprecated, use GemmProblemType instead.")]] typedef GemmProblemType + GemmProblemTypeV2; /*! \ingroup types_module * \brief hipblasLt extension Epilogue for gemm problems. @@ -204,8 +206,8 @@ namespace hipblaslt_ext std::unique_ptr pimpl; }; - [[deprecated("GemmEpilogueV2 is deprecated, use GemmEpilogue instead.")]] - typedef GemmEpilogue GemmEpilogueV2; + [[deprecated("GemmEpilogueV2 is deprecated, use GemmEpilogue instead.")]] typedef GemmEpilogue + GemmEpilogueV2; struct GemmTuning { @@ -215,6 +217,8 @@ namespace hipblaslt_ext HIPBLASLT_EXPORT GemmTuning(const GemmTuning& tuning); HIPBLASLT_EXPORT GemmTuning& operator=(const GemmTuning& tuning); + HIPBLASLT_EXPORT bool + operator==(const GemmTuning& other) const; //!< Compare two tuning objects for equality. HIPBLASLT_EXPORT GemmTuning(GemmTuning&& tuning); HIPBLASLT_EXPORT GemmTuning& operator=(GemmTuning&& tuning); @@ -234,8 +238,8 @@ namespace hipblaslt_ext std::unique_ptr pimpl; }; - [[deprecated("GemmTuningV2 is deprecated, use GemmTuning instead.")]] - typedef GemmTuning GemmTuningV2; + [[deprecated( + "GemmTuningV2 is deprecated, use GemmTuning instead.")]] typedef GemmTuning GemmTuningV2; /*! \ingroup types_module * \brief hipblasLt extension Inputs for gemm problems. @@ -296,8 +300,8 @@ namespace hipblaslt_ext std::unique_ptr pimpl; }; - [[deprecated("GemmInputsV2 is deprecated, use GemmInputs instead.")]] - typedef GemmInputs GemmInputsV2; + [[deprecated( + "GemmInputsV2 is deprecated, use GemmInputs instead.")]] typedef GemmInputs GemmInputsV2; /*! \ingroup types_module * \brief hipblasLt extension GPU inputs for gemm problems. diff --git a/projects/hipblaslt/library/src/amd_detail/hipblaslt-ext.cpp b/projects/hipblaslt/library/src/amd_detail/hipblaslt-ext.cpp index c1f6b96eca01..463aae9db562 100644 --- a/projects/hipblaslt/library/src/amd_detail/hipblaslt-ext.cpp +++ b/projects/hipblaslt/library/src/amd_detail/hipblaslt-ext.cpp @@ -382,6 +382,10 @@ namespace hipblaslt_ext *pimpl = *tuning.pimpl; return *this; } + bool GemmTuning::operator==(const GemmTuning& other) const + { + return pimpl->splitK == other.pimpl->splitK && pimpl->wgm == other.pimpl->wgm; + } GemmTuning::GemmTuning(GemmTuning&& tuning) = default; GemmTuning& GemmTuning::operator=(GemmTuning&& tuning) = default;