P4 to Git Change 1766106 by kjayapra@99_HIPWS_SLV_CHECKIN on 2019/04/04 18:07:26

SWDEV-144570 - Implementation of hipMemcpyToSymbol and simillar fns for PAL.

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/hip/hip_internal.hpp#24 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_module.cpp#22 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_platform.cpp#26 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.hpp#23 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#89 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.hpp#37 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#102 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.hpp#46 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.cpp#135 edit
This commit is contained in:
foreman
2019-04-04 18:22:40 -04:00
parent 41c75b2f8d
commit e3910b720c
3 ha cambiato i file con 44 aggiunte e 39 eliminazioni
+3 -14
Vedi File
@@ -132,24 +132,13 @@ hipError_t hipModuleGetFunction(hipFunction_t *hfunc, hipModule_t hmod, const ch
HIP_RETURN(hipSuccess);
}
hipError_t hipModuleGetGlobal(hipDeviceptr_t* dptr, size_t* bytes, hipModule_t hmod, const char* name)
{
HIP_INIT_API(dptr, bytes, hmod, name);
amd::Program* program = nullptr;
const device::Program* dev_program = nullptr;
/* Get Device Program pointer*/
program = as_amd(reinterpret_cast<cl_program>(hmod));
dev_program = program->getDeviceProgram(*hip::getCurrentContext()->devices()[0]);
if (dev_program == nullptr) {
HIP_RETURN(hipErrorUnknown);
}
/* Find the global Symbols */
if(!dev_program->findGlobalSymbols(dptr, bytes, name)) {
/* Get address and size for the global symbol */
if (!PlatformState::instance().getGlobalVar(name, ihipGetDevice(), dptr,
bytes)) {
HIP_RETURN(hipErrorUnknown);
}