SWDEV-415265 - Fix segfault when library isn't built with current GPU arch
- Return error code instead of segfault during kernel launch when library isn't built with current gpu arch - Fix string print bug Change-Id: I91aaa50150fee220317cd2eb4e075d825cc448b2
This commit is contained in:
@@ -128,6 +128,10 @@ hipError_t Function::getDynFunc(hipFunction_t* hfunc, hipModule_t hmod) {
|
||||
hipError_t Function::getStatFunc(hipFunction_t* hfunc, int deviceId) {
|
||||
guarantee(modules_ != nullptr, "Module not initialized");
|
||||
|
||||
if (dFunc_.size() != g_devices.size()) {
|
||||
return hipErrorSharedObjectInitFailed;
|
||||
}
|
||||
|
||||
hipModule_t hmod = nullptr;
|
||||
IHIP_RETURN_ONFAIL((*modules_)->BuildProgram(deviceId));
|
||||
IHIP_RETURN_ONFAIL((*modules_)->GetModule(deviceId, &hmod));
|
||||
|
||||
Reference in New Issue
Block a user