MIOpen icon indicating copy to clipboard operation
MIOpen copied to clipboard

Precompiled kernels should contain compiled defaults

Open daniellowell opened this issue 5 years ago • 10 comments

Need to assess whether this is feasible.

Two types of defaults exist:

  1. Some solver have hard-coded defaults -- one kernel for everything.
  2. Others are configured at runtime using inputs (not true defaults)

Type 1 seems more feasible, type 2 might be impossible unless there is a limited set.

daniellowell avatar Aug 11 '20 16:08 daniellowell

@daniellowell, who is in charge of this defect?

aserio avatar Aug 17 '20 16:08 aserio

@aserio All of us. This is not a defect, this is RFC.

atamazov avatar Aug 18 '20 20:08 atamazov

@daniellowell I do not understand the issue. Some solvers use kernels that depend on the problem. Some other use kernels that irrelevant to the problem. Nevertheless all these kernels reside in the binary cache. Each kernel is stored only once. What potential issue do you have in mind?

atamazov avatar Aug 18 '20 20:08 atamazov

Defaults do not reside in the precompiled kernel package right now. The goal is to reuse kernels instead of compiling them for each layer. If there is tuned entry then it uses the default so, why bother compiling it repeatedly? The only ones that are a problem are the solvers that configure defaults based on inputs. Nothing to be done about those.

daniellowell avatar Aug 18 '20 21:08 daniellowell

@daniellowell Hmm... Please confirm that I am understanding you correctly:

  • (1) "default" is a kernel that was compiled with the default PerformanceConfig
  • (2) You would like to add such kernels to the precompiled kernel package
  • (3) This ticket is related to the tunable Solvers only.

atamazov avatar Aug 20 '20 22:08 atamazov

@daniellowell

Those solvers that ARE compiled sources, but also have only one default (not configured), their defaults should be compiled and placed into the precompiled package. Originated from https://github.com/ROCmSoftwarePlatform/MIOpen/issues/392#issuecomment-678347913

This would work for the fully "dynamic" kernels only.

Other kernels have the ProblemConfig partially compiled in. So the "default" kernel would match only a subset of the unknown configs (or none in the worst case).

Does it worth the extra efforts, what do you think?

atamazov avatar Aug 21 '20 22:08 atamazov

@daniellowell what is the status of this request?

aserio avatar Sep 08 '20 18:09 aserio

@aserio This feature would be enabled by integrating fin into Tuna.

JehandadKhan avatar Sep 10 '20 15:09 JehandadKhan

BTW I still do not fully understand what we want. This is suspicious. Can someone please explain?

atamazov avatar Sep 10 '20 23:09 atamazov

Have decided to uses assembly kernels as fall back. This reduces the priority to low.

aserio avatar Oct 06 '20 16:10 aserio

Closing since MIOpen is being migrated to ROCm/rocm-libraries. Please re-open there if you believe this is still an issue.

JonathanLichtnerAMD avatar Jul 28 '25 22:07 JonathanLichtnerAMD