File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
sycl/source/detail/program_manager Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1822,14 +1822,16 @@ ProgramManager::kernelImplicitLocalArgPos(KernelNameStrRefT KernelName) const {
18221822
18231823DeviceKernelInfo &ProgramManager::getOrCreateDeviceKernelInfo (
18241824 const CompileTimeKernelInfoTy &Info) {
1825+ std::lock_guard<std::mutex> Guard (m_DeviceKernelInfoMapMutex);
18251826 auto Result =
18261827 m_DeviceKernelInfoMap.try_emplace (KernelNameStrT{Info.Name .data ()}, Info);
1827- Result.first ->second .setCompileTimeInfoIfNeeded (Info);
1828+ // Result.first->second.setCompileTimeInfoIfNeeded(Info);
18281829 return Result.first ->second ;
18291830}
18301831
18311832DeviceKernelInfo &
18321833ProgramManager::getOrCreateDeviceKernelInfo (KernelNameStrRefT KernelName) {
1834+ std::lock_guard<std::mutex> Guard (m_DeviceKernelInfoMapMutex);
18331835 auto Result = m_DeviceKernelInfoMap.try_emplace (
18341836 KernelName, CompileTimeKernelInfoTy{std::string_view (KernelName)});
18351837 return Result.first ->second ;
Original file line number Diff line number Diff line change @@ -539,6 +539,7 @@ class ProgramManager {
539539 // Map for storing device kernel information. Runtime lookup should be avoided
540540 // by caching the pointers when possible.
541541 std::unordered_map<KernelNameStrT, DeviceKernelInfo> m_DeviceKernelInfoMap;
542+ std::mutex m_DeviceKernelInfoMapMutex;
542543
543544 // Sanitizer type used in device image
544545 SanitizerType m_SanitizerFoundInImage;
You can’t perform that action at this time.
0 commit comments