[llvm] [mlir] [MLGO] Do not hardcode 33 eviction feature columns (PR #224598)

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 29 17:06:33 PDT 2026


================
@@ -122,8 +126,21 @@ class ReleaseModeModelRunner final : public MLModelRunner {
         CompiledModel->LookupArgIndex((Prefix + Spec.name()).str());
     void *Buffer = nullptr;
     InputIsPresent = Index >= 0;
-    if (InputIsPresent)
-      Buffer = CompiledModel->arg_data(Index);
+    if (InputIsPresent) {
+      const int ModelSize = CompiledModel->arg_size(Index);
----------------
mtrofin wrote:

@ioghiban @beamandala ptal - we should add to the EmitC a way to get the buffer size as part of the reflection map, to perform this type of validation.


https://github.com/llvm/llvm-project/pull/224598


More information about the llvm-commits mailing list