Twan Koolen

Results 83 comments of Twan Koolen

Stack overflow happens here: https://github.com/JuliaLang/julia/blob/v1.0.0/stdlib/SparseArrays/src/sparsematrix.jl#L421. `float` strikes again. See also: * https://discourse.julialang.org/t/automatic-differentation-of-f-x-real-f-float-x-leads-to-stackoverflow/16076/6 * https://github.com/JuliaLang/julia/issues/26552 * https://github.com/JuliaDiff/ForwardDiff.jl/issues/261 * https://github.com/JuliaDiff/ForwardDiff.jl/issues/324 * https://github.com/musm/SLEEF.jl/issues/11

Sorry for being terse. It just seems like this issue keeps cropping up. > Right now, I believe the way \ is treated by ForwardDiff.jl is defined in DiffRules.jl: DiffRules.jl...

This is basically https://github.com/JuliaLang/julia/issues/26552 I believe.

Note that removing the let block changes the type of the `Dual` from ```julia ForwardDiff.Dual{ForwardDiff.Tag{##32#34{##31#33{Array{Tuple{Int64,Int64,Array{Tuple{Int64,Tuple{Int64,Int64,Array{Any,1}},Int64},1}},1}}},ForwardDiff.Dual{ForwardDiff.Tag{Tuple{##32#34{##31#33{Array{Tuple{Int64,Int64,Array{Tuple{Int64,Tuple{Int64,Int64,Array{Any,1}},Int64},1}},1}}},ForwardDiff.#gradient},Float64},Float64,1}},ForwardDiff.Dual{ForwardDiff.Tag{Tuple{##32#34{##31#33{Array{Tuple{Int64,Int64,Array{Tuple{Int64,Tuple{Int64,Int64,Array{Any,1}},Int64},1}},1}}},ForwardDiff.#gradient},Float64},Float64,1},1} ``` to ```julia ForwardDiff.Dual{ForwardDiff.Tag{##37#38,ForwardDiff.Dual{ForwardDiff.Tag{Tuple{##37#38,ForwardDiff.#gradient},Float64},Float64,1}},ForwardDiff.Dual{ForwardDiff.Tag{Tuple{##37#38,ForwardDiff.#gradient},Float64},Float64,1},1} ``` i.e., it is 'simpler'; that does indeed point in the...

More evidence that this is a type inference problem (another part of tkoolen/RigidBodyDynamics.jl#347): ```julia using ForwardDiff @noinline function f267(z, x) @show Base.promote_op(Base.LinAlg.matprod, Float64, eltype(x)) x[1] end z267 = ([(1, (2),...

Running into this issue again. I was wondering: could the `F` parameter of `Tag` just be replaced with a hash of the function type? The hash could maybe be computed...

Yeah. I'll try to reduce it to something that doesn't require half the Julia ecosystem :-)

Somewhat reduced example: ```julia import ForwardDiff import RigidBodyDynamics struct Revolute{T} end struct Fixed{T} end struct Joint{T, JT} end struct TypeSortedCollection{D, N} end struct Dynamics{M, JointCollection, C, P} end struct UJacobianWrapper{fType,tType,P}...

I tried to help the compiler in https://github.com/JuliaRobotics/RigidBodyDynamics.jl/pull/414, which worked (the somewhat-minimal example above now works ~~and infers correctly~~), but if I then remove the [`Tag` constructor overloads in RigidBodySim](https://github.com/JuliaRobotics/RigidBodySim.jl/blob/c99cda125cc6672b86440cdb60d5f1502539fb5d/src/core.jl#L86-L92)...

Doing this before #207 would simplify #207.