Skip to content

Commit

Permalink
fixup! fixup! datadeps: Allow disabling in-place moves
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsamaroo committed Jan 21, 2025
1 parent fe9fd82 commit f98c4bc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/datadeps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,10 @@ function distribute_tasks!(queue::DataDepsTaskQueue)
# Validate that we're not accidentally performing a copy
for (idx, (_, arg)) in enumerate(spec.args)
_, deps = unwrap_inout(task_args[idx][2])
if is_writedep(arg, deps, task)
# N.B. We only do this check when the argument supports in-place
# moves, because for the moment, we are not guaranteeing updates or
# write-back of results
if is_writedep(arg, deps, task) && supports_inplace_move(state, arg)
arg_space = memory_space(arg)
@assert arg_space == our_space "($(repr(spec.f)))[$idx] Tried to pass $(typeof(arg)) from $arg_space to $our_space"
end
Expand Down

0 comments on commit f98c4bc

Please sign in to comment.