Skip to content

Commit 1bd6d75

Browse files
author
iclsrc
committed
Merge from 'sycl' to 'sycl-web' (#1)
2 parents 978a2e4 + 363ad5f commit 1bd6d75

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sycl/source/detail/program_manager/program_manager.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,11 @@ RT::PiProgram ProgramManager::createPIProgram(const RTDeviceBinaryImage &Img,
329329
? createSpirvProgram(Ctx, RawImg.BinaryStart, ImgSize)
330330
: createBinaryProgram(Ctx, RawImg.BinaryStart, ImgSize);
331331

332-
// associate the PI program with the image it was created for
333-
NativePrograms[Res] = &Img;
332+
{
333+
auto LockGuard = Ctx->getKernelProgramCache().acquireCachedPrograms();
334+
// associate the PI program with the image it was created for
335+
NativePrograms[Res] = &Img;
336+
}
334337

335338
if (DbgProgMgr > 1)
336339
std::cerr << "created program: " << Res

0 commit comments

Comments
 (0)