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

Conv layer throws TaskFailedException when internal parameters are BigFloat #2243

Closed
natema opened this issue Apr 25, 2023 · 1 comment
Closed

Comments

@natema
Copy link
Contributor

natema commented Apr 25, 2023

The following

using Flux
m1 = Conv((1,1), 1=>1)
m2 = Flux._paramtype(BigFloat, m1)
m2(zeros(BigFloat,1,1,1,1))

throws

ERROR: TaskFailedException

    nested task error: UndefRefError: access to undefined reference
    Stacktrace:
     [1] getindex
       @ ./array.jl:925 [inlined]
     [2] getindex
       @ ./subarray.jl:282 [inlined]
     [3] conv_direct!(y::SubArray{BigFloat, 5, Array{BigFloat, 5}, Tuple{Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, UnitRange{Int64}, Base.Slice{Base.OneTo{Int64}}}, false}, x::SubArray{BigFloat, 5, Array{BigFloat, 5}, Tuple{Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, UnitRange{Int64}, Base.Slice{Base.OneTo{Int64}}}, false}, w::SubArray{BigFloat, 5, Array{BigFloat, 5}, Tuple{Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, UnitRange{Int64}}, true}, cdims::DenseConvDims{3, 3, 3, 6, 3}, ::Val{(1, 1, 1)}, ::Val{1}, ::Val{(0, 0, 0, 0, 0, 0)}, ::Val{(1, 1, 1)}, ::Val{(1, 1, 1)}, fk::Val{false}; alpha::BigFloat, beta::Bool)
       @ NNlib ~/.julia/packages/NNlib/ydqxJ/src/impl/conv_direct.jl:111
     [4] conv_direct!(y::SubArray{BigFloat, 5, Array{BigFloat, 5}, Tuple{Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, UnitRange{Int64}, Base.Slice{Base.OneTo{Int64}}}, false}, x::SubArray{BigFloat, 5, Array{BigFloat, 5}, Tuple{Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, UnitRange{Int64}, Base.Slice{Base.OneTo{Int64}}}, false}, w::SubArray{BigFloat, 5, Array{BigFloat, 5}, Tuple{Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, UnitRange{Int64}}, true}, cdims::DenseConvDims{3, 3, 3, 6, 3}; alpha::BigFloat, beta::Bool)
       @ NNlib ~/.julia/packages/NNlib/ydqxJ/src/impl/conv_direct.jl:50
     [5] conv_direct!(y::SubArray{BigFloat, 5, Array{BigFloat, 5}, Tuple{Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, UnitRange{Int64}, Base.Slice{Base.OneTo{Int64}}}, false}, x::SubArray{BigFloat, 5, Array{BigFloat, 5}, Tuple{Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, UnitRange{Int64}, Base.Slice{Base.OneTo{Int64}}}, false}, w::SubArray{BigFloat, 5, Array{BigFloat, 5}, Tuple{Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, UnitRange{Int64}}, true}, cdims::DenseConvDims{3, 3, 3, 6, 3})
       @ NNlib ~/.julia/packages/NNlib/ydqxJ/src/impl/conv_direct.jl:47
     [6] (::NNlib.var"#308#312"{Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, DenseConvDims{3, 3, 3, 6, 3}, SubArray{BigFloat, 5, Array{BigFloat, 5}, Tuple{Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, UnitRange{Int64}, Base.Slice{Base.OneTo{Int64}}}, false}, SubArray{BigFloat, 5, Array{BigFloat, 5}, Tuple{Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, UnitRange{Int64}}, true}, SubArray{BigFloat, 5, Array{BigFloat, 5}, Tuple{Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, UnitRange{Int64}, Base.Slice{Base.OneTo{Int64}}}, false}})()
       @ NNlib ./threadingconstructs.jl:258
Stacktrace:
  [1] sync_end(c::Channel{Any})
    @ Base ./task.jl:436
  [2] macro expansion
    @ ./task.jl:455 [inlined]
  [3] conv!(out::Array{BigFloat, 5}, in1::Array{BigFloat, 5}, in2::Array{BigFloat, 5}, cdims::DenseConvDims{3, 3, 3, 6, 3}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ NNlib ~/.julia/packages/NNlib/ydqxJ/src/conv.jl:205
  [4] conv!
    @ ~/.julia/packages/NNlib/ydqxJ/src/conv.jl:185 [inlined]
  [5] conv!(y::Array{BigFloat, 4}, x::Array{BigFloat, 4}, w::Array{BigFloat, 4}, cdims::DenseConvDims{2, 2, 2, 4, 2}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ NNlib ~/.julia/packages/NNlib/ydqxJ/src/conv.jl:145
  [6] conv!
    @ ~/.julia/packages/NNlib/ydqxJ/src/conv.jl:140 [inlined]
  [7] conv(x::Array{BigFloat, 4}, w::Array{BigFloat, 4}, cdims::DenseConvDims{2, 2, 2, 4, 2}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ NNlib ~/.julia/packages/NNlib/ydqxJ/src/conv.jl:88
  [8] conv
    @ ~/.julia/packages/NNlib/ydqxJ/src/conv.jl:83 [inlined]
  [9] (::Conv{2, 4, typeof(identity), Array{BigFloat, 4}, Vector{BigFloat}})(x::Array{BigFloat, 4})
    @ Flux ~/.julia/packages/Flux/FWgS0/src/layers/conv.jl:202
 [10] top-level scope
    @ REPL[4]:1
 [11] top-level scope
    @ ~/.julia/packages/CUDA/q3GG0/src/initialization.jl:162
@ToucheSir
Copy link
Member

Duplicate of FluxML/NNlib.jl#490.

@ToucheSir ToucheSir closed this as not planned Won't fix, can't repro, duplicate, stale Apr 25, 2023
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

No branches or pull requests

2 participants