This is an archive of the discontinued LLVM Phabricator instance.

[HIP] Unbundler allows missing host entry
ClosedPublic

Authored by yaxunl on Jan 19 2023, 7:45 AM.

Details

Summary

clang-offload-bundler should allow missing host entry when unbundling with option
--allow-missing-bundles specified.

This is for the use cases where users want to link device-only bundles with
bundles containing both device and host entries.

Diff Detail

Event Timeline

yaxunl created this revision.Jan 19 2023, 7:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 19 2023, 7:45 AM
yaxunl requested review of this revision.Jan 19 2023, 7:45 AM
tra accepted this revision.Jan 19 2023, 2:45 PM
tra added inline comments.
clang/lib/Driver/OffloadBundler.cpp
1063

Nit: My usual pet peeve - too many negations.

if (!(FoundHostBundle || BundlerConfig.HostInputIndex == ~0u || BundlerConfig.AllowMissingBundles))) is easier to understand, IMO.

This revision is now accepted and ready to land.Jan 19 2023, 2:45 PM
yaxunl marked an inline comment as done.Jan 19 2023, 3:36 PM
yaxunl added inline comments.
clang/lib/Driver/OffloadBundler.cpp
1063

will fix when committing

This revision was landed with ongoing or failed builds.Jan 19 2023, 7:14 PM
This revision was automatically updated to reflect the committed changes.
yaxunl marked an inline comment as done.
Herald added a project: Restricted Project. · View Herald TranscriptJan 19 2023, 7:14 PM