P4 to Git Change 1982056 by kjayapra@3_HIPWS_TXT_ROCM on 2019/08/12 21:16:51
SWDEV-199635 - Setting VarInfoCallBack before all program builds.
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/hip/hip_internal.hpp#36 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_module.cpp#33 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.cpp#58 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#97 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#106 edit
[ROCm/clr commit: 8cc1539b35]
This commit is contained in:
@@ -3182,7 +3182,12 @@ bool Program::getUndefinedVarFromCodeObj(std::vector<std::string>* var_names) co
|
||||
}
|
||||
|
||||
bool Program::getUndefinedVarInfo(std::string var_name, void** var_addr, size_t* var_size) {
|
||||
return owner()->varcallback(as_cl(owner()), var_name.c_str(), var_addr, var_size);
|
||||
if (owner()->varcallback != nullptr) {
|
||||
return owner()->varcallback(as_cl(owner()), var_name.c_str(), var_addr, var_size);
|
||||
} else {
|
||||
buildLog_ += "SVAR HIP Call back is not set \n";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool Program::defineUndefinedVars() {
|
||||
|
||||
@@ -250,7 +250,9 @@ bool HSAILProgram::setKernels(amd::option::Options* options, void* binary, size_
|
||||
hsa_code_object_t code_object;
|
||||
code_object.handle = reinterpret_cast<uint64_t>(binary);
|
||||
|
||||
defineUndefinedVars();
|
||||
if (amd::IS_HIP) {
|
||||
defineUndefinedVars();
|
||||
}
|
||||
|
||||
hsa_status_t status = executable_->LoadCodeObject(agent, code_object, nullptr);
|
||||
if (status != HSA_STATUS_SUCCESS) {
|
||||
@@ -745,7 +747,9 @@ bool LightningProgram::setKernels(amd::option::Options* options, void* binary, s
|
||||
hsa_code_object_t code_object;
|
||||
code_object.handle = reinterpret_cast<uint64_t>(binary);
|
||||
|
||||
defineUndefinedVars();
|
||||
if (amd::IS_HIP) {
|
||||
defineUndefinedVars();
|
||||
}
|
||||
|
||||
hsa_status_t status = executable_->LoadCodeObject(agent, code_object, nullptr);
|
||||
if (status != HSA_STATUS_SUCCESS) {
|
||||
|
||||
@@ -273,7 +273,9 @@ bool HSAILProgram::setKernels(amd::option::Options* options, void* binary, size_
|
||||
return false;
|
||||
}
|
||||
|
||||
defineUndefinedVars();
|
||||
if (amd::IS_HIP) {
|
||||
defineUndefinedVars();
|
||||
}
|
||||
|
||||
// Load the code object.
|
||||
hsa_code_object_reader_t codeObjectReader;
|
||||
@@ -478,7 +480,9 @@ bool LightningProgram::setKernels(amd::option::Options* options, void* binary, s
|
||||
return false;
|
||||
}
|
||||
|
||||
defineUndefinedVars();
|
||||
if (amd::IS_HIP) {
|
||||
defineUndefinedVars();
|
||||
}
|
||||
|
||||
// Load the code object.
|
||||
status = hsa_code_object_reader_create_from_memory(binary, binSize, &hsaCodeObjectReader_);
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user