@@ -306,7 +306,11 @@ function enqueue_remainder_copy_to!(state::DataDepsState, dest_space::MemorySpac
306306 @dagdebug nothing :spawn_datadeps " ($(repr (f)) )[$(idx- 1 ) ][$dep_mod ] Remainder copy-to has $(length (remainder_syncdeps)) syncdeps"
307307
308308 # Launch the remainder copy task
309+ ctx = Sch. eager_context ()
310+ id = rand (UInt)
311+ @maybelog ctx timespan_start (ctx, :datadeps_copy , (;id), (;))
309312 copy_task = Dagger. @spawn scope= dest_scope exec_scope= dest_scope syncdeps= remainder_syncdeps meta= true Dagger. move! (remainder_aliasing, dest_space, source_space, arg_dest, arg_source)
313+ @maybelog ctx timespan_finish (ctx, :datadeps_copy , (;id), (;thunk_id= copy_task. uid, from_space= source_space, to_space= dest_space, arg_w, from_arg= arg_source, to_arg= arg_dest))
310314
311315 # This copy task becomes a new writer for the target region
312316 add_writer! (state, arg_w, dest_space, target_ainfo, copy_task, write_num)
@@ -351,7 +355,11 @@ function enqueue_remainder_copy_from!(state::DataDepsState, dest_space::MemorySp
351355 @dagdebug nothing :spawn_datadeps " ($(typeof (arg_w. arg)) )[$dep_mod ] Remainder copy-from has $(length (remainder_syncdeps)) syncdeps"
352356
353357 # Launch the remainder copy task
358+ ctx = Sch. eager_context ()
359+ id = rand (UInt)
360+ @maybelog ctx timespan_start (ctx, :datadeps_copy , (;id), (;))
354361 copy_task = Dagger. @spawn scope= dest_scope exec_scope= dest_scope syncdeps= remainder_syncdeps meta= true Dagger. move! (remainder_aliasing, dest_space, source_space, arg_dest, arg_source)
362+ @maybelog ctx timespan_finish (ctx, :datadeps_copy , (;id), (;thunk_id= copy_task. uid, from_space= source_space, to_space= dest_space, arg_w, from_arg= arg_source, to_arg= arg_dest))
355363
356364 # This copy task becomes a new writer for the target region
357365 add_writer! (state, arg_w, dest_space, target_ainfo, copy_task, write_num)
@@ -380,7 +388,11 @@ function enqueue_copy_to!(state::DataDepsState, dest_space::MemorySpace, arg_w::
380388 @dagdebug nothing :spawn_datadeps " ($(repr (f)) )[$(idx- 1 ) ][$dep_mod ] Full copy-to has $(length (copy_syncdeps)) syncdeps"
381389
382390 # Launch the remainder copy task
391+ ctx = Sch. eager_context ()
392+ id = rand (UInt)
393+ @maybelog ctx timespan_start (ctx, :datadeps_copy , (;id), (;))
383394 copy_task = Dagger. @spawn scope= dest_scope exec_scope= dest_scope syncdeps= copy_syncdeps meta= true Dagger. move! (dep_mod, dest_space, source_space, arg_dest, arg_source)
395+ @maybelog ctx timespan_finish (ctx, :datadeps_copy , (;id), (;thunk_id= copy_task. uid, from_space= source_space, to_space= dest_space, arg_w, from_arg= arg_source, to_arg= arg_dest))
384396
385397 # This copy task becomes a new writer for the target region
386398 add_writer! (state, arg_w, dest_space, target_ainfo, copy_task, write_num)
@@ -407,7 +419,11 @@ function enqueue_copy_from!(state::DataDepsState, dest_space::MemorySpace, arg_w
407419 @dagdebug nothing :spawn_datadeps " ($(typeof (arg_w. arg)) )[$dep_mod ] Full copy-from has $(length (copy_syncdeps)) syncdeps"
408420
409421 # Launch the remainder copy task
422+ ctx = Sch. eager_context ()
423+ id = rand (UInt)
424+ @maybelog ctx timespan_start (ctx, :datadeps_copy , (;id), (;))
410425 copy_task = Dagger. @spawn scope= dest_scope exec_scope= dest_scope syncdeps= copy_syncdeps meta= true Dagger. move! (dep_mod, dest_space, source_space, arg_dest, arg_source)
426+ @maybelog ctx timespan_finish (ctx, :datadeps_copy , (;id), (;thunk_id= copy_task. uid, from_space= source_space, to_space= dest_space, arg_w, from_arg= arg_source, to_arg= arg_dest))
411427
412428 # This copy task becomes a new writer for the target region
413429 add_writer! (state, arg_w, dest_space, target_ainfo, copy_task, write_num)
0 commit comments