ROCm-CompilerSupport icon indicating copy to clipboard operation
ROCm-CompilerSupport copied to clipboard

Relocatable metadata layout documentation

Open stuartarchibald opened this issue 7 years ago • 2 comments

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.

stuartarchibald avatar Nov 28 '18 12:11 stuartarchibald

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.

scott-linder avatar Nov 28 '18 16:11 scott-linder

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

stuartarchibald avatar Nov 29 '18 17:11 stuartarchibald

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

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

lamb-j avatar Apr 04 '23 01:04 lamb-j