[PATCH] D158150: [WIP] Add dynamic LDS size implicit argument to v5

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 17 03:36:14 PDT 2023


arsenm added a comment.

Why do we need this? I thought this was already available in the dispatch packet, you just need to subtract the statically known size



================
Comment at: llvm/docs/AMDGPUUsage.rst:3964
+                                                     "hidden_dynamic_lds_size"
+                                                       Size of the Dynamically allocated LDS memory is passes in the kernarg.
+
----------------
S/passes/passed


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp:1106
+  // emit argument for hidden dynamic lds size
+  emitKernelArg(DL, Int64Ty, Align(8), "hidden_dynamic_lds_size", Offset, Args);
 }
----------------
This just just be an i32


================
Comment at: llvm/test/CodeGen/AMDGPU/hsa-metadata-hidden-args-v5.ll:95
+; CHECK-NEXT:        .size:           8
+; CHECK-NEXT:        .value_kind:     hidden_dynamic_lds_size
 
----------------
This should have optimized out 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158150/new/

https://reviews.llvm.org/D158150



More information about the llvm-commits mailing list