ROCm / ROCm-CompilerSupport

The compiler support repository provides various Lightning Compiler related services.
47 stars 31 forks source link

Relocatable metadata layout documentation #8

Closed stuartarchibald closed 1 year ago

stuartarchibald commented 5 years ago

I can't seem to find anything in the header file/docs about the layout of the metadata that can be queried on a relocatable object. From the test code there's bits to be gleaned, like root must be a map https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/blob/master/lib/comgr/test/metadata_yaml_test.c#L75, and version should be list https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/blob/master/lib/comgr/test/metadata_yaml_test.c#L90, however, it'd be really useful if a description of the layout (or at least a common layout) could be provided. Thanks.

scott-linder commented 5 years ago

The layouts are specified at https://llvm.org/docs/AMDGPUUsage.html#code-object-metadata Comgr doesn't provide any abstraction over the multiple formats; the consumer has to implement each in order to support both V2 and V3 code object formats. I can update the documentation in the header with a link.

stuartarchibald commented 5 years ago

Ok, thanks. Given the format is fairly static some interface to walk in may be useful?

lamb-j commented 1 year ago

I just added a link to the metadata documentation in the amd_comgr.h header file:

https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/commit/593f75befc7479010491bad6130de712a3aff923