MIOpen icon indicating copy to clipboard operation
MIOpen copied to clipboard

Do we need many members in PerformanceConfigAsmImplicitGemmGTC?

Open atamazov opened this issue 3 years ago • 3 comments

Originated from https://github.com/ROCmSoftwarePlatform/MIOpen/pull/1230#discussion_r737878197 (see the whole thread). Synopsis:

As far as I see, for PerformanceConfigAsmImplicitGemmGTCFwdXdlopsNHWC we only need to store table index and gemm_k_global_split. The rest of data can be read from the table right in GetSolution(). Please look into SetNextValue() and you'll see that only index and gemm_k_global_split are modified.

atamazov avatar Nov 08 '21 19:11 atamazov

Let's discuss.

atamazov avatar Nov 08 '21 20:11 atamazov

Or you can use type other than PerformanceConfigAsmImplicitGemmGTCFwdXdlopsNHWC for the vector returned by GetFwdXdlopsNHWCConfigList. For example you can use aggregate like this (pseudo code):

struct GeneratedData
{
   Datatype datatype;
   Layout layout;
   Direction direction;
   PerformanceConfigAsmImplicitGemmGTCFwdXdlopsNHWC perfConfig;
}
...
static const inline std::vector<GeneratedData>&
GetFwdXdlopsNHWCConfigList()
{
    static const  std::vector<GeneratedData> kernel_param_list {
        {"fwd", "nhwc", miopenFloat,  { ... } }, // a pair of curly braces inserted
        ...
}

I agree with that. I can make a PR by this way.

shaojiewang avatar Nov 09 '21 07:11 shaojiewang

@carlushuang @shaojiewang Is this fixed with latest ROCm 6.0.2 (HIP 6.0.32831)? If resolved, please close ticket. Thanks!

ppanchad-amd avatar Apr 15 '24 18:04 ppanchad-amd