Skip to content

Commit d3511e1

Browse files
committed
Add fast path for getSYCLDeviceImages
Signed-off-by: Steffen Larsen <[email protected]>
1 parent 62e51e6 commit d3511e1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sycl/source/detail/program_manager/program_manager.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1536,6 +1536,10 @@ std::vector<device_image_plain> ProgramManager::getSYCLDeviceImages(
15361536
std::vector<device_image_plain> ProgramManager::getSYCLDeviceImages(
15371537
const context &Ctx, const std::vector<device> &Devs,
15381538
const std::vector<kernel_id> &KernelIDs, bundle_state TargetState) {
1539+
// Fast path for when no kernel IDs are requested
1540+
if (KernelIDs.empty())
1541+
return {};
1542+
15391543
{
15401544
std::lock_guard<std::mutex> BuiltInKernelIDsGuard(m_BuiltInKernelIDsMutex);
15411545

0 commit comments

Comments
 (0)