SWDEV-447973 - Support generic targets

Change-Id: I32db83843e45e0f013591493aafd7a532c881e16


[ROCm/clr commit: f1f4f40c5b]
This commit is contained in:
taosang2 authored and Tao Sang committed 2024-11-29 10:12:10 -05:00
1 parent 3e8d5599d4
commit f3e3d8178b
8 files changed
+303 -49

No files matched your search

+7 -1
View File
@@ -52,7 +52,7 @@ class CodeObject {
// return code_objs{binary_ptr, binary_size}, which could be used to determine foffset
static hipError_t ExtractCodeObjectFromFile(amd::Os::FileDesc fdesc, size_t fsize,
const void ** image, const std::vector<std::string>& device_names,
std::vector<std::pair<const void*, size_t>>& code_objs);
std::vector<std::pair<const void*, size_t>>& code_objs, size_t foffset);
// Given an ptr to memory, extracts to code object for corresponding devices,
// returns code_objs{binary_ptr, binary_size} and uniform resource indicator
@@ -65,6 +65,12 @@ class CodeObject {
static bool IsClangOffloadMagicBundle(const void* data, bool& isCompressed);
static unsigned int getGenericVersion(const void* image);
static bool isGenericTarget(const void* image);
static bool containGenericTarget(const void *data);
// Return size of fat bin
static size_t getFatbinSize(const void* data, const bool isCompressed = false);