SWDEV-504658 - Reduce the lock scope for kernel look-up

The vector with all kernels is preallocated on the executable init.
Thus, reduce the scope  of global lock to the binary creation only.

Change-Id: I73035013a6562175069137e895bba815f466ee35


[ROCm/clr commit: 0640d36019]
Bu işleme şunda yer alıyor:
German Andryeyev committed 2024-12-18 17:04:51 -05:00
1 ebeveyn 02c203bf9c
işleme 55d4a75016
3 files changed
+17 -16

No files matched your search

-3
Dosyayı Görüntüle
@@ -1379,13 +1379,10 @@ const char* StatCO::getStatFuncName(const void* hostFunction) {
}
hipError_t StatCO::getStatFunc(hipFunction_t* hfunc, const void* hostFunction, int deviceId) {
amd::ScopedLock lock(sclock_);
const auto it = functions_.find(hostFunction);
if (it == functions_.end()) {
return hipErrorInvalidSymbol;
}
return it->second->getStatFunc(hfunc, deviceId);
}