Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unthunk in conv.jl #620

Merged
merged 4 commits into from
Jan 9, 2025
Merged

Add unthunk in conv.jl #620

merged 4 commits into from
Jan 9, 2025

Conversation

mcabbott
Copy link
Member

@mcabbott mcabbott commented Jan 6, 2025

Aims to fix errors like this in CI, from Zygote 0.7:

AutoDiff: spatial_rank=3: Error During Test at /home/runner/work/Zygote.jl/Zygote.jl/downstream/test/conv.jl:889
  Got exception outside of a @test
  MethodError: no method matching length(::InplaceableThunk{Thunk{ChainRules.var"#719#722"{Float64, Colon, Array{Float64, 5}, ProjectTo{AbstractArray, @NamedTuple{element::ProjectTo{Float64, @NamedTuple{}}, axes::NTuple{5, Base.OneTo{Int64}}}}}}, ChainRules.var"#718#721"{Float64, Colon}})
  The function `length` exists, but no method is defined for this combination of argument types.
  You may need to implement the `length` method or define `IteratorSize` for this type to be `SizeUnknown`.
  
  Closest candidates are:
    length(::JSON.Parser.MemoryParserState)
     @ JSON ~/.julia/packages/JSON/93Ea8/src/Parser.jl:28
    length(::CompositeException)
     @ Base task.jl:51
    length(::LLVM.MemoryBuffer)
     @ LLVM ~/.julia/packages/LLVM/wMjUU/src/buffer.jl:81
    ...
  
  Stacktrace:
    [1] _similar_shape(itr::InplaceableThunk{Thunk{ChainRules.var"#719#722"{Float64, Colon, Array{Float64, 5}, ProjectTo{AbstractArray, @NamedTuple{element::ProjectTo{Float64, @NamedTuple{}}, axes::NTuple{5, Base.OneTo{Int64}}}}}}, ChainRules.var"#718#721"{Float64, Colon}}, ::Base.HasLength)
      @ Base ./array.jl:663
    [2] _collect(cont::UnitRange{Int64}, itr::InplaceableThunk{Thunk{ChainRules.var"#719#722"{Float64, Colon, Array{Float64, 5}, ProjectTo{AbstractArray, @NamedTuple{element::ProjectTo{Float64, @NamedTuple{}}, axes::NTuple{5, Base.OneTo{Int64}}}}}}, ChainRules.var"#718#721"{Float64, Colon}}, ::Base.HasEltype, isz::Base.HasLength)
      @ Base ./array.jl:722
    [3] collect(itr::InplaceableThunk{Thunk{ChainRules.var"#719#722"{Float64, Colon, Array{Float64, 5}, ProjectTo{AbstractArray, @NamedTuple{element::ProjectTo{Float64, @NamedTuple{}}, axes::NTuple{5, Base.OneTo{Int64}}}}}}, ChainRules.var"#718#721"{Float64, Colon}})
      @ Base ./array.jl:716
    [4] colmajor(x::InplaceableThunk{Thunk{ChainRules.var"#719#722"{Float64, Colon, Array{Float64, 5}, ProjectTo{AbstractArray, @NamedTuple{element::ProjectTo{Float64, @NamedTuple{}}, axes::NTuple{5, Base.OneTo{Int64}}}}}}, ChainRules.var"#718#721"{Float64, Colon}})
      @ NNlib ~/work/Zygote.jl/Zygote.jl/downstream/src/conv.jl:339

Closes #619

src/conv.jl Outdated Show resolved Hide resolved
src/conv.jl Outdated Show resolved Hide resolved
src/conv.jl Outdated Show resolved Hide resolved
src/conv.jl Outdated Show resolved Hide resolved
@CarloLucibello
Copy link
Member

CUDA CI failure is unrelated

@CarloLucibello CarloLucibello merged commit b56ff50 into master Jan 9, 2025
9 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test failures with Zygote 0.7
3 participants