[llvm] [OFFLOAD] Restore interop functionality (PR #161429)

Alex Duran via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 1 14:28:46 PDT 2025


================
@@ -2712,6 +2712,37 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
     return Plugin::success();
   }
 
+  interop_spec_t selectInteropPreference(int32_t InteropType,
+                                         int32_t NumPrefers,
+                                         interop_spec_t *Prefers) override {
+    // TODO: update once targetsync is supported
+    if (InteropType != kmp_interop_type_target)
+      return interop_spec_t{tgt_fr_hip, {false, 0}, 0};
+    return interop_spec_t{tgt_fr_none, {false, 0}, 0};
+  }
+
+  Expected<omp_interop_val_t *>
+  createInterop(int32_t InteropType, interop_spec_t &InteropSpec) override {
+    auto *Ret = new omp_interop_val_t(
+        DeviceId, static_cast<kmp_interop_type_t>(InteropType));
+    Ret->fr_id = tgt_fr_hip;
----------------
adurang wrote:

Again, as this didn't exist I made my best guess here.  Let me update it.



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


More information about the llvm-commits mailing list