SWDEV-294596 - Make hipModuleGetGlobal match cuda
Make hipModuleGetGlobal match cuModuleGetGlobal behavour. That is, if one of the first two parameters is nullptr, ignore it. Change-Id: I3fe6dbc35a7b14aa9119df297b7885df83d28048
Este commit está contenido en:
@@ -100,10 +100,13 @@ hipError_t hipModuleGetGlobal(hipDeviceptr_t* dptr, size_t* bytes, hipModule_t h
|
||||
{
|
||||
HIP_INIT_API(hipModuleGetGlobal, dptr, bytes, hmod, name);
|
||||
|
||||
if(dptr == nullptr || bytes == nullptr || name == nullptr) {
|
||||
if (dptr == nullptr || bytes == nullptr) {
|
||||
// If either is nullptr, ignore it
|
||||
return hipSuccess;
|
||||
}
|
||||
if (name == nullptr) {
|
||||
return hipErrorInvalidValue;
|
||||
}
|
||||
|
||||
/* Get address and size for the global symbol */
|
||||
if (hipSuccess != PlatformState::instance().getDynGlobalVar(name, hmod, dptr, bytes)) {
|
||||
LogPrintfError("Cannot find global Var: %s for module: 0x%x at device: %d \n", name, hmod,
|
||||
|
||||
Referencia en una nueva incidencia
Block a user