[PATCH] D30970: [AMDGPU] Do not emit isa info as code object metadata

Konstantin Zhuravlyov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 15 09:53:55 PDT 2017


kzhuravl added a comment.

> 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.


https://reviews.llvm.org/D30970





More information about the llvm-commits mailing list