Merge branch 'master' into amd-master-next

Conflicts:
	CMakeLists.txt
	tests/src/texture/simpleTexture2DLayered.cpp
	tests/src/texture/simpleTexture3D.cpp

Change-Id: I4aa4754d391b5f37ddf15fa0bcfc84d9da020119


[ROCm/clr commit: e7fdb3d796]
This commit is contained in:
Lad, Aditya
2020-03-06 14:10:04 -05:00
42 ha cambiato i file con 1410 aggiunte e 640 eliminazioni
+11 -5
Vedi File
@@ -26,6 +26,7 @@
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <deque>
#include <memory>
#include <mutex>
#include <stdexcept>
@@ -202,7 +203,7 @@ public:
std::function<void(hsa_code_object_reader_t*)>>;
std::pair<
std::mutex,
std::vector<std::pair<std::string, RAII_code_reader>>> code_readers;
std::deque<std::pair<std::string, RAII_code_reader>>> code_readers;
program_state_impl() {
// Create placeholder for each agent for the per-agent members.
@@ -244,7 +245,8 @@ public:
if (!valid(tmp)) break;
for (auto&& bundle : bundles(tmp)) {
impl.code_object_blobs.second[elf][triple_to_hsa_isa(bundle.triple)].push_back(bundle.blob);
if(bundle.blob.size())
impl.code_object_blobs.second[elf][triple_to_hsa_isa(bundle.triple)].push_back(bundle.blob);
}
blob_it += tmp.bundled_code_size;
@@ -418,13 +420,17 @@ public:
decltype(code_readers.second)::iterator it;
{
std::lock_guard<std::mutex> lck{code_readers.first};
it = code_readers.second.emplace(code_readers.second.end(),
move(file), move(tmp));
code_readers.second.emplace_back(move(file), move(tmp));
it = std::prev(code_readers.second.end());
}
auto check_hsa_error = [](hsa_status_t s) {
if (s != HSA_STATUS_SUCCESS) {
hip_throw(std::runtime_error{"error when loading code object"});
const char* hsa_err_msg;
hsa_status_string(s, &hsa_err_msg);
hip_throw(std::runtime_error{
std::string("error when loading code object: ") +
hsa_err_msg});
}
};