SWDEV-381898 - Move the lock after code object loading since COMGR is thread safe now and VDI also have locks.
Change-Id: I15547f3ae3711d12a1ddf5cb7e9abd40a95ded89
Bu işleme şunda yer alıyor:
işlemeyi yapan:
Karthik Jayaprakash
ebeveyn
2801be2372
işleme
68139f9ddb
@@ -673,8 +673,6 @@ void PlatformState::init() {
|
||||
}
|
||||
|
||||
hipError_t PlatformState::loadModule(hipModule_t* module, const char* fname, const void* image) {
|
||||
amd::ScopedLock lock(lock_);
|
||||
|
||||
if (module == nullptr) {
|
||||
return hipErrorInvalidValue;
|
||||
}
|
||||
@@ -689,6 +687,7 @@ hipError_t PlatformState::loadModule(hipModule_t* module, const char* fname, con
|
||||
*module = dynCo->module();
|
||||
assert(*module != nullptr);
|
||||
|
||||
amd::ScopedLock lock(lock_);
|
||||
if (dynCO_map_.find(*module) != dynCO_map_.end()) {
|
||||
delete dynCo;
|
||||
return hipErrorAlreadyMapped;
|
||||
|
||||
Yeni konuda referans
Bir kullanıcı engelle