It was decided to expose this information through other means (rocr)
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
LGTM.
Do we have a general guideline what should be in metadata and what should not? Do we assume that end user should be able to manually craft the metadata when they write the ISA assembly by hand?
I'm not sure why we need to encode some of these static hardware properties into it. Why doesn't the runtime/debugger know these already?
The plan is not to encode any hardware static properties in the code object, the tools will get these from the ROCM Runtime queries.
The general guideline is that properties required to load the code object into the hardware by the ROCM Runtime and execute it by the CP micro code hardware are in the kernel code descriptor in the .rodata section. Debug information is in the standard DWARF sections. All other properties that are specific to the kernels is in the code object metadata, which includes information needed by high level language runtimes (above ROCM Runtime), tools and any other consumers of the code object. Hardware static information is available from ROCM Runtime queries (which is implemented from header files shared with the compiler so there is a single definition).
Do we have a general guideline what should be in metadata and what should not? Do we assume that end user should be able to manually craft the metadata when they write the ISA assembly by hand?
Our end goal is to make it as flexible as possible (i.e. support unknown keys). Currently we only support a specific set of keys which are defined in the header. I will post docs and format in a separate patch a bit later.
There are assembler tests that show that metadata can be assembled. But overall, crafting the metadata depends on the purpose of the ISA assembly. The consensus we came to is that low level runtimes (e.g. rocr) should not rely on metadata. Rocr does not, so the metadata is not required when targeting code directly for rocr. If the code is being targeted for a high level runtime, or other tools, then some metadata might be required. Each high level runtime, or tool should provide a set of required fields with their documentation, so the user that is crafting ISA can include those fields when writing ISA ass.
I'm not sure why we need to encode some of these static hardware properties into it. Why doesn't the runtime/debugger know these already?
It was agreed that this info should be obtained through the runtime, hence removing it here.