Skip to content

Commit 3356e28

Browse files
committed
fixup! Sch: Fix incorrect task signature calculation
1 parent 48baa41 commit 3356e28

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Diff for: src/sch/util.jl

+4
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,10 @@ function signature(f, args)
292292
sig_kwarg_names = Symbol[]
293293
sig_kwarg_types = []
294294
for (pos, arg) in args
295+
if arg isa Dagger.DTask
296+
# Only occurs via manual usage of signature
297+
arg = fetch(arg; raw=true)
298+
end
295299
T = chunktype(arg)
296300
if pos === nothing
297301
push!(sig, T)

Diff for: test/scheduler.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ end
360360
c = Dagger.tochunk(1.0)
361361
@test Dagger.Sch.signature(*, [nothing=>c, nothing=>3]) == [typeof(*), Float64, Int]
362362
t = Dagger.@spawn 1+2
363-
@test Dagger.Sch.signature(/, [nothing=>t, nothing=>c, nothing=>3]) == [typeof(+), Int, Float64]
363+
@test Dagger.Sch.signature(/, [nothing=>t, nothing=>c, nothing=>3]) == [typeof(/), Int, Float64, Int]
364364
end
365365

366366
@testset "Cost Estimation" begin

0 commit comments

Comments
 (0)