SWDEV-234295 - Pass flag to ROCclr to not clear device programs during program::build()

Change-Id: I50b9fa1a96da6895f73fdf4a7c0d3f096b1188da
This commit is contained in:
kjayapra-amd
2020-06-01 18:42:20 -04:00
committed by Karthik Jayaprakash
parent 0920bac577
commit 9261a35be9
3 changed files with 11 additions and 4 deletions
+5 -3
View File
@@ -133,7 +133,7 @@ hipError_t __hipExtractCodeObjectFromFatBinary(const void* data,
if (num_code_objs == devices.size()) {
return hipSuccess;
} else {
fatal("hipErrorNoBinaryForGpu: Coudn't find binary for current devices!");
("hipErrorNoBinaryForGpu: Coudn't find binary for current devices!");
return hipErrorNoBinaryForGpu;
}
}
@@ -440,7 +440,8 @@ hipFunction_t PlatformState::getFunc(const void* hostFunction, int deviceId) {
if (!(*devFunc.modules)[deviceId].second) {
amd::Program* program = as_amd(reinterpret_cast<cl_program>(module));
program->setVarInfoCallBack(&getSvarInfo);
if (CL_SUCCESS != program->build(g_devices[deviceId]->devices(), nullptr, nullptr, nullptr)) {
if (CL_SUCCESS != program->build(g_devices[deviceId]->devices(), nullptr, nullptr, nullptr,
kOptionChangeable, kNewDevProg)) {
DevLogPrintfError("Build error for module: 0x%x at device: %u \n", module, deviceId);
return nullptr;
}
@@ -541,7 +542,8 @@ bool PlatformState::getGlobalVar(const char* hostVar, int deviceId, hipModule_t
if (!(*dvar->modules)[deviceId].second) {
amd::Program* program = as_amd(reinterpret_cast<cl_program>((*dvar->modules)[deviceId].first));
program->setVarInfoCallBack(&getSvarInfo);
if (CL_SUCCESS != program->build(g_devices[deviceId]->devices(), nullptr, nullptr, nullptr)) {
if (CL_SUCCESS != program->build(g_devices[deviceId]->devices(), nullptr, nullptr, nullptr,
kOptionChangeable, kNewDevProg)) {
DevLogPrintfError("Build Failure for module: 0x%x \n", hmod);
return false;
}