-
Notifications
You must be signed in to change notification settings - Fork 38
feat: more 1.12 support #1796
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
Merged
Merged
feat: more 1.12 support #1796
Conversation
This file contains hidden or 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
Collaborator
Author
ifelse: Error During Test at /mnt2/avik-pal/reactant/Reactant.jl/test/basic.jl:595
Test threw exception
Expression: 1.0 == #= /mnt2/avik-pal/reactant/Reactant.jl/test/basic.jl:595 =# @test_warn(r"`ifelse` with different element-types", #= /mnt2/avik-pal/reactant/Reactant.jl/test/basic.jl:595 =# @jit(ifelse(ConcreteRNumber(true), ConcreteRNumber(1.0), Con
creteRNumber(0.0f0))))
`llvmcall` requires the compiler
Stacktrace:
[1] getindex
@ ./atomics.jl:365 [inlined]
[2] macro expansion
@ ./logging/logging.jl:399 [inlined]
[3] ifelse
@ /mnt2/avik-pal/reactant/Reactant.jl/src/TracedRNumber.jl:347 [inlined]
[4] (::Nothing)(none::typeof(ifelse), none::Reactant.TracedRNumber{Bool}, none::Reactant.TracedRNumber{Float64}, none::Reactant.TracedRNumber{Float32})
@ Reactant ./<missing>:0
[5] call_with_reactant
@ ./none:-1 [inlined]
[6] call_with_reactant(::typeof(ifelse), ::Reactant.TracedRNumber{Bool}, ::Reactant.TracedRNumber{Float64}, ::Reactant.TracedRNumber{Float32})
@ Reactant /mnt2/avik-pal/reactant/Reactant.jl/src/utils.jl:0
[7] make_mlir_fn(f::typeof(ifelse), args::Tuple{ConcretePJRTNumber{Bool, 1, Reactant.Sharding.ShardInfo{Reactant.Sharding.NoSharding, Nothing}}, ConcretePJRTNumber{Float64, 1, Reactant.Sharding.ShardInfo{Reactant.Sharding.NoSharding, Nothing}}, Concr
etePJRTNumber{Float32, 1, Reactant.Sharding.ShardInfo{Reactant.Sharding.NoSharding, Nothing}}}, kwargs::@NamedTuple{}, name::String, concretein::Bool; toscalar::Bool, return_dialect::Symbol, args_in_result::Symbol, construct_function_without_args::Bool,
do_transpose::Bool, input_shardings::Nothing, output_shardings::Nothing, runtime::Val{:PJRT}, verify_arg_names::Nothing, argprefix::Symbol, resprefix::Symbol, resargprefix::Symbol, num_replicas::Int64, optimize_then_pad::Bool)
@ Reactant.TracedUtils /mnt2/avik-pal/reactant/Reactant.jl/src/TracedUtils.jl:345
[8] make_mlir_fn
@ /mnt2/avik-pal/reactant/Reactant.jl/src/TracedUtils.jl:275 [inlined]
[9] compile_mlir!(mod::Reactant.MLIR.IR.Module, f::typeof(ifelse), args::Tuple{ConcretePJRTNumber{Bool, 1, Reactant.Sharding.ShardInfo{Reactant.Sharding.NoSharding, Nothing}}, ConcretePJRTNumber{Float64, 1, Reactant.Sharding.ShardInfo{Reactant.Shardi
ng.NoSharding, Nothing}}, ConcretePJRTNumber{Float32, 1, Reactant.Sharding.ShardInfo{Reactant.Sharding.NoSharding, Nothing}}}, compile_options::CompileOptions, callcache::Dict{Vector, @NamedTuple{f_name::String, mlir_result_types::Vector{Reactant.MLIR.IR
.Type}, traced_result, mutated_args::Vector{Int64}, linear_results::Vector{Union{ReactantCore.MissingTracedValue, Reactant.TracedRArray, Reactant.TracedRNumber}}, fnwrapped::Bool, argprefix::Symbol, resprefix::Symbol, resargprefix::Symbol}}, sdycache::Di
ct{Tuple{AbstractVector{Int64}, NTuple{var"#s677", Symbol} where var"#s677", NTuple{N, Int64} where N}, @NamedTuple{sym_name::Reactant.MLIR.IR.Attribute, mesh_attr::Reactant.MLIR.IR.Attribute, mesh_op::Reactant.MLIR.IR.Operation, mesh::Reactant.Sharding.
Mesh}}; fn_kwargs::@NamedTuple{}, backend::String, runtime::Val{:PJRT}, legalize_stablehlo_to_mhlo::Bool, client::Reactant.XLA.PJRT.Client, kwargs::@Kwargs{})
@ Reactant.Compiler /mnt2/avik-pal/reactant/Reactant.jl/src/Compiler.jl:1611
[10] compile_xla(f::Function, args::Tuple{ConcretePJRTNumber{Bool, 1, Reactant.Sharding.ShardInfo{Reactant.Sharding.NoSharding, Nothing}}, ConcretePJRTNumber{Float64, 1, Reactant.Sharding.ShardInfo{Reactant.Sharding.NoSharding, Nothing}}, ConcretePJRT
Number{Float32, 1, Reactant.Sharding.ShardInfo{Reactant.Sharding.NoSharding, Nothing}}}; before_xla_optimizations::Bool, client::Nothing, serializable::Bool, kwargs::@Kwargs{compile_options::CompileOptions, fn_kwargs::@NamedTuple{}})
@ Reactant.Compiler /mnt2/avik-pal/reactant/Reactant.jl/src/Compiler.jl:3503
[11] compile_xla
@ /mnt2/avik-pal/reactant/Reactant.jl/src/Compiler.jl:3475 [inlined]
[12] compile(f::Function, args::Tuple{ConcretePJRTNumber{Bool, 1, Reactant.Sharding.ShardInfo{Reactant.Sharding.NoSharding, Nothing}}, ConcretePJRTNumber{Float64, 1, Reactant.Sharding.ShardInfo{Reactant.Sharding.NoSharding, Nothing}}, ConcretePJRTNumb
er{Float32, 1, Reactant.Sharding.ShardInfo{Reactant.Sharding.NoSharding, Nothing}}}; kwargs::@Kwargs{fn_kwargs::@NamedTuple{}, client::Nothing, reshape_propagate::Symbol, raise_first::Bool, assert_nonallocating::Bool, legalize_chlo_to_stablehlo::Bool, tr
anspose_propagate::Symbol, donated_args::Symbol, optimize_then_pad::Bool, cudnn_hlo_optimize::Bool, compile_options::Missing, sync::Bool, no_nan::Bool, raise::Bool, shardy_passes::Symbol, optimize::Bool, optimize_communications::Bool})
@ Reactant.Compiler /mnt2/avik-pal/reactant/Reactant.jl/src/Compiler.jl:3579
[13] top-level scope
@ /mnt2/avik-pal/reactant/Reactant.jl/test/basic.jl:595
[14] macro expansion
@ /mnt2/avik-pal/.julia/juliaup/julia-1.12.1+0.x64.linux.gnu/share/julia/stdlib/v1.12/Test/src/Test.jl:1776 [inlined]
[15] macro expansion
@ /mnt2/avik-pal/reactant/Reactant.jl/test/basic.jl:595 [inlined]
[16] macro expansion
@ /mnt2/avik-pal/.julia/juliaup/julia-1.12.1+0.x64.linux.gnu/share/julia/stdlib/v1.12/Test/src/Test.jl:929 [inlined]
[17] macro expansion
@ /mnt2/avik-pal/reactant/Reactant.jl/src/Compiler.jl:2652 [inlined] We can't log inside the interpretter? |
Member
|
yeah that part I dont understand |
0f102d0 to
35d96e6
Compare
Collaborator
Author
|
The remaining ones seem to be interpreter errors + llvmcall for logging. We can handle those later |
35d96e6 to
0895bbd
Compare
0895bbd to
18372a1
Compare
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.
No description provided.