Merge pull request #713 from scchan/master-hcc_early_finalize_support

Support more than one device code blobs in a single .kernel section

[ROCm/hip commit: 7f3e7b5334]
This commit is contained in:
Maneesh Gupta
2018-10-31 14:04:06 +05:30
committato da GitHub
2 ha cambiato i file con 15 aggiunte e 4 eliminazioni
+10 -4
Vedi File
@@ -209,10 +209,16 @@ const unordered_map<hsa_isa_t, vector<vector<char>>>& code_object_blobs(bool reb
nullptr);
for (auto&& blob : blobs) {
Bundled_code_header tmp{blob};
if (valid(tmp)) {
for (auto&& bundle : bundles(tmp)) {
r[triple_to_hsa_isa(bundle.triple)].push_back(bundle.blob);
for (auto sub_blob = blob.begin(); sub_blob != blob.end(); ) {
Bundled_code_header tmp(sub_blob, blob.end());
if (valid(tmp)) {
for (auto&& bundle : bundles(tmp)) {
r[triple_to_hsa_isa(bundle.triple)].push_back(bundle.blob);
}
sub_blob+=tmp.bundled_code_size;
}
else {
break;
}
}
}