message: Fix potential insufficient lds dynamic allocation
diff: @@ -167,6 +167,10 @@ bool PlanPowX(ExecPlan& execPlan)
  {
  DevFnCall ptr = nullptr;
  GridParam gp;
  +
  + // NB:
  + // bwd stands for blockwidth, which is equivalent to kernel.batches_per_block in new code-gen.
  + // We should replace it with kernel.batches_per_block all after transition to new code-gen.
  size_t bwd = 1;
  size_t wgs = 0;
  size_t lds = 0;
  @@ -193,6 +197,7 @@ bool PlanPowX(ExecPlan& execPlan)
  gp.tpb_x = kernel.threads_per_block;
  lds = (execPlan.execSeq[i]->length[0] + lds_padding) * kernel.batches_per_block;
  + bwd = kernel.batches_per_block;
  }
  else
  {
  @@ -202,6 +207,7 @@ bool PlanPowX(ExecPlan& execPlan)
  gp.b_x = (batch % numTransforms) ? 1 + (batch / numTransforms)
  : (batch / numTransforms);
  gp.tpb_x = workGroupSize;
  + bwd = numTransforms;
  }
  }
  break;
  @@ -220,6 +226,7 @@ bool PlanPowX(ExecPlan& execPlan)
  gp.tpb_x = kernel.threads_per_block;
  lds = execPlan.execSeq[i]->length[0] * kernel.batches_per_block;
  + bwd = kernel.batches_per_block;
  }
  break;
  case CS_KERNEL_STOCKHAM_BLOCK_RC:
  