message: Rewrite kernel candidates on flat cache hit
diff: @@ -264,7 +264,8 @@ static void ContractionWrap(KernelList& r, const Contraction* c, FlatContraction
  if (it != flat_cache->end()) {
  IVLOG(2, "Cache key: " << flat_key << ", Hit!");
  r.kernels.emplace_back(it->second);
  - auto& ki = r.kernels.back();
  +
  + auto update_kernel_info = [&](KernelInfo& ki) {
  ki.outputs = flat.kernel_outputs;
  ki.inputs.clear();
  for (const auto& input : inputs) {
  @@ -275,6 +276,14 @@ static void ContractionWrap(KernelList& r, const Contraction* c, FlatContraction
  for (const auto& op_input : flat.post_op_inputs) {
  ki.inputs.emplace_back(var_rewrites.Lookup(op_input.name));
  }
  + };
  +
  + auto& ki = r.kernels.back();
  + update_kernel_info(ki);
  + for (KernelInfo& candidate : ki.candidates) {
  + update_kernel_info(candidate);
  + }
  +
  return;
  }
  IVLOG(2, "Cache key: " << flat_key << ", Miss!");
  