-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[AMDGPU] Introduce Code Object V6 #76954
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,8 +44,15 @@ constexpr uint32_t VersionMajorV5 = 1; | |
/// HSA metadata minor version for code object V5. | ||
constexpr uint32_t VersionMinorV5 = 2; | ||
|
||
/// HSA metadata major version for code object V6. | ||
constexpr uint32_t VersionMajorV6 = 1; | ||
/// HSA metadata minor version for code object V6. | ||
constexpr uint32_t VersionMinorV6 = 3; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did anything change in metadata? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not yet, but I assume we'll want to bundle some changes to the MD with V6 so it's better to update the version now, no? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As of now, there are no changes planned to the MD for v6 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we just increment this number when there's a breaking metadata change? How does it work? |
||
|
||
/// Old HSA metadata beginning assembler directive for V2. This is only used for | ||
/// diagnostics now. | ||
|
||
/// HSA metadata beginning assembler directive. | ||
constexpr char AssemblerDirectiveBegin[] = ".amd_amdgpu_hsa_metadata"; | ||
|
||
/// Access qualifiers. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -620,6 +620,15 @@ void ScalarBitSetTraits<ELFYAML::ELF_EF>::bitset(IO &IO, | |
BCase(EF_AMDGPU_FEATURE_XNACK_V3); | ||
BCase(EF_AMDGPU_FEATURE_SRAMECC_V3); | ||
break; | ||
case ELF::ELFABIVERSION_AMDGPU_HSA_V6: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we'd need to add a test for this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. elf-headers.test already covers it |
||
for (unsigned K = ELF::EF_AMDGPU_GENERIC_VERSION_MIN; | ||
K <= ELF::EF_AMDGPU_GENERIC_VERSION_MAX; ++K) { | ||
std::string Key = "EF_AMDGPU_GENERIC_VERSION_V" + std::to_string(K); | ||
IO.maskedBitSetCase(Value, Key.c_str(), | ||
K << ELF::EF_AMDGPU_GENERIC_VERSION_OFFSET, | ||
ELF::EF_AMDGPU_GENERIC_VERSION); | ||
} | ||
[[fallthrough]]; | ||
case ELF::ELFABIVERSION_AMDGPU_HSA_V4: | ||
case ELF::ELFABIVERSION_AMDGPU_HSA_V5: | ||
BCaseMask(EF_AMDGPU_FEATURE_XNACK_UNSUPPORTED_V4, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if we should print a warning when V6 is enabled (either here or in the backend) to note that it's in development and not ready yet? Something like "code object v6 is still experimental and not ready for production use"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is a good idea.