Skip to content

Commit f7014de

Browse files
fix more
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
1 parent cbcc4b6 commit f7014de

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

sycl/source/detail/program_manager/program_manager.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -799,9 +799,9 @@ ur_program_handle_t ProgramManager::getBuiltURProgram(
799799
RootDevImpl->getHandleRef(), UR_DEVICE_INFO_BUILD_ON_SUBDEVICE,
800800
sizeof(ur_bool_t), &MustBuildOnSubdevice, nullptr);
801801

802-
DeviceImplPtr Dev = (MustBuildOnSubdevice == true) ? DeviceImpl : RootDevImpl;
803802
auto Context = createSyclObjFromImpl<context>(ContextImpl);
804-
auto Device = createSyclObjFromImpl<device>(Dev);
803+
auto Device = createSyclObjFromImpl<device>(
804+
MustBuildOnSubdevice == true ? DeviceImpl : RootDevImpl);
805805
const RTDeviceBinaryImage &Img =
806806
getDeviceImage(KernelName, Context, Device, JITCompilationIsRequired);
807807

@@ -822,7 +822,7 @@ ur_program_handle_t ProgramManager::getBuiltURProgram(
822822
std::copy(DeviceImagesToLink.begin(), DeviceImagesToLink.end(),
823823
std::back_inserter(AllImages));
824824

825-
return getBuiltURProgram(AllImages, Context, {Device});
825+
return getBuiltURProgram(AllImages, Context, {std::move(Device)});
826826
}
827827

828828
ur_program_handle_t ProgramManager::getBuiltURProgram(
@@ -1000,7 +1000,7 @@ ur_program_handle_t ProgramManager::getBuiltURProgram(
10001000
}
10011001
}
10021002
// Change device in the cache key to reduce copying of spec const data.
1003-
CacheKey.second = Subset;
1003+
CacheKey.second = std::move(Subset);
10041004
bool DidInsert = Cache.insertBuiltProgram(CacheKey, ResProgram);
10051005
if (DidInsert) {
10061006
// For every cached copy of the program, we need to increment its

sycl/source/detail/scheduler/commands.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3612,6 +3612,7 @@ ur_result_t ExecCGCommand::enqueueImpQueue() {
36123612
// we don't need to enqueue anything.
36133613
return UR_RESULT_SUCCESS;
36143614
}
3615+
assert(MQueue && "Empty node should have an associated queue");
36153616
const detail::AdapterPtr &Adapter = MQueue->getAdapter();
36163617
ur_event_handle_t Event;
36173618
ur_result_t Result = Adapter->call_nocheck<UrApiKind::urEnqueueEventsWait>(

0 commit comments

Comments
 (0)