Page MenuHomePhabricator

[Libomptarget] Remove dependency on the DeviceRTL from the GPU plugins
ClosedPublic

Authored by jhuber6 on Feb 2 2023, 9:00 AM.

Details

Summary

The GPU plugins have a dependency on the device libraries. Sometimes we
cannot build the device libraries because the user does not have a valid
clang to use or it was explicitly disabled. Currently this leads to a
transitive failure because we cannot meet this dependency. This patch
simply removes that dependency.

Fixes https://github.com/llvm/llvm-project/issues/60457

Diff Detail

Event Timeline

jhuber6 created this revision.Feb 2 2023, 9:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 2 2023, 9:00 AM
jhuber6 requested review of this revision.Feb 2 2023, 9:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 2 2023, 9:00 AM

Thanks for this!

I don't understand why a host library depends on a device library?

I don't understand why a host library depends on a device library?

Well, I guess it's possible to use OpenMP without the device runtime. We could potentially just keep them completely separate. My guess is that whoever wrote the code first didn't know how to make the dependency build so they put it on the plugins.

The build of plugins don't need device runtime right? We set dependences in CMake for build and test running only.

jhuber6 updated this revision to Diff 494643.Feb 3 2023, 7:58 AM

Updating to just remove the dependency. I think it should be fine to build these anyway. Not sure why we need to depend on the DeviceRTL.

jhuber6 retitled this revision from [Libomptarget] Do not build the GPU plugins if we have no device library to [Libomptarget] Remove dependency on the DeviceRTL from the GPU plugins.Feb 3 2023, 7:58 AM
jhuber6 edited the summary of this revision. (Show Details)

Just to confirm: I applied this patch to rc1 (& rc2) and then things build fine again. Thanks!

This revision is now accepted and ready to land.Feb 12 2023, 7:08 AM