P4 to Git Change 2024251 by kjayapra@0_HIPWS_LNX1_ROCM on 2019/11/04 10:07:42
SWDEV-206759 - Adding support for duplicate global vars Affected files ... ... //depot/stg/opencl/drivers/opencl/api/hip/hip_internal.hpp#45 edit ... //depot/stg/opencl/drivers/opencl/api/hip/hip_memory.cpp#81 edit ... //depot/stg/opencl/drivers/opencl/api/hip/hip_module.cpp#46 edit ... //depot/stg/opencl/drivers/opencl/api/hip/hip_platform.cpp#48 edit ... //depot/stg/opencl/drivers/opencl/make/hip.git/tests/build/Makefile.hip_tests#30 edit
This commit is contained in:
+14
-2
@@ -183,13 +183,25 @@ hipError_t ihipModuleLoadData(hipModule_t *module, const void *image)
|
||||
program->setVarInfoCallBack(&getSvarInfo);
|
||||
|
||||
if (CL_SUCCESS != program->addDeviceProgram(*hip::getCurrentContext()->devices()[0], image, ElfSize(image))) {
|
||||
>>>> ORIGINAL //depot/stg/opencl/drivers/opencl/api/hip/hip_module.cpp#44
|
||||
return hipErrorUnknown;
|
||||
==== THEIRS //depot/stg/opencl/drivers/opencl/api/hip/hip_module.cpp#45
|
||||
return hipErrorInvalidKernelFile;
|
||||
==== YOURS //0_HIPWS_LNX1_ROCM/main/drivers/opencl/api/hip/hip_module.cpp
|
||||
return hipErrorUnknown;
|
||||
<<<<
|
||||
}
|
||||
|
||||
*module = reinterpret_cast<hipModule_t>(as_cl(program));
|
||||
|
||||
if (!ihipModuleRegisterGlobal(program, module)) {
|
||||
>>>> ORIGINAL //depot/stg/opencl/drivers/opencl/api/hip/hip_module.cpp#44
|
||||
return hipErrorUnknown;
|
||||
==== THEIRS //depot/stg/opencl/drivers/opencl/api/hip/hip_module.cpp#45
|
||||
return hipErrorSharedObjectSymbolNotFound;
|
||||
==== YOURS //0_HIPWS_LNX1_ROCM/main/drivers/opencl/api/hip/hip_module.cpp
|
||||
return hipErrorUnknown;
|
||||
<<<<
|
||||
}
|
||||
|
||||
if (!ihipModuleRegisterUndefined(program, module)) {
|
||||
@@ -230,8 +242,8 @@ hipError_t hipModuleGetGlobal(hipDeviceptr_t* dptr, size_t* bytes, hipModule_t h
|
||||
HIP_INIT_API(hipModuleGetGlobal, dptr, bytes, hmod, name);
|
||||
|
||||
/* Get address and size for the global symbol */
|
||||
if (!PlatformState::instance().getGlobalVar(name, ihipGetDevice(), dptr,
|
||||
bytes)) {
|
||||
if (!PlatformState::instance().getGlobalVar(name, ihipGetDevice(), hmod,
|
||||
dptr, bytes)) {
|
||||
HIP_RETURN(hipErrorNotFound);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user