SWDEV-307184 - Add support for the new metadata

Metadata in Codeobject version 5 is the extension of CO3 and CO4.
Add the detection of the new fields and program them in
the setup of the kernel arguments.

Change-Id: I27e58df77320ad00f4f16d35912668db803826af
Этот коммит содержится в:
German Andryeyev
2022-02-03 18:28:56 -05:00
родитель d554960ae7
Коммит be6a06384e
10 изменённых файлов: 262 добавлений и 179 удалений
+4 -1
Просмотреть файл
@@ -1,4 +1,4 @@
/* Copyright (c) 2008 - 2021 Advanced Micro Devices, Inc.
/* Copyright (c) 2008 - 2022 Advanced Micro Devices, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -2667,6 +2667,9 @@ bool Program::createKernelMetadataMap(void* binary, size_t binSize) {
} else if (minor_version == '1') {
ClPrint(amd::LOG_INFO, amd::LOG_CODE, "Using Code Object V4.");
codeObjectVer_ = 4;
} else if (minor_version == '2') {
ClPrint(amd::LOG_INFO, amd::LOG_CODE, "Using Code Object V5.");
codeObjectVer_ = 5;
} else {
ClPrint(amd::LOG_ERROR, amd::LOG_CODE,
"Unknown code object metadata minor version [%s.%s].", major_version, minor_version);