File tree Expand file tree Collapse file tree 2 files changed +8
-15
lines changed Expand file tree Collapse file tree 2 files changed +8
-15
lines changed Original file line number Diff line number Diff line change @@ -153,7 +153,6 @@ const AdapterPtr &event_impl::getAdapter() {
153
153
void event_impl::setStateIncomplete () { MState = HES_NotComplete; }
154
154
155
155
void event_impl::setContextImpl (const ContextImplPtr &Context) {
156
- MIsHostEvent = Context == nullptr ;
157
156
MContext = Context;
158
157
}
159
158
@@ -208,12 +207,7 @@ void event_impl::initHostProfilingInfo() {
208
207
assert (QueuePtr->MIsProfilingEnabled && " Queue must have profiling enabled" );
209
208
210
209
MIsProfilingEnabled = true ;
211
- MHostProfilingInfo.reset (new HostProfilingInfo ());
212
- if (!MHostProfilingInfo)
213
- throw sycl::exception (sycl::make_error_code (sycl::errc::runtime),
214
- " Out of host memory " +
215
- codeToString (UR_RESULT_ERROR_OUT_OF_HOST_MEMORY));
216
-
210
+ MHostProfilingInfo = std::make_unique<HostProfilingInfo>();
217
211
device_impl &Device = QueuePtr->getDeviceImpl ();
218
212
MHostProfilingInfo->setDevice (&Device);
219
213
}
@@ -620,9 +614,6 @@ bool event_impl::isCompleted() {
620
614
621
615
void event_impl::setCommand (void *Cmd) {
622
616
MCommand = Cmd;
623
- auto TypedCommand = static_cast <Command *>(Cmd);
624
- if (TypedCommand)
625
- MIsHostEvent = TypedCommand->getWorkerContext () == nullptr ;
626
617
}
627
618
628
619
} // namespace detail
Original file line number Diff line number Diff line change @@ -1956,13 +1956,15 @@ ExecCGCommand::ExecCGCommand(
1956
1956
Dependencies),
1957
1957
MEventNeeded(EventNeeded), MCommandGroup(std::move(CommandGroup)) {
1958
1958
if (MCommandGroup->getType () == detail::CGType::CodeplayHostTask) {
1959
- const auto &SubmitQueue =
1960
- static_cast <detail::CGHostTask *>(MCommandGroup.get ())->MQueue ;
1961
- MEvent->setSubmittedQueue (SubmitQueue);
1959
+ queue_impl *SubmitQueue =
1960
+ static_cast <detail::CGHostTask *>(MCommandGroup.get ())->MQueue .get ();
1961
+ assert (SubmitQueue &&
1962
+ " Host task command group must have a valid submit queue" );
1963
+
1964
+ MEvent->setSubmittedQueue (SubmitQueue->weak_from_this ());
1962
1965
// Initialize host profiling info if the queue has profiling enabled.
1963
- if (SubmitQueue && SubmitQueue ->MIsProfilingEnabled ) {
1966
+ if (SubmitQueue->MIsProfilingEnabled )
1964
1967
MEvent->initHostProfilingInfo ();
1965
- }
1966
1968
}
1967
1969
if (MCommandGroup->getType () == detail::CGType::ProfilingTag)
1968
1970
MEvent->markAsProfilingTagEvent ();
You can’t perform that action at this time.
0 commit comments