2
0

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
Este cometimento está contido em:
foreman
2019-08-12 21:22:47 -04:00
ascendente 4e71cb437e
cometimento c2ffca9c1d
2 ficheiros modificados com 4 adições e 0 eliminações
+2
Ver ficheiro
@@ -175,6 +175,8 @@ extern hipError_t ihipDeviceGetCount(int* count);
extern int ihipGetDevice();
extern hipError_t ihipMalloc(void** ptr, size_t sizeBytes, unsigned int flags);
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);
#define HIP_RETURN(ret) \
hip::g_lastError = ret; \
+2
Ver ficheiro
@@ -143,6 +143,8 @@ hipError_t ihipModuleLoadData(hipModule_t *module, const void *image)
return hipErrorOutOfMemory;
}
program->setVarInfoCallBack(&getSvarInfo);
if (CL_SUCCESS != program->addDeviceProgram(*hip::getCurrentContext()->devices()[0], image, ElfSize(image)) ||
CL_SUCCESS != program->build(hip::getCurrentContext()->devices(), nullptr, nullptr, nullptr)) {
return hipErrorUnknown;