SWDEV-465085 - replace asserts inside API calls

This change replaces some asserts, that were only available in debug
mode, with standard error handling.

Signed-off-by: Sebastian Luzynski <Sebastian.Luzynski@amd.com>
Change-Id: I112f9e56f921abd72daf0d11e4ecdcb7b1a9f9e6
Αυτή η υποβολή περιλαμβάνεται σε:
Sebastian Luzynski
2024-09-24 15:18:06 +00:00
γονέας e94d9b1763
υποβολή 019abdc3bd
6 αρχεία άλλαξαν με 22 προσθήκες και 13 διαγραφές
@@ -76,7 +76,10 @@ void** __hipRegisterFatBinary(const void* data) {
fbwrapper->version);
return nullptr;
}
return reinterpret_cast<void**>(PlatformState::instance().addFatBinary(fbwrapper->binary));
bool success{};
auto fat_binary_info = PlatformState::instance().addFatBinary(fbwrapper->binary, success);
return success ? reinterpret_cast<void**>(fat_binary_info) : nullptr;
}
void __hipRegisterFunction(hip::FatBinaryInfo** modules, const void* hostFunction,
@@ -899,8 +902,8 @@ hipError_t PlatformState::digestFatBinary(const void* data, hip::FatBinaryInfo*&
return statCO_.digestFatBinary(data, programs);
}
hip::FatBinaryInfo** PlatformState::addFatBinary(const void* data) {
return statCO_.addFatBinary(data, initialized_);
hip::FatBinaryInfo** PlatformState::addFatBinary(const void* data, bool& success) {
return statCO_.addFatBinary(data, initialized_, success);
}
hipError_t PlatformState::removeFatBinary(hip::FatBinaryInfo** module) {