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]
Этот коммит содержится в:
German Andryeyev
2024-12-13 19:10:39 -05:00
родитель 02c203bf9c
Коммит 55d4a75016
3 изменённых файлов: 17 добавлений и 16 удалений
-3
Просмотреть файл
@@ -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);
}