SWDEV-254363 - Checks to make sure kernel is launched on the same device as it was launched.

Change-Id: I2f273a70b1a5fc0e9fc9c6144eabd32466ff4e59
This commit is contained in:
kjayapra-amd
2020-09-28 17:53:32 -04:00
zatwierdzone przez Karthik Jayaprakash
rodzic b673a56fcb
commit c4505bede3
6 zmienionych plików z 31 dodań i 22 usunięć
+6 -6
Wyświetl plik
@@ -759,7 +759,7 @@ hipError_t PlatformState::getDynFunc(hipFunction_t* hfunc, hipModule_t hmod,
return it->second->getDynFunc(hfunc, func_name);
}
hipError_t PlatformState::getDynGlobalVar(const char* hostVar, int deviceId, hipModule_t hmod,
hipError_t PlatformState::getDynGlobalVar(const char* hostVar, hipModule_t hmod,
hipDeviceptr_t* dev_ptr, size_t* size_ptr) {
amd::ScopedLock lock(lock_);
@@ -770,7 +770,7 @@ hipError_t PlatformState::getDynGlobalVar(const char* hostVar, int deviceId, hip
}
hip::DeviceVar* dvar = nullptr;
IHIP_RETURN_ONFAIL(it->second->getDeviceVar(&dvar, hostVar, deviceId));
IHIP_RETURN_ONFAIL(it->second->getDeviceVar(&dvar, hostVar));
*dev_ptr = dvar->device_ptr();
*size_ptr = dvar->size();
@@ -784,8 +784,8 @@ hipError_t PlatformState::registerTexRef(textureReference* texRef, hipModule_t h
return hipSuccess;
}
hipError_t PlatformState::getDynTexGlobalVar(textureReference* texRef, int deviceId,
hipDeviceptr_t* dev_ptr, size_t* size_ptr) {
hipError_t PlatformState::getDynTexGlobalVar(textureReference* texRef, hipDeviceptr_t* dev_ptr,
size_t* size_ptr) {
amd::ScopedLock lock(lock_);
auto tex_it = texRef_map_.find(texRef);
@@ -801,7 +801,7 @@ hipError_t PlatformState::getDynTexGlobalVar(textureReference* texRef, int devic
}
hip::DeviceVar* dvar = nullptr;
IHIP_RETURN_ONFAIL(it->second->getDeviceVar(&dvar, tex_it->second.second, deviceId));
IHIP_RETURN_ONFAIL(it->second->getDeviceVar(&dvar, tex_it->second.second));
*dev_ptr = dvar->device_ptr();
*size_ptr = dvar->size();
@@ -818,7 +818,7 @@ hipError_t PlatformState::getDynTexRef(const char* hostVar, hipModule_t hmod, te
}
hip::DeviceVar* dvar = nullptr;
IHIP_RETURN_ONFAIL(it->second->getDeviceVar(&dvar, hostVar, ihipGetDevice()));
IHIP_RETURN_ONFAIL(it->second->getDeviceVar(&dvar, hostVar));
dvar->shadowVptr = new texture<char>();
*texRef = reinterpret_cast<textureReference*>(dvar->shadowVptr);