MISA icon indicating copy to clipboard operation
MISA copied to clipboard

frequently merge new asm file to miopen

Open shaojiewang opened this issue 3 years ago • 3 comments

As we continue optimizing the performance and stability for igemmGen and this tool can generate more efficient kernels for igemm or direct conv, we may think about how to merge new asm files to miopen frequently. I think we can have a discussion here. I could make some proposals here:

  • [ ] we can make an automatic method to merge the newest version of asm files generated by igemmGen. Here might be an example: #116
  • [ ] we can make some milestones to optimize the asm files, and monthly merge the effort to MIOpen.

shaojiewang avatar Sep 18 '21 07:09 shaojiewang

There is no obvious conflict between the two approaches, IMHO.

We could mimic the MIOpen staging approach:

  1. Establish a branch within MIOpen repo, e.g. iGEMM-develop;
  2. Automatically merge most recent ASM kernels generated by this tool to the above branch;
  3. TUNA should keep track of the branch's performance data in its database, and when the "staging" performance is good, merge it to MIOpen develop branch.

Well, we really need the performance tuning and monitoring automation tool (TUNA) to be deployed. i.e. our performance CI 😀 CC: @JehandadKhan @atamazov

junliume avatar Sep 18 '21 07:09 junliume

For updating the kernel structure list, a possible approach could be:

static const std::vector<PerformanceConfigAsmImplicitGemmGTCBwdXdlopsNHWC> kernel_param_list {
#include <conv_asm_implicit_gemm_gtc_bwd_nhwc_param.h>
};

Then only need to update the structure inside the header file conv_asm_implicit_gemm_gtc_bwd_nhwc_param.h

This way can avoid using regex, in case the regex may have some side effect if we change this cpp file in the future

carlushuang avatar Sep 22 '21 03:09 carlushuang

@carlushuang I am not against "non-standard" usage of the preprocessor. However this requires careful and clean design. Please explicitly ask me to review relevant PRs.

atamazov avatar Sep 22 '21 21:09 atamazov