diff options
| author | Joseph Huber <huberjn@outlook.com> | 2025-09-23 08:31:35 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-23 08:31:35 -0500 |
| commit | 204580aa8e157ea6b96b94d19513b17c53532ff0 (patch) | |
| tree | b209f7393ade355a1b3266cbf3ea84cc623bd194 /offload | |
| parent | 612a105c46a77dc4c1c04d1e5cdd85d1b77decec (diff) | |
[Offload] Don't add the unsupported host plugin to the list (#159642)
Summary:
The host plugin is basically OpenMP specific and doesn't work very well.
Previously we were skipping over it in the list instead of just not
adding it at all.
Diffstat (limited to 'offload')
| -rw-r--r-- | offload/liboffload/src/OffloadImpl.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/offload/liboffload/src/OffloadImpl.cpp b/offload/liboffload/src/OffloadImpl.cpp index 7e4a309966c9..5457fc50b971 100644 --- a/offload/liboffload/src/OffloadImpl.cpp +++ b/offload/liboffload/src/OffloadImpl.cpp @@ -250,17 +250,15 @@ Error initPlugins(OffloadContext &Context) { // Attempt to create an instance of each supported plugin. #define PLUGIN_TARGET(Name) \ do { \ - Context.Platforms.emplace_back(ol_platform_impl_t{ \ - std::unique_ptr<GenericPluginTy>(createPlugin_##Name()), \ - pluginNameToBackend(#Name)}); \ + if (StringRef(#Name) != "host") \ + Context.Platforms.emplace_back(ol_platform_impl_t{ \ + std::unique_ptr<GenericPluginTy>(createPlugin_##Name()), \ + pluginNameToBackend(#Name)}); \ } while (false); #include "Shared/Targets.def" // Preemptively initialize all devices in the plugin for (auto &Platform : Context.Platforms) { - // Do not use the host plugin - it isn't supported. - if (Platform.BackendType == OL_PLATFORM_BACKEND_UNKNOWN) - continue; auto Err = Platform.Plugin->init(); [[maybe_unused]] std::string InfoMsg = toString(std::move(Err)); for (auto DevNum = 0; DevNum < Platform.Plugin->number_of_devices(); |
