SWDEV-508225 remove assertions when loading fat binary (#2013)
* SWDEV-508225 - do not assert() after calling digestFatBinary() if it fails. Otherwise this causes assertions to trigger easily in systems that have an APU and a discrete GPU and the code was compiled for the discrete one * SWDEV-508225 - fix that when using a non-existent ordinal in HIP_VISIBLE_DEVICES, getCurrentArch() would crash
Этот коммит содержится в:
1 родитель
32fde0f73d
Коммит
50644f5aef
4 files changed
+28
-20
No files matched your search
@@ -454,7 +454,7 @@ hipError_t StatCO::getStatFunc(hipFunction_t* hfunc, const void* hostFunction, i
|
||||
amd::ScopedLock lock(sclock_);
|
||||
if (*(module) == nullptr) {
|
||||
hipError_t err = digestFatBinary(module_to_hostModule_[module], *module);
|
||||
assert(err == hipSuccess);
|
||||
|
||||
if (err != hipSuccess) {
|
||||
return err;
|
||||
}
|
||||
@@ -479,8 +479,7 @@ hipError_t StatCO::getStatFuncAttr(hipFuncAttributes* func_attr, const void* hos
|
||||
// Lazy load
|
||||
FatBinaryInfo** module = it->second->moduleInfo();
|
||||
if (*(module) == nullptr) {
|
||||
hipError_t err = digestFatBinary(module_to_hostModule_[module], *module);
|
||||
assert(err == hipSuccess);
|
||||
std::ignore = digestFatBinary(module_to_hostModule_[module], *module);
|
||||
}
|
||||
|
||||
return it->second->getStatFuncAttr(func_attr, deviceId);
|
||||
@@ -511,8 +510,7 @@ hipError_t StatCO::getStatGlobalVar(const void* hostVar, int deviceId, hipDevice
|
||||
// Lazy load
|
||||
FatBinaryInfo** module = it->second->moduleInfo();
|
||||
if (*(module) == nullptr) {
|
||||
hipError_t err = digestFatBinary(module_to_hostModule_[module], *module);
|
||||
assert(err == hipSuccess);
|
||||
std::ignore = digestFatBinary(module_to_hostModule_[module], *module);
|
||||
}
|
||||
|
||||
DeviceVar* dvar = nullptr;
|
||||
@@ -538,8 +536,7 @@ hipError_t StatCO::initStatManagedVarDevicePtr(int deviceId) {
|
||||
// Lazy load
|
||||
FatBinaryInfo** module = var->moduleInfo();
|
||||
if (*(module) == nullptr) {
|
||||
err = digestFatBinary(module_to_hostModule_[module], *module);
|
||||
assert(err == hipSuccess);
|
||||
std::ignore = digestFatBinary(module_to_hostModule_[module], *module);
|
||||
}
|
||||
hip::Stream* stream = g_devices.at(deviceId)->NullStream();
|
||||
if (stream == nullptr) {
|
||||
|
||||
Reference in new issue
Block a user