[llvm] [Offload] Add MPI Proxy Plugin (PR #114574)

via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 28 01:02:52 PDT 2025


================
@@ -196,6 +198,8 @@ def remove_suffix_if_present(name):
         return name[:-4]
     elif name.endswith('-JIT-LTO'):
         return name[:-8]
+    elif name.endswith('-mpi'):
----------------
jprotze wrote:

``` Python
def remove_suffix_if_present(name):
    if name.endswith('-LTO'):
        return name[:-4]
    elif name.endswith('-JIT-LTO'):
        return name[:-8]
    elif name.endswith('-mpi'):
        return name[:-4]
    else:
        return name
# Add platform targets
host_targets = [
    "aarch64-unknown-linux-gnu",
    "x86_64-unknown-linux-gnu",
    "s390x-ibm-linux-gnu",
]
if config.libomptarget_current_target.startswith('nvptx'):
    config.available_features.add('gpu')
    config.available_features.add('nvidiagpu')
if config.libomptarget_current_target.startswith('amdgcn'):
    config.available_features.add('gpu')
    config.available_features.add('amdgpu')
if remove_suffix_if_present(config.libomptarget_current_target) in host_targets:
    config.available_features.add('host')
if config.libomptarget_current_target.endswith('mpi'):
    config.available_features.add('mpi')
```

I think that testing host+mpi needs the `host` feature. I think that `-JIT-LTO` was already missed to be added, so I suggest to just drop the suffix before comparing to the host architecture lists.

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


More information about the llvm-commits mailing list