-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: compile neural operators using Reactant #52
Open
avik-pal
wants to merge
6
commits into
main
Choose a base branch
from
ap/reactant
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+115
−12
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FNOs lead to crash of julia, need to investigate |
some more progress. With EnzymeAD/Reactant.jl#245 the forward pass of FNO compiles. Though there seems to be an issue with the gradient EnzymeAD/Reactant.jl#246 |
wsmoses
reviewed
Nov 8, 2024
9 tasks
avik-pal
commented
Nov 8, 2024
wsmoses
reviewed
Nov 9, 2024
avik-pal
force-pushed
the
ap/reactant
branch
from
November 10, 2024 02:22
58b32f2
to
528fca0
Compare
Bypassed the rfft issue. But now getting EnzymeAD/Reactant.jl#238 (comment) julia> ∇fno_compiled = @compile ∇fno(fno, ps, st, x)
error: 'complex.add' op operand #0 must be complex type with floating-point elements, but got 'tensor<16x64x64xcomplex<f32>>'
ERROR: "failed to run pass manager on module"
Stacktrace:
[1] run!
@ /mnt/software/lux/Reactant.jl/src/mlir/IR/Pass.jl:70 [inlined]
[2] run_pass_pipeline!(mod::Reactant.MLIR.IR.Module, pass_pipeline::String)
@ Reactant.Compiler /mnt/software/lux/Reactant.jl/src/Compiler.jl:251
[3] compile_mlir!(mod::Reactant.MLIR.IR.Module, f::Function, args::Tuple{…}; optimize::Bool)
@ Reactant.Compiler /mnt/software/lux/Reactant.jl/src/Compiler.jl:283
[4] compile_mlir!
@ /mnt/software/lux/Reactant.jl/src/Compiler.jl:265 [inlined]
[5] (::Reactant.Compiler.var"#30#32"{Bool, typeof(∇fno), Tuple{…}})()
@ Reactant.Compiler /mnt/software/lux/Reactant.jl/src/Compiler.jl:720
[6] context!(f::Reactant.Compiler.var"#30#32"{Bool, typeof(∇fno), Tuple{…}}, ctx::Reactant.MLIR.IR.Context)
@ Reactant.MLIR.IR /mnt/software/lux/Reactant.jl/src/mlir/IR/Context.jl:76
[7] compile_xla(f::Function, args::Tuple{…}; client::Nothing, optimize::Bool)
@ Reactant.Compiler /mnt/software/lux/Reactant.jl/src/Compiler.jl:717
[8] compile_xla
@ /mnt/software/lux/Reactant.jl/src/Compiler.jl:712 [inlined]
[9] compile(f::Function, args::Tuple{…}; client::Nothing, optimize::Bool, sync::Bool)
@ Reactant.Compiler /mnt/software/lux/Reactant.jl/src/Compiler.jl:744
[10] top-level scope
@ /mnt/software/lux/Reactant.jl/src/Compiler.jl:490
Some type information was truncated. Use `show(err)` to see complete types. |
That should be resolved by the arith raise pass and converted to a stablehlo.add |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
needs EnzymeAD/Reactant.jl#217 + a JLL bump