Skip to content

Commit 5750198

Browse files
authored
[SYCL] Avoid double map lookup in the ProgramManager::getEliminatedKernelArg… (#18318)
A simple fix to avoid a second hash map lookup in the the `ProgramManager::getEliminatedKernelArgMask` function Signed-off-by: Sergei Vinogradov <[email protected]>
1 parent 303f407 commit 5750198

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sycl/source/detail/program_manager/program_manager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2359,7 +2359,7 @@ ProgramManager::getEliminatedKernelArgMask(ur_program_handle_t NativePrg,
23592359
continue;
23602360
auto ArgMaskMapIt = MapIt->second.find(KernelName);
23612361
if (ArgMaskMapIt != MapIt->second.end())
2362-
return &MapIt->second[KernelName];
2362+
return &ArgMaskMapIt->second;
23632363
}
23642364
if (Range.first != Range.second)
23652365
return nullptr;

0 commit comments

Comments
 (0)