payload: {"action":"created","issue":{"url":"https://api.github.com/repos/FluxML/Zygote.jl/issues/157","repository_url":"https://api.github.com/repos/FluxML/Zygote.jl","labels_url":"https://api.github.com/repos/FluxML/Zygote.jl/issues/157/labels{/name}","comments_url":"https://api.github.com/repos/FluxML/Zygote.jl/issues/157/comments","events_url":"https://api.github.com/repos/FluxML/Zygote.jl/issues/157/events","html_url":"https://github.com/FluxML/Zygote.jl/issues/157","id":433138239,"node_id":"MDU6SXNzdWU0MzMxMzgyMzk=","number":157,"title":"ERROR: Can't differentiate simdloop expression","user":{"login":"baggepinnen","id":3797491,"node_id":"MDQ6VXNlcjM3OTc0OTE=","avatar_url":"https://avatars2.githubusercontent.com/u/3797491?v=4","gravatar_id":"","url":"https://api.github.com/users/baggepinnen","html_url":"https://github.com/baggepinnen","followers_url":"https://api.github.com/users/baggepinnen/followers","following_url":"https://api.github.com/users/baggepinnen/following{/other_user}","gists_url":"https://api.github.com/users/baggepinnen/gists{/gist_id}","starred_url":"https://api.github.com/users/baggepinnen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baggepinnen/subscriptions","organizations_url":"https://api.github.com/users/baggepinnen/orgs","repos_url":"https://api.github.com/users/baggepinnen/repos","events_url":"https://api.github.com/users/baggepinnen/events{/privacy}","received_events_url":"https://api.github.com/users/baggepinnen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"MikeInnes","id":2234614,"node_id":"MDQ6VXNlcjIyMzQ2MTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2234614?v=4","gravatar_id":"","url":"https://api.github.com/users/MikeInnes","html_url":"https://github.com/MikeInnes","followers_url":"https://api.github.com/users/MikeInnes/followers","following_url":"https://api.github.com/users/MikeInnes/following{/other_user}","gists_url":"https://api.github.com/users/MikeInnes/gists{/gist_id}","starred_url":"https://api.github.com/users/MikeInnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikeInnes/subscriptions","organizations_url":"https://api.github.com/users/MikeInnes/orgs","repos_url":"https://api.github.com/users/MikeInnes/repos","events_url":"https://api.github.com/users/MikeInnes/events{/privacy}","received_events_url":"https://api.github.com/users/MikeInnes/received_events","type":"User","site_admin":false},"assignees":[{"login":"MikeInnes","id":2234614,"node_id":"MDQ6VXNlcjIyMzQ2MTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/2234614?v=4","gravatar_id":"","url":"https://api.github.com/users/MikeInnes","html_url":"https://github.com/MikeInnes","followers_url":"https://api.github.com/users/MikeInnes/followers","following_url":"https://api.github.com/users/MikeInnes/following{/other_user}","gists_url":"https://api.github.com/users/MikeInnes/gists{/gist_id}","starred_url":"https://api.github.com/users/MikeInnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikeInnes/subscriptions","organizations_url":"https://api.github.com/users/MikeInnes/orgs","repos_url":"https://api.github.com/users/MikeInnes/repos","events_url":"https://api.github.com/users/MikeInnes/events{/privacy}","received_events_url":"https://api.github.com/users/MikeInnes/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2019-04-15T07:42:15Z","updated_at":"2019-04-26T18:26:29Z","closed_at":null,"author_association":"NONE","body":"The following example (from ForwardDiff.jl readme) works well on small input vectors but fails on larger ones.\r\n\r\n```julia\r\nusing Zygote\r\nf(x) = sum(sin, x) + prod(tan, x) * sum(sqrt, x);\r\ngz = x -> Zygote.gradient(f, x)[1]; # g = ∇f\r\n\r\nx = rand(5); # small size works well\r\ngz(x)\r\nx = rand(5000); # large size errors\r\njulia> gz(x)\r\nERROR: Can't differentiate simdloop expression\r\nStacktrace:\r\n [1] error(::String) at ./error.jl:33\r\n [2] macro expansion at ./simdloop.jl:71 [inlined]\r\n [3] mapreduce_impl at ./reduce.jl:164 [inlined]\r\n [4] (::typeof(∂(Base.mapreduce_impl)))(::Float64) at /local/home/fredrikb/.julia/packages/Zygote/7kv2i/src/compiler/interface2.jl:0\r\n [5] mapreduce_impl at ./reduce.jl:173 [inlined]\r\n [6] (::typeof(∂(Base.mapreduce_impl)))(::Float64) at /local/home/fredrikb/.julia/packages/Zygote/7kv2i/src/compiler/interface2.jl:0\r\n [7] mapreduce_impl at ./reduce.jl:173 [inlined]\r\n [8] (::typeof(∂(Base.mapreduce_impl)))(::Float64) at /local/home/fredrikb/.julia/packages/Zygote/7kv2i/src/compiler/interface2.jl:0\r\n [9] mapreduce_impl at ./reduce.jl:173 [inlined]\r\n [10] (::typeof(∂(Base.mapreduce_impl)))(::Float64) at /local/home/fredrikb/.julia/packages/Zygote/7kv2i/src/compiler/interface2.jl:0\r\n [11] mapreduce_impl at ./reduce.jl:178 [inlined]\r\n [12] (::typeof(∂(Base.mapreduce_impl)))(::Float64) at /local/home/fredrikb/.julia/packages/Zygote/7kv2i/src/compiler/interface2.jl:0\r\n [13] _mapreduce at ./reduce.jl:320 [inlined]\r\n [14] (::typeof(∂(Base._mapreduce)))(::Float64) at /local/home/fredrikb/.julia/packages/Zygote/7kv2i/src/compiler/interface2.jl:0\r\n [15] _mapreduce_dim at ./reducedim.jl:308 [inlined]\r\n [16] (::typeof(∂(Base._mapreduce_dim)))(::Float64) at /local/home/fredrikb/.julia/packages/Zygote/7kv2i/src/compiler/interface2.jl:0\r\n [17] #mapreduce#548 at ./reducedim.jl:304 [inlined]\r\n [18] mapreduce at ./reducedim.jl:304 [inlined]\r\n [19] _prod at ./reducedim.jl:653 [inlined]\r\n [20] #prod#553 at ./reducedim.jl:649 [inlined]\r\n [21] prod at ./reducedim.jl:649 [inlined]\r\n [22] f at ./REPL[3]:1 [inlined]\r\n [23] (::typeof(∂(f)))(::Float64) at /local/home/fredrikb/.julia/packages/Zygote/7kv2i/src/compiler/interface2.jl:0\r\n [24] (::getfield(Zygote, Symbol(\"##71#72\")){typeof(∂(f))})(::Float64) at /local/home/fredrikb/.julia/packages/Zygote/7kv2i/src/compiler/interface.jl:38\r\n [25] gradient(::Function, ::Array{Float64,1}) at /local/home/fredrikb/.julia/packages/Zygote/7kv2i/src/compiler/interface.jl:47\r\n [26] (::getfield(Main, Symbol(\"##3#4\")))(::Array{Float64,1}) at ./REPL[4]:1\r\n [27] top-level scope at none:0\r\n```\r\nIf, however, the definition of `f` is changed to\r\n`f(x) = sum(sin.(x)) + prod(tan.(x)) * sum(sqrt.(x))`\r\nit works"},"comment":{"url":"https://api.github.com/repos/FluxML/Zygote.jl/issues/comments/487155682","html_url":"https://github.com/FluxML/Zygote.jl/issues/157#issuecomment-487155682","issue_url":"https://api.github.com/repos/FluxML/Zygote.jl/issues/157","id":487155682,"node_id":"MDEyOklzc3VlQ29tbWVudDQ4NzE1NTY4Mg==","user":{"login":"dillondaudert","id":8727185,"node_id":"MDQ6VXNlcjg3MjcxODU=","avatar_url":"https://avatars1.githubusercontent.com/u/8727185?v=4","gravatar_id":"","url":"https://api.github.com/users/dillondaudert","html_url":"https://github.com/dillondaudert","followers_url":"https://api.github.com/users/dillondaudert/followers","following_url":"https://api.github.com/users/dillondaudert/following{/other_user}","gists_url":"https://api.github.com/users/dillondaudert/gists{/gist_id}","starred_url":"https://api.github.com/users/dillondaudert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dillondaudert/subscriptions","organizations_url":"https://api.github.com/users/dillondaudert/orgs","repos_url":"https://api.github.com/users/dillondaudert/repos","events_url":"https://api.github.com/users/dillondaudert/events{/privacy}","received_events_url":"https://api.github.com/users/dillondaudert/received_events","type":"User","site_admin":false},"created_at":"2019-04-26T18:26:29Z","updated_at":"2019-04-26T18:26:29Z","author_association":"NONE","body":"Not sure if this is fixed on master (couldn't get it to precompile on Julia v1.1), but I get this error on Zygote 0.2 when calling `gradient` on `evaluate` from Distances.jl. \r\n```jl\r\nusing Zygote\r\nusing Distances\r\ngradient((a, b) -> evaluate(Euclidean(), a, b), rand(10), rand(10))\r\n```"}}
other: {"actor":{"display_login":"dillondaudert"}}