This is an archive of the discontinued LLVM Phabricator instance.

[clang-offload-bundler][docs][NFC] Add archive unbundling documentation
ClosedPublic

Authored by saiislam on Sep 20 2021, 10:30 AM.

Details

Summary

Add documentation of unbundling of heterogeneous device archives to
create device specific archives, as introduced by D93525. Also, add
documentation for supported text file formats.

Diff Detail

Event Timeline

saiislam requested review of this revision.Sep 20 2021, 10:30 AM
saiislam created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptSep 20 2021, 10:30 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
yaxunl added inline comments.Sep 20 2021, 12:03 PM
clang/docs/ClangOffloadBundler.rst
296

This does not match our final view of compatibility. Is this intentional? Thanks.

saiislam marked an inline comment as done.Sep 20 2021, 12:20 PM
saiislam added inline comments.
clang/docs/ClangOffloadBundler.rst
296

Yes, I have intentionally removed the TargetID related compatibility testing. Plan is to introduce it with an upcoming patch for supporting TargetID in OpenMP. So, all changes in the clang driver and offload-bundler for TargetID will be introduced in one go. D106870 is supposed to put most of the necessary infrastructure in place so that TargetID support can be cleanly added.

yaxunl accepted this revision.Sep 20 2021, 12:31 PM

LGTM. Thanks.

This revision is now accepted and ready to land.Sep 20 2021, 12:31 PM
This revision was landed with ongoing or failed builds.Sep 21 2021, 6:55 AM
This revision was automatically updated to reflect the committed changes.
saiislam marked an inline comment as done.

Do you mind if I fix the build failures by encasing the codelike section in a .. code::?

diff --git a/clang/docs/ClangOffloadBundler.rst b/clang/docs/ClangOffloadBundler.rst
index 312c45602c99..ac4c5b51904f 100644
--- a/clang/docs/ClangOffloadBundler.rst
+++ b/clang/docs/ClangOffloadBundler.rst
@@ -273,6 +273,8 @@ file will contain device binaries for a host and one or more targets. The
 output device specific archive is in a format compatible with GNU ar utility
 and contains a collection of device binaries for a specific target.

+.. code::
+
   Heterogeneous Device Archive, HDA = {F1.X, F2.X, ..., FN.Y}
   where, Fi = Bundle{Host-DeviceBinary, T1-DeviceBinary, T2-DeviceBinary, ...,
                      Tm-DeviceBinary},

Do you mind if I fix the build failures by encasing the codelike section in a .. code::?

diff --git a/clang/docs/ClangOffloadBundler.rst b/clang/docs/ClangOffloadBundler.rst
index 312c45602c99..ac4c5b51904f 100644
--- a/clang/docs/ClangOffloadBundler.rst
+++ b/clang/docs/ClangOffloadBundler.rst
@@ -273,6 +273,8 @@ file will contain device binaries for a host and one or more targets. The
 output device specific archive is in a format compatible with GNU ar utility
 and contains a collection of device binaries for a specific target.

+.. code::
+
   Heterogeneous Device Archive, HDA = {F1.X, F2.X, ..., FN.Y}
   where, Fi = Bundle{Host-DeviceBinary, T1-DeviceBinary, T2-DeviceBinary, ...,
                      Tm-DeviceBinary},

Thanks for noticing this. Please go ahead with your changes.