[llvm] [OFFLOAD] Add interface to extend image validation (PR #185663)

Kevin Sala Penades via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 10 08:45:42 PDT 2026


================
@@ -1367,6 +1364,24 @@ struct GenericPluginTy {
   virtual Expected<bool> isELFCompatible(uint32_t DeviceID,
                                          StringRef Image) const = 0;
 
+  /// Indicate if an image is compatible with the plugin. This is called if
+  /// the image is not recognized as compatible by the common layer. This gives
+  /// the plugin a chance to inspect the image and decide if it is compatible.
+  virtual Expected<bool> isImageCompatible(StringRef Image) const {
+    return false;
+  }
+
+  /// Indicate if an imaget is compatible with the plugin devices. This is
----------------
kevinsala wrote:

```suggestion
  /// Indicate if an image is compatible with the plugin devices. This is
```

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


More information about the llvm-commits mailing list