# Flux with Julia master fails with IRCode error

**URL:** <https://discourse.julialang.org/t/flux-with-julia-master-fails-with-ircode-error/48865>\
**Category:** Machine Learning\
**Created:** [October 23, 2020, 6:14am UTC](https://discourse.julialang.org/t/flux-with-julia-master-fails-with-ircode-error/48865 "2020-10-23T06:14:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Colin\_Beckingham](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/colin_beckingham/32/4878_2.png) [@Colin\_Beckingham](https://discourse.julialang.org/u/Colin_Beckingham)\
**Post date:** [October 23, 2020, 6:14am UTC](https://discourse.julialang.org/t/flux-with-julia-master-fails-with-ircode-error/48865/1 "2020-10-23T06:14:57Z")

</div>

Using the sample code from the documentation for Flux Optimizers, with Julia 1.5.2 the code works (apart from a warning about slow compilation) but fails with master on

```julia
julia> grads = gradient(() -> loss(x, y), θ)
ERROR: MethodError: no method matching Core.Compiler.IRCode(::Vector{Any}, ::Vector{Any}, ::Vector{Int32}, ::Vector{UInt8}, ::Core.Compiler.CFG, ::Vector{Core.LineInfoNode}, ::Vector{Any}, ::Vector{Any}, ::Vector{Any})
Stacktrace:
 [1] Core.Compiler.IRCode(ir::IRTools.Inner.IR)
   @ IRTools.Inner.Wrap ~/.julia/packages/IRTools/GVPoj/src/ir/wrap.jl:55
 [2] update!(ci::Core.CodeInfo, ir::IRTools.Inner.IR)
   @ IRTools.Inner ~/.julia/packages/IRTools/GVPoj/src/reflection/utils.jl:143

```

As the code hierarchy of Julia grows it gets harder and harder to know where the basic issue lies (Flux, Zygote, …) so I am not sure where this might be reported as an issue, if an issue it is.
