Skip to content

Conversation

@avik-pal
Copy link
Collaborator

No description provided.

@avik-pal
Copy link
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?

@wsmoses
Copy link
Member

wsmoses commented Oct 28, 2025

yeah that part I dont understand

@gbaraldi ?

@avik-pal avik-pal force-pushed the ap/more_1.12_support branch 6 times, most recently from 0f102d0 to 35d96e6 Compare October 31, 2025 15:54
@avik-pal avik-pal marked this pull request as ready for review October 31, 2025 15:54
@avik-pal avik-pal requested a review from wsmoses October 31, 2025 15:54
@avik-pal
Copy link
Collaborator Author

The remaining ones seem to be interpreter errors + llvmcall for logging. We can handle those later

@avik-pal avik-pal force-pushed the ap/more_1.12_support branch from 35d96e6 to 0895bbd Compare November 7, 2025 14:33
@avik-pal avik-pal force-pushed the ap/more_1.12_support branch from 0895bbd to 18372a1 Compare November 9, 2025 05:05
@avik-pal avik-pal merged commit f5e61ff into main Nov 10, 2025
61 of 65 checks passed
@avik-pal avik-pal deleted the ap/more_1.12_support branch November 10, 2025 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants