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

Change-Id: I50b9fa1a96da6895f73fdf4a7c0d3f096b1188da
Этот коммит содержится в:
kjayapra-amd
2020-06-01 18:42:20 -04:00
коммит произвёл Karthik Jayaprakash
родитель 0920bac577
Коммит 9261a35be9
3 изменённых файлов: 11 добавлений и 4 удалений
+4
Просмотреть файл
@@ -336,6 +336,9 @@ public:
void popExec(ihipExec_t& exec);
};
constexpr bool kOptionChangeable = true;
constexpr bool kNewDevProg = false;
/// Wait all active streams on the blocking queue. The method enqueues a wait command and
/// doesn't stall the current thread
extern void iHipWaitActiveStreams(amd::HostQueue* blocking_queue, bool wait_null_stream = false);
@@ -348,4 +351,5 @@ extern amd::Memory* getMemoryObject(const void* ptr, size_t& offset);
extern bool CL_CALLBACK getSvarInfo(cl_program program, std::string var_name, void** var_addr,
size_t* var_size);
#endif // HIP_SRC_HIP_INTERNAL_H
+2 -1
Просмотреть файл
@@ -261,7 +261,8 @@ hipError_t ihipModuleLoadData(hipModule_t* module, const void* mmap_ptr, size_t
return hipErrorSharedObjectSymbolNotFound;
}
if(CL_SUCCESS != program->build(hip::getCurrentDevice()->devices(), nullptr, nullptr, nullptr)) {
if (CL_SUCCESS != program->build(hip::getCurrentDevice()->devices(), nullptr, nullptr, nullptr,
kOptionChangeable, kNewDevProg)) {
return hipErrorSharedObjectInitFailed;
}
+5 -3
Просмотреть файл
@@ -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;
}