Precompiled kernels should contain compiled defaults
Need to assess whether this is feasible.
Two types of defaults exist:
- Some solver have hard-coded defaults -- one kernel for everything.
- 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, who is in charge of this defect?
@aserio All of us. This is not a defect, this is RFC.
@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?
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 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.
@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?
@daniellowell what is the status of this request?
@aserio This feature would be enabled by integrating fin into Tuna.
BTW I still do not fully understand what we want. This is suspicious. Can someone please explain?
Have decided to uses assembly kernels as fall back. This reduces the priority to low.
Closing since MIOpen is being migrated to ROCm/rocm-libraries. Please re-open there if you believe this is still an issue.