Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

gradient for ChebyshevTransform failed #64

Closed
yuehhua opened this issue May 3, 2022 · 1 comment
Closed

gradient for ChebyshevTransform failed #64

yuehhua opened this issue May 3, 2022 · 1 comment

Comments

@yuehhua
Copy link
Collaborator

yuehhua commented May 3, 2022

I tried to calculate gradient for ChebyshevTransform, and it failed with follwoing exception:

Chebyshev transform: Error During Test at /media/yuehhua/Workbench/workspace/NeuralOperators.jl/test/Transform/chebyshev_transform.jl:1
  Got exception outside of a @test
  Compiling Tuple{Type{FFTW.r2rFFTWPlan{Float64, Any, false, 5}}, Array{Float64, 5}, FFTW.FakeArray{Float64, 5}, UnitRange{Int64}, Int64, UInt32, Float64}: try/catch is not supported.
  Stacktrace:
    [1] error(s::String)
      @ Base ./error.jl:33
    [2] instrument(ir::IRTools.Inner.IR)
      @ Zygote ~/.julia/packages/Zygote/Y6SC4/src/compiler/reverse.jl:121
    [3] #Primal#19
      @ ~/.julia/packages/Zygote/Y6SC4/src/compiler/reverse.jl:202 [inlined]
    [4] Zygote.Adjoint(ir::IRTools.Inner.IR; varargs::Nothing, normalise::Bool)
      @ Zygote ~/.julia/packages/Zygote/Y6SC4/src/compiler/reverse.jl:315
    [5] _generate_pullback_via_decomposition(T::Type)
      @ Zygote ~/.julia/packages/Zygote/Y6SC4/src/compiler/emit.jl:101
    [6] #s3043#1206
      @ ~/.julia/packages/Zygote/Y6SC4/src/compiler/interface2.jl:28 [inlined]
    [7] var"#s3043#1206"(::Any, ctx::Any, f::Any, args::Any)
      @ Zygote ./none:0
    [8] (::Core.GeneratedFunctionStub)(::Any, ::Vararg{Any})
      @ Core ./boot.jl:580
    [9] _pullback
      @ ~/.julia/packages/FFTW/SDUwi/src/fft.jl:836 [inlined]
   [10] _pullback(::Zygote.Context, ::FFTW.var"##plan_r2r#30", ::UInt32, ::Float64, ::typeof(FFTW.plan_r2r), ::Array{Float64, 5}, ::Int64, ::UnitRange{Int64})
      @ Zygote ~/.julia/packages/Zygote/Y6SC4/src/compiler/interface2.jl:0
   [11] _pullback
      @ ~/.julia/packages/FFTW/SDUwi/src/fft.jl:836 [inlined]
   [12] _pullback(::Zygote.Context, ::typeof(FFTW.plan_r2r), ::Array{Float64, 5}, ::Int64, ::UnitRange{Int64})
      @ Zygote ~/.julia/packages/Zygote/Y6SC4/src/compiler/interface2.jl:0
   [13] _pullback
      @ ~/.julia/packages/FFTW/SDUwi/src/fft.jl:824 [inlined]
   [14] _pullback(::Zygote.Context, ::typeof(FFTW.r2r), ::Array{Float64, 5}, ::Int64, ::UnitRange{Int64})
      @ Zygote ~/.julia/packages/Zygote/Y6SC4/src/compiler/interface2.jl:0
   [15] _pullback
      @ /media/yuehhua/Workbench/workspace/NeuralOperators.jl/src/Transform/chebyshev_transform.jl:10 [inlined]
   [16] _pullback(::Zygote.Context, ::typeof(transform), ::ChebyshevTransform{3, Int64}, ::Array{Float64, 5})
      @ Zygote ~/.julia/packages/Zygote/Y6SC4/src/compiler/interface2.jl:0
   [17] _pullback
      @ /media/yuehhua/Workbench/workspace/NeuralOperators.jl/test/Transform/chebyshev_transform.jl:12 [inlined]
   [18] _pullback(ctx::Zygote.Context, f::var"#3#4"{ChebyshevTransform{3, Int64}}, args::Array{Float64, 5})
      @ Zygote ~/.julia/packages/Zygote/Y6SC4/src/compiler/interface2.jl:0
   [19] _pullback(f::Function, args::Array{Float64, 5})
      @ Zygote ~/.julia/packages/Zygote/Y6SC4/src/compiler/interface.jl:34
   [20] pullback(f::Function, args::Array{Float64, 5})
      @ Zygote ~/.julia/packages/Zygote/Y6SC4/src/compiler/interface.jl:40
   [21] gradient(f::Function, args::Array{Float64, 5})
      @ Zygote ~/.julia/packages/Zygote/Y6SC4/src/compiler/interface.jl:75
   [22] macro expansion
      @ /media/yuehhua/Workbench/workspace/NeuralOperators.jl/test/Transform/chebyshev_transform.jl:12 [inlined]
   [23] macro expansion
      @ /opt/julia-1.7.2/share/julia/stdlib/v1.7/Test/src/Test.jl:1283 [inlined]
   [24] top-level scope
      @ /media/yuehhua/Workbench/workspace/NeuralOperators.jl/test/Transform/chebyshev_transform.jl:2
   [25] include(fname::String)
      @ Base.MainInclude ./client.jl:451
   [26] macro expansion
      @ /media/yuehhua/Workbench/workspace/NeuralOperators.jl/test/Transform/Transform.jl:3 [inlined]
   [27] macro expansion
      @ /opt/julia-1.7.2/share/julia/stdlib/v1.7/Test/src/Test.jl:1283 [inlined]
   [28] top-level scope
      @ /media/yuehhua/Workbench/workspace/NeuralOperators.jl/test/Transform/Transform.jl:2
   [29] include(fname::String)
      @ Base.MainInclude ./client.jl:451
   [30] macro expansion
      @ /media/yuehhua/Workbench/workspace/NeuralOperators.jl/test/runtests.jl:31 [inlined]
   [31] macro expansion
      @ /opt/julia-1.7.2/share/julia/stdlib/v1.7/Test/src/Test.jl:1283 [inlined]
   [32] top-level scope
      @ /media/yuehhua/Workbench/workspace/NeuralOperators.jl/test/runtests.jl:30
   [33] include(fname::String)
      @ Base.MainInclude ./client.jl:451
   [34] top-level scope
      @ none:6
   [35] eval
      @ ./boot.jl:373 [inlined]
   [36] exec_options(opts::Base.JLOptions)
      @ Base ./client.jl:268
   [37] _start()
      @ Base ./client.jl:495
@yuehhua
Copy link
Collaborator Author

yuehhua commented Jul 14, 2022

Resolved.

@yuehhua yuehhua closed this as completed Jul 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant